From 72d0802b67696909f387980a099805686d843de7 Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Wed, 8 Jan 2020 01:29:31 +0100 Subject: [PATCH] =?UTF-8?q?python-ci:=20cr=C3=A9ation=20utilisateur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permet d'utiliser un RuntimeDir public --- services/python-ci.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/python-ci.nix b/services/python-ci.nix index 2523d8f65..5a6a4c43a 100644 --- a/services/python-ci.nix +++ b/services/python-ci.nix @@ -12,6 +12,14 @@ in config = mkIf cfg.enable { + users.users = { + python-ci = { + isSystemUser = true; + group = "nogroup"; + description = "Python CI user"; + }; + }; + systemd.services.python-ci = { description = "CI Nix en Python"; 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";}; path = with pkgs;[ nix gnutar gzip ]; serviceConfig = { - DynamicUser = true; + User = "python-ci"; StateDirectory = "python-ci"; RuntimeDirectory = "python-ci"; RuntimeDirectoryPreserve = "yes";