aboutsummaryrefslogtreecommitdiff
path: root/modules/services/compton.nix
diff options
context:
space:
mode:
authorNikita Uvarov <uv.nikita@gmail.com>2017-09-13 13:31:10 +0200
committerNikita Uvarov <uv.nikita@gmail.com>2017-09-13 14:40:30 +0200
commitaa69598b5742024ebaee0c861585269f77ef1a5f (patch)
tree268a854c13b915d0248395320d2ecc0e324d3b37 /modules/services/compton.nix
parentf47084968dc7be2f4eeb77872cd9fe3bf8243998 (diff)
compton: add module
Diffstat (limited to 'modules/services/compton.nix')
-rw-r--r--modules/services/compton.nix29
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";
+ };
+ };
+ };
+}