1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

nixos/colord: don't run as root

Using systemd.packages because there's
a system colord service and colord-session user service
included.
This commit is contained in:
worldofpeace 2019-03-27 15:28:10 -04:00
parent 8137fa520b
commit f22fbe1175
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 = [