Fix errors
This commit is contained in:
@@ -22,7 +22,5 @@ in
|
|||||||
"PORT=3709"
|
"PORT=3709"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
ConditionPathIsDirectory = projectDir;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user