nixos/flake/nixos.nix

41 lines
777 B
Nix
Raw Normal View History

2025-05-03 11:35:18 +08:00
{
inputs,
lib,
self,
rootPath,
...
2025-07-13 06:04:55 +08:00
}:
let
inherit (self) outputs;
2025-07-13 06:04:55 +08:00
in
{
2025-05-03 11:35:18 +08:00
flake = {
2025-07-01 23:17:40 +08:00
nixosModules = {
default = import (rootPath + "/nixos/modules/top-level");
gui = import (rootPath + "/nixos/modules/top-level/gui.nix");
};
2025-07-13 06:04:55 +08:00
nixosConfigurations =
let
makeNixosConfiguration =
hostName:
lib.nixosSystem {
modules = [ (rootPath + "/nixos/configurations/${hostName}") ];
specialArgs = {
inherit
inputs
outputs
rootPath
lib
;
};
2025-05-03 11:35:18 +08:00
};
2025-07-13 06:04:55 +08:00
in
[
"Tytonidae"
"Cape"
"Akun"
]
2025-07-13 06:04:55 +08:00
|> (with lib; flip genAttrs makeNixosConfiguration);
2025-05-03 11:35:18 +08:00
};
}