trivionomicon/flake: make 'mkSystem' available to library users
This commit is contained in:
parent
0ae8676d50
commit
e4eb342725
1 changed files with 27 additions and 16 deletions
43
flake.nix
43
flake.nix
|
@ -164,24 +164,12 @@
|
||||||
}
|
}
|
||||||
// optionalAttrs (paths ? nixosSource) {
|
// optionalAttrs (paths ? nixosSource) {
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
nixosSystem = {modules}:
|
|
||||||
lib.makeOverridable nixpkgs.lib.nixosSystem {
|
|
||||||
inherit modules pkgs system;
|
|
||||||
|
|
||||||
specialArgs = {
|
|
||||||
inherit flakes;
|
|
||||||
|
|
||||||
doctrine = mkDoctrine {
|
|
||||||
inherit pkgs;
|
|
||||||
namespace = "sys";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hostConfig = platform:
|
hostConfig = platform:
|
||||||
nixosSystem {
|
self.lib.mkSystem {
|
||||||
|
inherit flakes pkgs;
|
||||||
|
doctrine = doctrineNoPkgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
self.nixosModules.default
|
|
||||||
nixosSourcePath
|
nixosSourcePath
|
||||||
platform
|
platform
|
||||||
];
|
];
|
||||||
|
@ -213,6 +201,29 @@
|
||||||
in
|
in
|
||||||
lib.mapAttrs home (importAll {root = hmPlatformsPath;});
|
lib.mapAttrs home (importAll {root = hmPlatformsPath;});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mkSystem = {
|
||||||
|
pkgs,
|
||||||
|
flakes,
|
||||||
|
doctrine,
|
||||||
|
modules,
|
||||||
|
}:
|
||||||
|
flakes.nixpkgs.lib.makeOverridable flakes.nixpkgs.lib.nixosSystem {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit (pkgs) system;
|
||||||
|
|
||||||
|
modules = [self.nixosModules.default] ++ modules;
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit flakes;
|
||||||
|
|
||||||
|
doctrine = self.lib.mkDoctrine {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit (doctrine) prefix;
|
||||||
|
namespace = "sys";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue