Files
nixos/modules/graphics/grayscale.nix
2025-11-01 23:13:42 +01:00

29 lines
711 B
Nix

{ config, pkgs, ... }:
let
user = "jonas";
uid = "1000";
in {
systemd.user.services.hyprshade-toggle = {
description = "Toggle Hyprshade grayscale";
enable = true;
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash /home/${user}/projects/scripts/shell/toggle_grayscale.sh";
Environment = ''
PATH=/home/jonas/.nix-profile/bin:/run/current-system/sw/bin:/usr/bin:${pkgs.hyprshade}/bin
'';
};
};
systemd.user.timers.hyprshade-toggle = {
description = "Run hyprshade toggle";
timerConfig = {
OnBootSec = "1min";
OnUnitActiveSec = "3min";
AccuracySec = "30s";
};
wantedBy = [ "timers.target" ];
};
}