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.
2022-03-08 04:35:44 +00:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.this.application.gammastep;
|
2022-04-27 03:48:18 +00:00
|
|
|
i3 = config.this.application.i3;
|
2022-03-08 04:35:44 +00:00
|
|
|
in with lib; {
|
|
|
|
options = {
|
2022-03-24 04:00:26 +00:00
|
|
|
this.application.gammastep.enable = mkOption {
|
2022-07-13 02:24:13 +00:00
|
|
|
default = i3.enable;
|
2022-03-24 04:00:26 +00:00
|
|
|
type = with types; bool;
|
2022-03-08 04:35:44 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
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";
|
2022-07-13 02:24:13 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|