Fix errors

This commit is contained in:
2026-07-07 09:38:19 +01:00
parent 822f654d6a
commit c7ada99ab3
2 changed files with 5 additions and 6 deletions
-2
View File
@@ -22,7 +22,5 @@ in
"PORT=3709" "PORT=3709"
]; ];
}; };
ConditionPathIsDirectory = projectDir;
}; };
} }
+5 -4
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
let let
thisDir = ./.; thisDir = ./.;
@@ -7,8 +7,8 @@ let
#!${pkgs.bash}/bin/bash #!${pkgs.bash}/bin/bash
set -euo pipefail set -euo pipefail
if [[ -f "${thisDir}/secrets.age" && -f "${config.users.users."me".home}/.ssh/id_ed25519" ]]; then if [[ -f "${thisDir}/secrets.age" && -f "${config.users.users."me".home}/.ssh/id_ed25519" ]]; then
${pkgs.age}/bin/age -d -i "${config.users.users."me".home}/.ssh/id_ed25519" "${thisDir}/secrets.age" ${pkgs.age}/bin/age -d -i "${config.users.users."me".home}/.ssh/id_ed25519" "${thisDir}/secrets.age" > /run/secrets.env
end fi
''; '';
in in
{ {
@@ -16,9 +16,10 @@ in
systemd.services.unlocker = { systemd.services.unlocker = {
description = "Secrets manager"; description = "Secrets manager";
wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
StandardOutput = "file:/run/secrets.env"; User = "root";
RemainAfterExit = true; RemainAfterExit = true;
}; };
script = "${unlocker}/bin/unlocker"; script = "${unlocker}/bin/unlocker";