NixOS-Config/flake.nix

43 lines
916 B
Nix
Raw Normal View History

2024-05-27 20:26:17 +08:00
{
description = "NixOS System Config";
inputs = {
2024-06-09 15:38:35 +08:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
2024-05-27 20:26:17 +08:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, sops-nix, ... }@inputs:
let
nixos-x86_64-hosts = [
2024-06-14 23:02:50 +08:00
"g1"
2024-05-27 20:26:17 +08:00
"g2"
2024-06-13 22:32:42 +08:00
"g3"
2024-06-13 20:16:57 +08:00
"g5"
2024-06-13 20:53:47 +08:00
"g6"
2024-06-13 12:48:00 +08:00
"g7"
2024-06-14 22:37:22 +08:00
"g8"
2024-06-12 13:50:52 +08:00
"g10"
2024-06-11 22:58:29 +08:00
"g11"
"g12"
2024-06-15 01:44:14 +08:00
"g13"
2024-06-09 15:38:35 +08:00
"g14"
2024-06-15 11:16:13 +08:00
"g17"
2024-06-18 00:29:22 +08:00
"g18-next"
2024-05-27 20:26:17 +08:00
];
in
{
nixosConfigurations = {
} // (builtins.listToAttrs (builtins.map (host: {
name = host;
value = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/${host}/configuration.nix
sops-nix.nixosModules.sops
];
};
}) nixos-x86_64-hosts));
};
}