This commit is contained in:
Peder Bergebakken Sundt 2023-08-27 01:05:41 +02:00
parent 34134cd81c
commit 63eb73afbf

View File

@ -86,29 +86,26 @@
}; };
}; };
config = { config = {
systemd.services.grzegorz = lib.mkIf cfg.enable { services.cage.enable = true;
description = "grzegorz"; services.cage.program = pkgs.writeShellScript "grzegorz-kiosk" ''
wantedBy = [ "default.target" ]; cd $(mktemp -d)
serviceConfig = { ${(lib.escapeShellArgs [
User = "grzegorz"; "${cfg.package}/bin/grzegorz-run"
Group = "grzegorz"; "--host" cfg.listenAddr
DynamicUser = true; "--port" cfg.listenPort
#StateDirectory = "grzegorz"; ])}
#CacheDirectory = "grzegorz"; '';
ExecStart = lib.escapeShellArgs [ services.cage.user = "grzegorz";
"${pkgs.cage}/bin/cage" users.users."grzegorz".isNormalUser = true;
"--" system.activationScripts = {
"${cfg.package}/bin/grzegorz-run" base-dirs = {
"--host" cfg.listenAddr text = ''
"--port" cfg.listenPort mkdir -p /nix/var/nix/profiles/per-user/grzegorz
]; '';
Restart = "on-failure"; deps = [];
}; };
}; };
}; };
}; };
}; };
} }