nixos/flake/nixos.nix

36 lines
727 B
Nix
Raw Normal View History

2025-05-03 11:35:18 +08:00
{
inputs,
lib,
self,
...
}: let
rootPath = ./..;
inherit (self) outputs;
inherit (inputs) nixpkgs;
2025-05-03 11:35:18 +08:00
in {
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-05-03 11:35:18 +08:00
nixosConfigurations = let
makeNixosConfiguration = hostName:
nixpkgs.lib.nixosSystem {
2025-07-01 23:17:40 +08:00
modules = [(rootPath + "/nixos/configurations/${hostName}")];
2025-05-03 11:35:18 +08:00
specialArgs = {
inherit inputs outputs rootPath;
};
};
in
[
"Tytonidae"
"Cape"
"Akun"
]
|> (
with lib;
flip genAttrs makeNixosConfiguration
);
2025-05-03 11:35:18 +08:00
};
}