flake, overlays: move stable and master overlays to host config

Defining the `stable` and `master` package overlays directly in `flake/hosts.nix` allows them to properly
inherit `config.nixpkgs.config` from the specific host.
This commit is contained in:
2026-07-17 12:57:13 +08:00
parent ee609f0425
commit 9dc47df5ea
2 changed files with 19 additions and 16 deletions
+18 -2
View File
@@ -9,8 +9,24 @@
}:
let
vars = import ../vars.nix;
pkgsModule = {
nixpkgs = pkgsParams;
pkgsModule = { config, ... }: {
nixpkgs = lib.mkMerge [
pkgsParams
{
overlays = [
(final: _prev: {
stable = import inputs.nixpkgs-stable {
inherit (final.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
master = import inputs.nixpkgs-master {
inherit (final.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
})
];
}
];
};
hmModule = {
home-manager = {
+1 -14
View File
@@ -1,16 +1,7 @@
{
inputs,
lib,
...
}:
let
mkPkgs = type: final: _prev: {
${type} = import inputs."nixpkgs-${type}" {
system = final.stdenv.hostPlatform.system;
config.allowUnfree = true;
};
};
in
{
flake.overlays = {
modifications =
@@ -28,9 +19,5 @@ in
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE"
'';
};
}
//
# this allows us to access specific version of nixpkgs
# by `pkgs.unstable`, `pkgs.stable` and `pkgs.master`
lib.genAttrs [ "stable" "unstable" "master" ] mkPkgs;
};
}