diff --git a/flake.nix b/flake.nix index be4fcd7..5dd9bd1 100644 --- a/flake.nix +++ b/flake.nix @@ -60,9 +60,6 @@ # The platform the configuration will be used on. nixpkgs.hostPlatform = "aarch64-darwin"; - # Necessary for using flakes on this system. - nix.settings.experimental-features = "nix-command flakes"; - # Set Git commit hash for darwin-version. system.configurationRevision = self.rev or self.dirtyRev or null; @@ -80,6 +77,22 @@ ShowStatusBar = true; # show status bar }; }; + + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + + nix = { + configureBuildUsers = true; + distributedBuilds = true; + + gc = { + automatic = true; + options = "--delete-older-than 7d"; + }; + settings = { + experimental-features = "nix-command flakes"; + }; + }; }; in { @@ -106,27 +119,27 @@ ./devices/becky-dingleberry.nix ]; }; - }; - darwinConfigurations = { - # init with - # nix run nix-darwin -- switch --flake ~/.config/nix - # update with - # darwin-rebuild switch --flake ~/.config/nix - lcech-mac-veracode = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - modules = [ - darwin-common - home-manager.darwinModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users.lcech = import ./devices/lcech-mac-veracode.nix; - }; - users.users.lcech.home = "/Users/lcech"; - } - ]; + darwinConfigurations = { + # init with + # nix run nix-darwin -- switch --flake ~/.config/nix + # update with + # darwin-rebuild switch --flake ~/.config/nix + lcech-mac-veracode = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = [ + darwin-common + home-manager.darwinModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.lcech = import ./devices/lcech-mac-veracode.nix; + }; + users.users.lcech.home = "/Users/lcech"; + } + ]; + }; }; }; };