servers/lib/nixos.nix

26 lines
588 B
Nix
Raw Normal View History

2025-02-03 13:00:31 -06:00
nixpkgs: withSystem: let
foelib = import ./default.nix nixpkgs withSystem;
2025-01-26 19:20:24 -06:00
in {
2025-02-03 13:00:31 -06:00
mkSystem = hostname: host-platform: modules:
withSystem host-platform
({pkgs, ...}:
nixpkgs.lib.nixosSystem {
modules =
[
{
nix.registry = {
nixpkgs.flake = nixpkgs;
p.flake = nixpkgs;
};
nixpkgs.pkgs = pkgs;
2025-01-26 19:20:24 -06:00
2025-02-03 13:00:31 -06:00
networking.hostName = hostname;
}
]
++ modules;
specialArgs = {
inherit hostname foelib;
};
});
2025-01-26 19:20:24 -06:00
}