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.
This commit is contained in:
Bruno BELANYI 2022-06-10 16:19:44 +02:00
parent e81af8b3bc
commit b587323095
4 changed files with 28 additions and 13 deletions

View file

@ -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;
};
};
};
}

View file

@ -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" ];
};

View file

@ -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";
};
};
}

View file

@ -4,7 +4,6 @@ let
in
{
imports = [
./cursor
./keyboard
];