diff options
author | Nikita Uvarov <uv.nikita@gmail.com> | 2017-09-13 13:31:10 +0200 |
---|---|---|
committer | Nikita Uvarov <uv.nikita@gmail.com> | 2017-09-13 14:40:30 +0200 |
commit | aa69598b5742024ebaee0c861585269f77ef1a5f (patch) | |
tree | 268a854c13b915d0248395320d2ecc0e324d3b37 /modules/services/compton.nix | |
parent | f47084968dc7be2f4eeb77872cd9fe3bf8243998 (diff) |
compton: add module
Diffstat (limited to 'modules/services/compton.nix')
-rw-r--r-- | modules/services/compton.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/services/compton.nix b/modules/services/compton.nix new file mode 100644 index 00000000000..e1c349971db --- /dev/null +++ b/modules/services/compton.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + options = { + services.compton = { + enable = mkEnableOption "Compton X11 compositor"; + }; + }; + + config = mkIf config.services.compton.enable { + systemd.user.services.compton = { + Unit = { + Description = "Compton X11 compositor"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.compton}/bin/compton"; + }; + }; + }; +} |