1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00
home-manager/modules/services/xsettingsd.nix
2021-07-15 15:47:42 +02:00

44 lines
981 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.xsettingsd;
in {
meta.maintainers = [ maintainers.imalison ];
options = {
services.xsettingsd = {
enable = mkEnableOption "xsettingsd";
package = mkOption {
type = types.package;
default = pkgs.xsettingsd;
defaultText = literalExample "pkgs.xsettingsd";
description = ''
Package containing the <command>xsettingsd</command> program.
'';
};
};
};
config = mkIf cfg.enable {
systemd.user.services.xsettingsd = {
Unit = {
Description = "xsettingsd";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${cfg.package}/bin/xsettingsd";
Restart = "on-abort";
};
};
};
}