home: run gammastep as service for redShift"

This commit is contained in:
Aly Raffauf 2024-08-02 14:59:22 -04:00
parent f8f1a48ce9
commit 15ad9f4cec
5 changed files with 19 additions and 4 deletions

View file

@ -130,8 +130,6 @@ in {
(lib.getExe pkgs.waybar) (lib.getExe pkgs.waybar)
(lib.getExe pkgs.wayland-pipewire-idle-inhibit) (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) ++ lib.lists.optional (cfg.desktop.randomWallpaper)
helpers.wallpaperD helpers.wallpaperD
++ lib.lists.optional (!cfg.desktop.randomWallpaper) ++ lib.lists.optional (!cfg.desktop.randomWallpaper)

View file

@ -162,8 +162,6 @@ in {
{command = lib.getExe pkgs.mako;} {command = lib.getExe pkgs.mako;}
{command = lib.getExe pkgs.wayland-pipewire-idle-inhibit;} {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 = "${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

@ -205,6 +205,8 @@ in {
type = lib.types.str; type = lib.types.str;
}; };
}; };
gammastep.enable = lib.mkEnableOption "Gammastep redshift daemon.";
easyeffects = { easyeffects = {
enable = lib.mkEnableOption "EasyEffects user service."; enable = lib.mkEnableOption "EasyEffects user service.";

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./easyeffects ./easyeffects
./gammastep
./mpd ./mpd
./swayidle ./swayidle
]; ];

View file

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