fix(inventory): more clean cp for nixin

This commit is contained in:
Florian Schmitt 2024-12-17 12:44:13 +03:00
parent d0b1fdffdc
commit ed79fd3d8c

View file

@ -16,8 +16,8 @@ let
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/
cp -r $src/* $out/
mkdir -p $out
cp -r $src $out
'';
};
in
@ -178,15 +178,24 @@ in
systemd.services.forgejo.preStart =
let
adminCmd = "${lib.getExe config.services.forgejo.package} admin user";
forgejoCmd = "${lib.getExe config.services.forgejo.package}";
adminCmd = "${forgejoCmd} admin user";
pwd = "CHANGE ME !!!";
user = "operator";
mail = "root@forge.chmok.net";
in
''
# create admin
${adminCmd} create --admin --email "${mail}" --username ${user} --password "${pwd}" || true
## uncomment this line to change an admin user which was already created
# ${adminCmd} change-password --username ${user} --password "${pwd}" || true
# link forgejo runner and forgejo
${forgejoCmd} || true
# create nixin repository
# create password-store repository
'';
environment.systemPackages =
@ -214,6 +223,7 @@ in
mosh
htop
neovim
pass
];
services.nginx.virtualHosts."nixin.chmok.net" = {