Bruno BELANYI
3ed2fac3db
All checks were successful
ci/woodpecker/push/check Pipeline was successful
I can't use `self.lib` to define options, that would result in infinite recursion.
36 lines
813 B
Nix
36 lines
813 B
Nix
{ self, inputs, lib, ... }:
|
|
let
|
|
defaultModules = [
|
|
{
|
|
# Let 'nixos-version --json' know about the Git revision
|
|
system.configurationRevision = self.rev or "dirty";
|
|
}
|
|
{
|
|
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
|
|
inputs.nur.overlay
|
|
];
|
|
}
|
|
# Include generic settings
|
|
"${self}/modules/nixos"
|
|
];
|
|
|
|
buildHost = name: system: lib.nixosSystem {
|
|
inherit system;
|
|
modules = defaultModules ++ [
|
|
"${self}/hosts/nixos/${name}"
|
|
];
|
|
specialArgs = {
|
|
# Use my extended lib in NixOS configuration
|
|
inherit (self) lib;
|
|
# Inject inputs to use them in global registry
|
|
inherit inputs;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
flake.nixosConfigurations = lib.mapAttrs buildHost {
|
|
aramis = "x86_64-linux";
|
|
porthos = "x86_64-linux";
|
|
};
|
|
}
|