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
+5 -4
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
let
thisDir = ./.;
@@ -7,8 +7,8 @@ let
#!${pkgs.bash}/bin/bash
set -euo pipefail
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"
end
${pkgs.age}/bin/age -d -i "${config.users.users."me".home}/.ssh/id_ed25519" "${thisDir}/secrets.age" > /run/secrets.env
fi
'';
in
{
@@ -16,9 +16,10 @@ in
systemd.services.unlocker = {
description = "Secrets manager";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
StandardOutput = "file:/run/secrets.env";
User = "root";
RemainAfterExit = true;
};
script = "${unlocker}/bin/unlocker";