all: make deploy setup optional
This commit is contained in:
parent
c4bf11b1c4
commit
2d8c791d19
@ -12,6 +12,14 @@ with lib; {
|
|||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
needsDeploy = {
|
||||||
|
enable = mkOption {
|
||||||
|
description = "Host needs deploy key to receive encrypted secrets";
|
||||||
|
default = true;
|
||||||
|
example = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
@ -24,15 +32,17 @@ with lib; {
|
|||||||
dates = "*-*-* *:05:00";
|
dates = "*-*-* *:05:00";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
{
|
|
||||||
# Always add our host alias or we run into a bootstrap issue
|
# Always add our host alias or we run into a bootstrap issue
|
||||||
programs.ssh.extraConfig = ''
|
(mkIf config.needsDeploy.enable {
|
||||||
Host xin-secrets-ro
|
programs.ssh.extraConfig =
|
||||||
IdentityFile ${config.sops.secrets.xin_secrets_deploy_key.path}
|
''
|
||||||
User gitea
|
Host xin-secrets-ro
|
||||||
Port 2222
|
IdentityFile ${config.sops.secrets.xin_secrets_deploy_key.path}
|
||||||
Hostname git.tapenet.org
|
User gitea
|
||||||
'';
|
Port 2222
|
||||||
}
|
Hostname git.tapenet.org
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ in
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
needsDeploy.enable = false;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user