diff --git a/flake.lock b/flake.lock index 7768128..118664f 100644 --- a/flake.lock +++ b/flake.lock @@ -136,11 +136,11 @@ ] }, "locked": { - "lastModified": 1650784624, - "narHash": "sha256-RTYGFBlxEmhhLLH9UfObyz2d4alhCSf6NQpyID7Mqvg=", + "lastModified": 1651886851, + "narHash": "sha256-kbXOJSf1uho0/7P54nZkJdJY3oAelIjyc6tfiRhaXJI=", "owner": "nix-community", "repo": "home-manager", - "rev": "65a32578d9b1394bea5c6336721ec392aadc89fb", + "rev": "882bd8118bdbff3a6e53e5ced393932b351ce2f6", "type": "github" }, "original": { @@ -180,11 +180,11 @@ }, "nixpkgs-mine": { "locked": { - "lastModified": 1651402344, - "narHash": "sha256-l+gdIawjIP4W/a8uyFjzCAtHj+/4MiVAFtU3KqRJB2Q=", + "lastModified": 1651928992, + "narHash": "sha256-U9IgIFKj1W6YBsoFy3AG7YaxBw9qQTYeGhvlLcKfUYQ=", "owner": "devplayer0", "repo": "nixpkgs", - "rev": "e63fb067c84f90b2285650ea994123cbe91d3a30", + "rev": "e0844396c59d27f26f18b8ee4bff4fdda0e39cfa", "type": "github" }, "original": { diff --git a/home-manager/default.nix b/home-manager/default.nix index e4b0b59..05f0e3c 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -18,8 +18,10 @@ let configuration = head defs; # Passing pkgs here doesn't set the global pkgs, just where it'll be imported from (and where the global lib is # derived from). We want home-manager to import pkgs itself so it'll apply config and overlays modularly. Any config - # and overlays previously applied will be passed on by `homeManagerConfiguration` though. - pkgs = pkgs'.${config'.nixpkgs}.${config'.system}; + # and overlays previously applied will be passed on by `homeManagerConfiguration` though. In fact, because of weird + # config merging behaviour (or lack thereof; similar to NixOS module), we explicitly pass empty config. + # TODO: Check if this is fixed in future. + pkgs = pkgs'.${config'.nixpkgs}.${config'.system} // { config = { }; }; extraSpecialArgs = { inherit inputs; }; extraModules = (attrValues cfg.modules) ++ [ { diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index 113c8d1..c32f21c 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -232,7 +232,7 @@ in home = { packages = with pkgs; [ - pkgs'.unstable.nixVersions.stable + pkgs'.mine.nix ]; }; }) diff --git a/nixos/default.nix b/nixos/default.nix index d6c82b4..348f222 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -60,9 +60,11 @@ let networking.hostName = mkDefault name; nixpkgs = { inherit (config') system; - # Make sure any previously set config / overlays (e.g. lib which will be inherited by home-manager down the - # line) are passed on when nixpkgs is imported. - inherit (pkgs) config overlays; + # Make sure any previously set overlays (e.g. lib which will be inherited by home-manager down the + # line) are passed on when nixpkgs is imported. We don't inherit config anymore because apparently it + # doesn't seem to merge properly... (https://github.com/NixOS/nixpkgs/blob/14a348fcc6c0d28804f640375f058d5491c2e1ee/nixos/modules/misc/nixpkgs.nix#L34) + # TODO: Possible this behaviour will be fixed in future? + inherit (pkgs) overlays; }; # Unfortunately it seems there's no way to fully decouple home-manager's lib from NixOS's pkgs.lib. :( diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index c7b4538..c84c319 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -47,7 +47,7 @@ in }; nix = { - package = pkgs'.unstable.nixVersions.stable; + package = pkgs'.mine.nix; # TODO: This has been renamed to nix.settings.trusted-users in 22.05 trustedUsers = [ "@wheel" ]; extraOptions =