Add MkSystem function to lib.
This commit is contained in:
parent
a3aa93106a
commit
5327a81d0b
2 changed files with 26 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
utils = import ./utils.nix;
|
utils = import ./utils.nix;
|
||||||
getSSHKeys = (import ./keys.nix).getSSHKeys;
|
getSSHKeys = (import ./keys.nix).getSSHKeys;
|
||||||
|
mkSystem = (import ./nixos.nix).mkSystem;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
nixos/lib/nixos.nix
Normal file
25
nixos/lib/nixos.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
let
|
||||||
|
foelib = import ./default.nix;
|
||||||
|
in {
|
||||||
|
mkSystem = nixpkgs: pkgs: hostname: modules:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
modules =
|
||||||
|
[
|
||||||
|
{
|
||||||
|
nix.registry = {
|
||||||
|
nixpkgs.flake = nixpkgs;
|
||||||
|
p.flake = nixpkgs;
|
||||||
|
};
|
||||||
|
nixpkgs.pkgs = pkgs;
|
||||||
|
|
||||||
|
networking.hostname = hostname;
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ modules
|
||||||
|
++ foelib.utils.findNixFiles ../nixos;
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit hostname foelib;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue