home: migrate redShift options to desktop

This commit is contained in:
Aly Raffauf 2024-07-30 16:14:44 -04:00
parent d1e491c2ba
commit 8300afbdd0
3 changed files with 8 additions and 14 deletions

View file

@ -133,7 +133,7 @@ in {
(lib.getExe pkgs.mako) (lib.getExe pkgs.mako)
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1" "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
] ]
++ lib.lists.optional (cfg.desktop.hyprland.redShift) ++ lib.lists.optional (cfg.desktop.redShift)
"${lib.getExe pkgs.gammastep} -l 33.74:-84.38" "${lib.getExe pkgs.gammastep} -l 33.74:-84.38"
++ lib.lists.optional (cfg.desktop.randomWallpaper) ++ lib.lists.optional (cfg.desktop.randomWallpaper)
helpers.wallpaperD helpers.wallpaperD

View file

@ -165,7 +165,7 @@ in {
{command = lib.getExe' pkgs.swayosd "swayosd-server";} {command = lib.getExe' pkgs.swayosd "swayosd-server";}
{command = lib.getExe pkgs.mako;} {command = lib.getExe pkgs.mako;}
] ]
++ lib.optional cfg.desktop.sway.redShift ++ lib.optional cfg.desktop.redShift
{command = "${lib.getExe pkgs.gammastep} -l 33.74:-84.38";} {command = "${lib.getExe pkgs.gammastep} -l 33.74:-84.38";}
++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";} ++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";}
++ lib.optional (!cfg.desktop.randomWallpaper) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";}; ++ lib.optional (!cfg.desktop.randomWallpaper) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";};

View file

@ -119,6 +119,12 @@ in {
type = lib.types.bool; type = lib.types.bool;
}; };
redShift = lib.mkOption {
description = "Whether to redshift display colors at night.";
default = cfg.desktop.hyprland.enable || cfg.desktop.sway.enable;
type = lib.types.bool;
};
hyprland = { hyprland = {
enable = lib.mkOption { enable = lib.mkOption {
description = "Hyprland with full desktop session components."; description = "Hyprland with full desktop session components.";
@ -138,12 +144,6 @@ in {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
}; };
redShift = lib.mkOption {
description = "Whether to redshift display colors at night.";
default = cfg.desktop.hyprland.enable;
type = lib.types.bool;
};
windowManagerBinds = lib.mkOption { windowManagerBinds = lib.mkOption {
description = "Default binds for window management."; description = "Default binds for window management.";
default = { default = {
@ -195,12 +195,6 @@ in {
type = lib.types.bool; type = lib.types.bool;
}; };
redShift = lib.mkOption {
description = "Whether to redshift display colors at night.";
default = cfg.desktop.sway.enable;
type = lib.types.bool;
};
windowManagerBinds = lib.mkOption { windowManagerBinds = lib.mkOption {
description = "Default binds for window management."; description = "Default binds for window management.";
default = { default = {