Fix errors
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user