Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

nixos/agent: fix release cookie reading

+6 -2
+6 -2
nix/nixos/agent.nix
··· 71 71 path = [ config.nix.package ]; 72 72 73 73 environment = { 74 - RELEASE_COOKIE = "%S/release-cookie"; 75 74 SHELL = lib.getExe pkgs.bash; 76 75 SOWER_CONFIG_FILE = "/etc/sower/client.json"; 77 76 }; ··· 96 95 ${lib.getExe pkgs.openssl} rand -hex 48 > release-cookie 97 96 fi 98 97 ''; 99 - ExecStart = "${lib.getExe cfg.package} start"; 98 + ExecStart = pkgs.writeShellScript "sower-agent-start" '' 99 + RELEASE_COOKIE=$(cat release-cookie) 100 + export RELEASE_COOKIE 101 + 102 + exec ${lib.getExe cfg.package} start 103 + ''; 100 104 ExecStop = "${lib.getExe cfg.package} stop"; 101 105 }; 102 106 };