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