server
This commit is contained in:
parent
241dda6b44
commit
7cfbd927bd
2 changed files with 24 additions and 20 deletions
|
@ -45,15 +45,15 @@
|
|||
# };
|
||||
};
|
||||
|
||||
# sops.secrets.forgejo-admin-password.owner = "forgejo";
|
||||
# systemd.services.forgejo.preStart = let
|
||||
# adminCmd = "${lib.getExe pkgs.forgejo} admin user";
|
||||
# pwd = config.sops.secrets.forgejo-admin-password;
|
||||
# user = "emenel"; # Note, Forgejo doesn't allow creation of an account named "admin"
|
||||
# in ''
|
||||
# ${adminCmd} create --admin --email "root@localhost" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
|
||||
# ## uncomment this line to change an admin user which was already created
|
||||
# # ${adminCmd} change-password --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
|
||||
# '';
|
||||
sops.secrets.forgejoemenel.owner = "forgejo";
|
||||
systemd.services.forgejo.preStart = let
|
||||
adminCmd = "${lib.getExe pkgs.forgejo} admin user";
|
||||
pwd = config.sops.secrets.forgejoemenel;
|
||||
user = "emenel"; # Note, Forgejo doesn't allow creation of an account named "admin"
|
||||
in ''
|
||||
${adminCmd} create --admin --email "root@localhost" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
|
||||
## uncomment this line to change an admin user which was already created
|
||||
# ${adminCmd} change-password --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue