fix
This commit is contained in:
parent
34134cd81c
commit
63eb73afbf
31
flake.nix
31
flake.nix
@ -86,29 +86,26 @@
|
||||
};
|
||||
};
|
||||
config = {
|
||||
systemd.services.grzegorz = lib.mkIf cfg.enable {
|
||||
description = "grzegorz";
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
User = "grzegorz";
|
||||
Group = "grzegorz";
|
||||
DynamicUser = true;
|
||||
#StateDirectory = "grzegorz";
|
||||
#CacheDirectory = "grzegorz";
|
||||
ExecStart = lib.escapeShellArgs [
|
||||
"${pkgs.cage}/bin/cage"
|
||||
"--"
|
||||
services.cage.enable = true;
|
||||
services.cage.program = pkgs.writeShellScript "grzegorz-kiosk" ''
|
||||
cd $(mktemp -d)
|
||||
${(lib.escapeShellArgs [
|
||||
"${cfg.package}/bin/grzegorz-run"
|
||||
"--host" cfg.listenAddr
|
||||
"--port" cfg.listenPort
|
||||
];
|
||||
Restart = "on-failure";
|
||||
])}
|
||||
'';
|
||||
services.cage.user = "grzegorz";
|
||||
users.users."grzegorz".isNormalUser = true;
|
||||
system.activationScripts = {
|
||||
base-dirs = {
|
||||
text = ''
|
||||
mkdir -p /nix/var/nix/profiles/per-user/grzegorz
|
||||
'';
|
||||
deps = [];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user