python-ci: création utilisateur
Permet d'utiliser un RuntimeDir public
This commit is contained in:
parent
5a6a41fe2d
commit
72d0802b67
@ -12,6 +12,14 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
python-ci = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "nogroup";
|
||||||
|
description = "Python CI user";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.python-ci = {
|
systemd.services.python-ci = {
|
||||||
description = "CI Nix en Python";
|
description = "CI Nix en Python";
|
||||||
requires = ["network-online.target"];
|
requires = ["network-online.target"];
|
||||||
@ -19,7 +27,7 @@ in
|
|||||||
environment = { HOME = "/var/lib/python-ci"; NIX_PATH = concatStringsSep ":" config.nix.nixPath; NIXPKGS_ALLOW_UNFREE = "1";};
|
environment = { HOME = "/var/lib/python-ci"; NIX_PATH = concatStringsSep ":" config.nix.nixPath; NIXPKGS_ALLOW_UNFREE = "1";};
|
||||||
path = with pkgs;[ nix gnutar gzip ];
|
path = with pkgs;[ nix gnutar gzip ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
User = "python-ci";
|
||||||
StateDirectory = "python-ci";
|
StateDirectory = "python-ci";
|
||||||
RuntimeDirectory = "python-ci";
|
RuntimeDirectory = "python-ci";
|
||||||
RuntimeDirectoryPreserve = "yes";
|
RuntimeDirectoryPreserve = "yes";
|
||||||
|
Loading…
Reference in New Issue
Block a user