Add redshift

> Redshift adjusts the color temperature of your screen according to
your surroundings. This may help your eyes hurt less if you are working
in front of the screen at night.

https://github.com/jonls/redshift
https://nixos.wiki/wiki/Redshift
This commit is contained in:
Oliver Davies 2025-03-13 21:46:08 +00:00
parent d2f5001e7e
commit 5ae7c016f3
3 changed files with 33 additions and 0 deletions

View file

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

View file

@ -2,6 +2,7 @@
imports = [
./cron.nix
./interception-tools.nix
./redshift.nix
./sound.nix
./udev.nix
./xserver.nix

View file

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