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:
+18
-2
@@ -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
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user