Move Colmena deployment to machine's nixos module
This commit is contained in:
parent
b0a106b332
commit
adbea68c91
3 changed files with 56 additions and 57 deletions
55
colmena.nix
55
colmena.nix
|
@ -15,34 +15,6 @@ inputs @ {
|
|||
};
|
||||
|
||||
sue = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
sops = lib.getExe pkgs.sops;
|
||||
in {
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = null;
|
||||
|
||||
keys = {
|
||||
# TODO: Create macro for this
|
||||
root-sops-age-key = {
|
||||
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 = {
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(import ./machines).sue.module
|
||||
./nixos
|
||||
|
@ -50,33 +22,6 @@ inputs @ {
|
|||
};
|
||||
|
||||
gamepc = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
sops = lib.getExe pkgs.sops;
|
||||
in {
|
||||
deployment = {
|
||||
targetHost = "gamepc";
|
||||
targetUser = "root";
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(import ./machines).gamepc.module
|
||||
./nixos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue