NixOS-Config/flake.nix
2024-06-13 22:32:42 +08:00

38 lines
853 B
Nix

{
description = "NixOS System Config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
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 = [
"g2"
"g3"
"g5"
"g6"
"g7"
"g10"
"g11"
"g12"
"g14"
];
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));
};
}