2023-12-07 22:22:09 +01:00
|
|
|
{ self, inputs, lib, ... }:
|
2023-03-07 13:20:14 +01:00
|
|
|
let
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
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
|
2023-12-07 22:22:09 +01:00
|
|
|
inherit (self) lib;
|
2023-03-07 13:20:14 +01:00
|
|
|
# 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
|
|
|
}
|