This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/applications/gammastep.nix

40 lines
860 B
Nix
Raw Normal View History

2022-03-08 04:35:44 +00:00
{ options, config, lib, pkgs, ... }:
let
2022-08-14 02:42:16 +00:00
this = config.my.application.gammastep;
2022-08-14 02:42:04 +00:00
i3 = config.my.application.i3;
2022-03-08 04:35:44 +00:00
in with lib; {
options = {
2022-08-14 02:42:04 +00:00
my.application.gammastep.enable = mkOption {
default = i3.enable;
2022-03-24 04:00:26 +00:00
type = with types; bool;
2022-03-08 04:35:44 +00:00
};
};
2022-08-14 02:42:16 +00:00
config = mkIf this.enable {
2022-03-08 04:35:44 +00:00
home-manager.users.james = {
services.gammastep = {
enable = true;
provider = "geoclue2";
tray = true;
};
};
services.geoclue2.enable = true;
systemd.user.services.gammastep = {
enable = true;
description = "Nightly color shifting";
wantedBy = [ "i3-session.target" ];
2022-03-08 04:35:44 +00:00
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.gammastep}/bin/gammastep
'';
RestartSec = 5;
Restart = "always";
};
};
};
}