From 5e65fad33d639eb91babeb1e388eb6944db74644 Mon Sep 17 00:00:00 2001 From: bluepython508 <16466646+bluepython508@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:00:50 +0100 Subject: [PATCH] Set the release node to allow multi-user use --- .envrc | 2 +- default.nix | 1 + flake.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.envrc b/.envrc index a99a955..27f2f76 100644 --- a/.envrc +++ b/.envrc @@ -1,4 +1,4 @@ use flake -export RELEASE_NODE=frajtano-test@nomos +export RELEASE_NODE=frajtano-test@ export FRAJTANO_DIR=$PWD/.frajtano_state diff --git a/default.nix b/default.nix index 2af2dc3..8afc230 100644 --- a/default.nix +++ b/default.nix @@ -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} "$@" } diff --git a/flake.nix b/flake.nix index fef79fd..2ccc78f 100644 --- a/flake.nix +++ b/flake.nix @@ -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"]; };