Set the release node to allow multi-user use

This commit is contained in:
bluepython508
2024-09-23 10:00:50 +01:00
parent 0172c68e09
commit 5e65fad33d
3 changed files with 3 additions and 2 deletions

2
.envrc
View File

@@ -1,4 +1,4 @@
use flake
export RELEASE_NODE=frajtano-test@nomos
export RELEASE_NODE=frajtano-test@
export FRAJTANO_DIR=$PWD/.frajtano_state

View File

@@ -25,6 +25,7 @@
file="$FRAJTANO_DIR/cookie"
(umask 077; [ -f "$file" ] || ${pkgs.coreutils}/bin/head -c 128 /dev/urandom | ${pkgs.coreutils}/bin/base64 -w0 > "$file")
export RELEASE_COOKIE=$(${pkgs.coreutils}/bin/cat "$file")
export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)"
run() {
exec ${lib.getExe pkg} "$@"
}

View File

@@ -50,7 +50,7 @@
systemd.user.services.frajtano = {
Unit.Description = "frajtano";
Unit.After = ["default.target"];
Service.Environment = "'FRAJTANO_DIR=${cfg.dir}'";
Service.Environment = ["'FRAJTANO_DIR=${cfg.dir}'"];
Service.ExecStart = "${self.packages.${pkgs.system}.default}/bin/frajtano start";
Install.WantedBy = ["default.target"];
};