From ed79fd3d8c434deaa3e29062ecb772a6f3bab0c2 Mon Sep 17 00:00:00 2001 From: Florian Schmitt Date: Tue, 17 Dec 2024 12:44:13 +0300 Subject: [PATCH] fix(inventory): more clean cp for nixin --- inventory/nixin.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/inventory/nixin.nix b/inventory/nixin.nix index 82c646c..77e84b0 100644 --- a/inventory/nixin.nix +++ b/inventory/nixin.nix @@ -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" = {