xsettingsd: add service module
This commit is contained in:
parent
f56a087cbc
commit
c476cc61b2
|
@ -2125,6 +2125,14 @@ in
|
|||
A new module is available: 'programs.sm64ex'.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2021-07-15T13:38:32+00:00";
|
||||
condition = hostPlatform.isLinux;
|
||||
message = ''
|
||||
A new module is available: 'services.xsettingsd'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -229,6 +229,7 @@ let
|
|||
(loadModule ./services/xembed-sni-proxy.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/xidlehook.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/xscreensaver.nix { })
|
||||
(loadModule ./services/xsettingsd.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./services/xsuspender.nix { condition = hostPlatform.isLinux; })
|
||||
(loadModule ./systemd.nix { })
|
||||
(loadModule ./targets/darwin { condition = hostPlatform.isDarwin; })
|
||||
|
|
44
modules/services/xsettingsd.nix
Normal file
44
modules/services/xsettingsd.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue