diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 0457d2c7..7076e268 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -130,8 +130,6 @@ in { (lib.getExe pkgs.waybar) (lib.getExe pkgs.wayland-pipewire-idle-inhibit) ] - ++ lib.lists.optional (cfg.desktop.redShift) - "${lib.getExe pkgs.gammastep} -l 33.74:-84.38" ++ lib.lists.optional (cfg.desktop.randomWallpaper) helpers.wallpaperD ++ lib.lists.optional (!cfg.desktop.randomWallpaper) diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 7b20c661..67a1e10f 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -162,8 +162,6 @@ in { {command = lib.getExe pkgs.mako;} {command = lib.getExe pkgs.wayland-pipewire-idle-inhibit;} ] - ++ lib.optional cfg.desktop.redShift - {command = "${lib.getExe pkgs.gammastep} -l 33.74:-84.38";} ++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";} ++ lib.optional (!cfg.desktop.randomWallpaper) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";}; diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index e3f6f188..a55a4d2d 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -205,6 +205,8 @@ in { type = lib.types.str; }; }; + + gammastep.enable = lib.mkEnableOption "Gammastep redshift daemon."; easyeffects = { enable = lib.mkEnableOption "EasyEffects user service."; diff --git a/homeManagerModules/services/default.nix b/homeManagerModules/services/default.nix index 2fd584ce..cd6882b7 100644 --- a/homeManagerModules/services/default.nix +++ b/homeManagerModules/services/default.nix @@ -1,6 +1,7 @@ { imports = [ ./easyeffects + ./gammastep ./mpd ./swayidle ]; diff --git a/homeManagerModules/services/gammastep/default.nix b/homeManagerModules/services/gammastep/default.nix new file mode 100644 index 00000000..e5aa63ea --- /dev/null +++ b/homeManagerModules/services/gammastep/default.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.ar.home; +in { + config = lib.mkIf (cfg.services.gammastep.enable || cfg.desktop.redShift) { + services.gammastep = { + enable = true; + latitude = lib.mkDefault "33.74"; + longitude = lib.mkDefault "-84.38"; + }; + }; +}