43 lines
909 B
Nix
43 lines
909 B
Nix
{
|
|
inputs,
|
|
self,
|
|
...
|
|
}:
|
|
|
|
/*
|
|
|
|
nixfiles.lib.nixosSystem, like nixpkgs.lib.nixosSystem but
|
|
with nixfiles overlays and modules already populated
|
|
|
|
*/
|
|
{
|
|
system ? null,
|
|
nixpkgs ? inputs.nixpkgs,
|
|
pkgs ? null,
|
|
modules ? [],
|
|
...
|
|
}@args:
|
|
|
|
nixpkgs.lib.nixosSystem ({
|
|
system = system;
|
|
pkgs = if pkgs != null then pkgs else (self.lib.mkNixpkgs {
|
|
inherit system nixpkgs;
|
|
});
|
|
modules = [
|
|
self.nixosModules.nixfilesInputs
|
|
self.nixosModules.clerie
|
|
self.nixosModules.profiles
|
|
({ config, lib, ... }: {
|
|
/*
|
|
Make the contents of the flake availiable to modules.
|
|
Useful for having the monitoring server scraping the
|
|
target config from all other servers automatically.
|
|
*/
|
|
_module.args = {
|
|
inputs = inputs;
|
|
_nixfiles = self;
|
|
};
|
|
})
|
|
] ++ modules;
|
|
} // builtins.removeAttrs args [ "system" "nixpkgs" "pkgs" "modules" ] )
|