nixos-configs/colmena.nix

87 lines
1.9 KiB
Nix
Raw Normal View History

2024-11-11 20:40:36 +00:00
inputs @ {
self,
nixpkgs,
...
}: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
};
specialArgs = {
inherit inputs self;
};
};
sue = {
2024-11-17 21:50:00 +00:00
pkgs,
lib,
...
}: let
sops = lib.getExe pkgs.sops;
in {
2024-11-11 20:40:36 +00:00
deployment = {
allowLocalDeployment = true;
targetHost = null;
keys = {
2024-11-17 21:50:00 +00:00
# TODO: Create macro for this
root-sops-age-key = {
2024-11-17 21:50:00 +00:00
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/nixos.sops.yaml"];
name = "keys.txt";
destDir = "/root/.config/sops/age";
};
pim-sops-age-key = {
2024-11-17 21:50:00 +00:00
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/home.sops.yaml"];
name = "keys.txt";
destDir = "/home/pim/.config/sops/age";
user = "pim";
group = "users";
};
};
2024-11-11 20:40:36 +00:00
};
imports = [
(import ./machines).sue.module
./nixos
];
};
gamepc = {
2024-11-17 21:50:00 +00:00
pkgs,
lib,
...
}: let
sops = lib.getExe pkgs.sops;
in {
2024-11-11 20:40:36 +00:00
deployment = {
targetHost = "gamepc";
targetUser = "root";
2024-11-17 21:50:00 +00:00
keys = {
root-sops-age-key = {
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/nixos.sops.yaml"];
name = "keys.txt";
destDir = "/root/.config/sops/age";
};
pim-sops-age-key = {
keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/home.sops.yaml"];
name = "keys.txt";
destDir = "/home/pim/.config/sops/age";
user = "pim";
group = "users";
};
};
2024-11-11 20:40:36 +00:00
};
imports = [
(import ./machines).gamepc.module
./nixos
];
};
};
}