diff --git a/modules/nix.nix b/modules/nix.nix index 8720d1a..f8aec89 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -14,16 +14,22 @@ in nixpkgs.config.allowUnfree = true; # nix.package = pkgs.nixVersions.latest; - nix.extraOptions = '' - experimental-features = nix-command flakes - use-xdg-base-directories = true - ''; + nix = { + extraOptions = '' + experimental-features = nix-command flakes + use-xdg-base-directories = true + ''; + + optimise.automatic = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + + # use the same nixpkgs for nix run "nixpkgs#hello" style commands + registry.nixpkgs.flake = inputs.nixpkgs; - nix.optimise.automatic = true; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; }; environment.systemPackages = [