Updated activation script. Fixed typo.

This commit is contained in:
Raphaël Numbus
2026-01-09 10:54:31 +01:00
parent 2e1ba1c0ff
commit 2760c8b32f
3 changed files with 27 additions and 11 deletions
+22 -6
View File
@@ -1,12 +1,28 @@
{ config, pkgs, ... }:
{
system.activationScripts.script.text = ''
#!/bin/bash
${pkgs.coreutils}/bin/mkdir -p /mnt/config/ /mnt/data/
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/config/
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/data/
systemd.services.numbus-activation = {
description = "Numbus Server Activation";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "local-fs.target" ];
serviceConfig = {
User = "numbus-admin";
Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ];
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
if [[ -e /etc/numbus-server/activated.true ]]; then
exit 0
fi
${pkgs.coreutils}/bin/mkdir -p /mnt/config/ /mnt/data/
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/config/
${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/data/
PODMAN_NETWORKS
'';
${pkgs.coreutils}/bin/touch /etc/numbus-server/activated.true
'';
};
}
+1 -1
View File
@@ -44,7 +44,7 @@ TRAEFIK_REF_NETWORKS
systemd.services.traefik = {
description = "Podman container : ${container_name}";
after = [ "network.target" ];
after = [ "network.target" "numbus-activation.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {