diff --git a/modules/nixos/compositor.nix b/modules/nixos/compositor.nix deleted file mode 100644 index 844c002..0000000 --- a/modules/nixos/compositor.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - # just enable and install niri - programs.niri.enable = true; - - # Add compositor-related packages - environment.systemPackages = with pkgs; [ - xwayland-satellite - ]; -} diff --git a/modules/nixos/settings.nix b/modules/nixos/settings.nix index b7b6102..075ce7c 100644 --- a/modules/nixos/settings.nix +++ b/modules/nixos/settings.nix @@ -1,8 +1,36 @@ { config, lib, pkgs, ... }: { - # use flakes and nix command - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + # nix settings + settings = { + # enable flakes, nix-command and eval-cache + experimental-features = [ "nix-command" "flakes" "eval-cache" ]; + # auto-optimize my nix-store + auto-optimise-store = true; + # use all cores + max-jobs = "auto"; + # use all available cores per job + cores = 0; + # add trusted substituters (binary caches) + substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + ]; + # add keys + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; + + # enable automatic garbage collection + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; # links /libexec from derivations to /run/current-system/sw environment.pathsToLink = [ "/libexec" ];