diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index c063abb6..30d97293 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -19,6 +19,7 @@ autorandr.enable = true; dwm.enable = true; gaming.enable = true; + redshift.enable = true; st.enable = true; thunar.enable = true; peek.enable = true; diff --git a/nix/hosts/t490/services/default.nix b/nix/hosts/t490/services/default.nix index ce7ea823..ef7c3c7b 100644 --- a/nix/hosts/t490/services/default.nix +++ b/nix/hosts/t490/services/default.nix @@ -2,6 +2,7 @@ imports = [ ./cron.nix ./interception-tools.nix + ./redshift.nix ./sound.nix ./udev.nix ./xserver.nix diff --git a/nix/hosts/t490/services/redshift.nix b/nix/hosts/t490/services/redshift.nix new file mode 100644 index 00000000..3fcfdf4f --- /dev/null +++ b/nix/hosts/t490/services/redshift.nix @@ -0,0 +1,31 @@ +{ config, lib, ... }: + +with lib; + +let + cfg = config.nixosModules.redshift; +in +{ + options.nixosModules.redshift.enable = mkEnableOption "Enable redshift"; + + config = mkIf cfg.enable { + location = { + latitude = 51.48; + longitude = -3.17; + }; + + services.redshift = { + enable = true; + + brightness = { + day = "1"; + night = "1"; + }; + + temperature = { + day = 5500; + night = 3700; + }; + }; + }; +}