flocon/modules/services/gammastep.nix
Anthony Rodriguez fc876b2ea5
treewide: update options API
The options API has been updated, in order for a more flexible setup
with `local.modules.desktop.enable` being replaced with an enum of
desktops at `local.systemVars.desktop`, which allows for switching
desktop environments by changing a single option. This is so that we can
switch to cosmic and only enable the programs we need (i.e. disable
greetd because we use cosmic-greeter and enable terminals since that is
desktop related). This is simpler than having a different module per
desktop.
2025-02-06 18:47:01 +01:00

37 lines
942 B
Nix

{
lib,
pkgs,
config,
...
}: let
inherit (config.local.systemVars) username;
toINI = lib.generators.toINI {};
in {
config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = {
packages = [pkgs.gammastep];
files = {
".config/gammastep/config.ini".text = toINI {
general = {
location-provider = "geoclue2";
temp-day = 5500;
temp-night = 3700;
};
};
};
};
systemd.user.services.gammastep = {
description = "Gammastep colour temperature adjuster";
after = ["graphical-session.target"];
wants = ["geoclue-agent.service"];
wantedBy = ["graphical-session.target"];
serviceConfig = {
ExecStart = "${pkgs.gammastep}/bin/gammastep-indicator";
Restart = "on-failure";
RestartSec = 3;
Slice = "background-graphical.slice";
};
};
};
}