copy passwords to the volume

This commit is contained in:
oxapentane - 2023-06-09 23:37:18 +02:00
parent a848059fbc
commit c4f727b4a8
Signed by: oxapentane
GPG Key ID: 91FA5E5BF9AA901C
1 changed files with 11 additions and 3 deletions

View File

@ -7,11 +7,12 @@ let
isAdmin = true;
}
];
# move the secrets to the volume
secret-setup = (lib.strings.concatStringsSep "\n" (builtins.map (u: "cp ${u.userPasswordFile} /var/lib/pw/") jupyterUsers));
in
{
sops.secrets.hashed-password-0xa = {
path = "/var/lib/pw/hashed-password-0xa";
};
sops.secrets.hashed-password-0xa = { };
virtualisation.docker = {
enable = true;
@ -55,4 +56,11 @@ in
};
};
systemd.services.setup-docker-pws = {
description = "copy the user passwords to docker volume";
wantedBy = [ "jupyterlab-stateful.service" ];
serviceConfig.type = "oneshot";
script = secret-setup;
};
}