nix: automatically pin nixpkgs to flake input
Alan Pearce alan@alanpearce.eu
Thu, 29 Jun 2023 08:29:44 +0200
3 files changed, 18 insertions(+), 0 deletions(-)
M flake.nix → flake.nix
@@ -43,6 +43,7 @@ modules = [ ./system/mba.nix ]; }; homeConfigurations."alan@mba" = home-manager.lib.homeManagerConfiguration { pkgs = darwinPkgs; + extraSpecialArgs = { inherit attrs; }; modules = [ ./user/mba.nix (secrets + "/default.nix") @@ -52,6 +53,7 @@ ]; }; homeConfigurations."alan@prefect" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; + extraSpecialArgs = { inherit attrs; }; modules = [ ./user/prefect.nix (secrets + "/default.nix") @@ -61,6 +63,7 @@ ]; }; homeConfigurations."alan@nanopi" = home-manager.lib.homeManagerConfiguration { pkgs = aarch64LinuxPackages; + extraSpecialArgs = { inherit attrs; }; modules = [ ./user/nanopi.nix (secrets + "/default.nix") @@ -68,6 +71,7 @@ ]; }; homeConfigurations."alan@pappel" = home-manager.lib.homeManagerConfiguration { pkgs = nixosPkgs; + extraSpecialArgs = { inherit attrs; }; modules = [ ./user/server.nix (secrets + "/default.nix")
M user/settings/nix.nix → user/settings/nix.nix
@@ -2,6 +2,9 @@ { config , pkgs , ... }: { + imports = [ + ./pin.nix + ]; nixpkgs.config = import ../config.nix; home.packages = with pkgs; [ nil
A user/settings/pin.nix
@@ -0,0 +1,11 @@+{ attrs, ... }: +let + inherit (attrs) nixpkgs; +in +{ + nix = { + registry = { + nixpkgs.flake = nixpkgs; + }; + }; +}