From b5873230950e9d4dfcc4900db1e60db4ff3dacc7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 10 Jun 2022 16:19:44 +0200 Subject: [PATCH] home: migrate 'cursor' module to new option Make it part of 'home.wm' now, since that makes more sense. Not sure about making it related to 'i3' being activated though, will need to think about this in the future. --- home/wm/cursor/default.nix | 23 +++++++++++++++++++++++ home/wm/default.nix | 5 +++++ home/x/cursor/default.nix | 12 ------------ home/x/default.nix | 1 - 4 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 home/wm/cursor/default.nix delete mode 100644 home/x/cursor/default.nix diff --git a/home/wm/cursor/default.nix b/home/wm/cursor/default.nix new file mode 100644 index 0000000..9426232 --- /dev/null +++ b/home/wm/cursor/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.wm.cursor; + + cfg_x = config.my.home.x; + cfg_gtk = config.my.home.gtk; +in +{ + config = lib.mkIf cfg.enable { + home.pointerCursor = { + package = pkgs.ambroisie.vimix-cursors; + name = "Vimix-cursors"; + + x11 = { + inherit (cfg_x) enable; + }; + + gtk = { + inherit (cfg_gtk) enable; + }; + }; + }; +} diff --git a/home/wm/default.nix b/home/wm/default.nix index 1d5a371..fb9ecee 100644 --- a/home/wm/default.nix +++ b/home/wm/default.nix @@ -10,6 +10,7 @@ let in { imports = [ + ./cursor ./dunst ./i3 ./i3bar @@ -25,6 +26,10 @@ in description = "Which window manager to use for home session"; }; + cursor = { + enable = mkRelatedOption "dunst configuration" [ "i3" ]; + }; + dunst = { enable = mkRelatedOption "dunst configuration" [ "i3" ]; }; diff --git a/home/x/cursor/default.nix b/home/x/cursor/default.nix deleted file mode 100644 index 4762199..0000000 --- a/home/x/cursor/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.my.home.x; -in -{ - config = lib.mkIf cfg.enable { - xsession.pointerCursor = { - package = pkgs.ambroisie.vimix-cursors; - name = "Vimix-cursors"; - }; - }; -} diff --git a/home/x/default.nix b/home/x/default.nix index ac66a50..0312bc4 100644 --- a/home/x/default.nix +++ b/home/x/default.nix @@ -4,7 +4,6 @@ let in { imports = [ - ./cursor ./keyboard ];