2023-03-08 18:53:21 +01:00
|
|
|
{ self, inputs, ... }:
|
2023-03-07 13:20:14 +01:00
|
|
|
let
|
|
|
|
inherit (self) lib;
|
|
|
|
|
|
|
|
defaultModules = [
|
2023-05-03 16:52:11 +02:00
|
|
|
{
|
2023-03-07 13:20:14 +01:00
|
|
|
# Let 'nixos-version --json' know about the Git revision
|
|
|
|
system.configurationRevision = self.rev or "dirty";
|
2023-05-03 16:52:11 +02:00
|
|
|
}
|
2023-03-07 13:20:14 +01:00
|
|
|
{
|
|
|
|
nixpkgs.overlays = (lib.attrValues self.overlays) ++ [
|
2023-03-08 18:53:21 +01:00
|
|
|
inputs.nur.overlay
|
2023-03-07 13:20:14 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
# Include generic settings
|
2023-11-09 14:37:46 +01:00
|
|
|
"${self}/modules/nixos"
|
2023-03-07 13:20:14 +01:00
|
|
|
# Include bundles of settings
|
|
|
|
"${self}/profiles"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildHost = name: system: lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules = defaultModules ++ [
|
2023-03-09 10:11:12 +01:00
|
|
|
"${self}/hosts/nixos/${name}"
|
2023-03-07 13:20:14 +01:00
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
# Use my extended lib in NixOS configuration
|
|
|
|
inherit lib;
|
|
|
|
# Inject inputs to use them in global registry
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
2023-03-08 18:53:21 +01:00
|
|
|
{
|
|
|
|
flake.nixosConfigurations = lib.mapAttrs buildHost {
|
|
|
|
aramis = "x86_64-linux";
|
|
|
|
porthos = "x86_64-linux";
|
|
|
|
};
|
2023-03-07 13:20:14 +01:00
|
|
|
}
|