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 341450db5c
commit 530fb66e19
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
];