Merge pull request #58458 from worldofpeace/colord/no-root

nixos/colord: don't run as root
This commit is contained in:
Silvan Mosberger 2019-03-30 04:06:55 +01:00 committed by GitHub
commit 81e2fb5303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -18,22 +18,23 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.colord ];
services.dbus.packages = [ pkgs.colord ];
services.udev.packages = [ pkgs.colord ];
environment.systemPackages = [ pkgs.colord ];
systemd.packages = [ pkgs.colord ];
systemd.services.colord = {
description = "Manage, Install and Generate Color Profiles";
serviceConfig = {
Type = "dbus";
BusName = "org.freedesktop.ColorManager";
ExecStart = "${pkgs.colord}/libexec/colord";
PrivateTmp = true;
};
environment.etc."tmpfiles.d/colord.conf".source = "${pkgs.colord}/lib/tmpfiles.d/colord.conf";
users.users.colord = {
home = "/var/lib/colord";
group = "colord";
};
users.groups.colord = {};
};
}

View file

@ -56,6 +56,7 @@ stdenv.mkDerivation rec {
"-Dlibcolordcompat=true"
"-Dsane=true"
"-Dvapi=true"
"-Ddaemon_user=colord"
];
nativeBuildInputs = [