Strip down nostromo for nixops deploy & new config

This commit is contained in:
2021-04-21 10:34:46 -07:00
parent 353936d509
commit 735b44eb7a
8 changed files with 41 additions and 167 deletions
+4 -1
View File
@@ -35,12 +35,15 @@ let
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStartPre = pkgs.writeShellScript "prepare-secrets-dir.sh" ''
ExecStartPre = pkgs.writeShellScript "prepare-${name}-secret-dir.sh" ''
TARGET_DIR=$(dirname ${target-file})
if [[ ! -d "$TARGET_DIR" ]]; then
mkdir -p "$TARGET_DIR"
fi
'';
ExecStop = pkgs.writeShellScript "clear-${name}-secret.sh" ''
rm -f ${target-file}
'';
ExecStart = let
decrypt-keys =
filter (key: key.type == key-type) config.services.openssh.hostKeys;