Avoid possible infinite recursion

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-16 17:46:58 +03:00
parent df781012fd
commit 566b4e0157
38 changed files with 216 additions and 187 deletions

View File

@@ -1,5 +1,5 @@
{
user ? throw "user argument is required",
username ? throw "username argument is required",
}:
{ config, ... }:
{
@@ -14,17 +14,17 @@
sops.secrets = {
# openssl genpkey -algorithm RSA -out key.pem -pkeyopt rsa_keygen_bits:3072
"syncthing/key" = {
owner = user.name;
owner = username;
group = "users";
};
# openssl req -new -x509 -key key.pem -out cert.pem -days 9999 -subj "/CN=syncthing"
"syncthing/cert" = {
owner = user.name;
owner = username;
group = "users";
};
};
home-manager.users.${user.name}.services.syncthing = {
home-manager.users.${username}.services.syncthing = {
enable = true;
key = config.sops.secrets."syncthing/key".path;
cert = config.sops.secrets."syncthing/cert".path;