feat(g2): init (exp)

This commit is contained in:
2024-05-27 20:26:17 +08:00
parent cc67b096fc
commit 8d34332a72
3 changed files with 182 additions and 0 deletions

29
flake.nix Normal file
View File

@@ -0,0 +1,29 @@
{
description = "NixOS System Config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
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"
];
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));
};
}