2021-07-13 07:59:37 +02:00
|
|
|
{ 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 {
|
2021-07-07 23:24:27 +02:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.xsettingsd" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2021-07-13 07:59:37 +02:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|