Added Gammastep for redshifting
This commit is contained in:
parent
e4b8dec303
commit
be0749de49
|
@ -1 +1,3 @@
|
|||
{ config, pkgs, ... }: { imports = [ ./sway.nix ./mako.nix ./waybar.nix ]; }
|
||||
{ config, pkgs, ... }: {
|
||||
imports = [ ./sway.nix ./gammastep.nix ./mako.nix ./waybar.nix ];
|
||||
}
|
||||
|
|
41
modules/applications/sway/gammastep.nix
Normal file
41
modules/applications/sway/gammastep.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ options, config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.this.application.gammastep;
|
||||
sway = config.this.application.sway;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.application.gammastep = {
|
||||
enable = mkOption {
|
||||
default = sway.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
wantedBy = [ "sway-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.gammastep}/bin/gammastep
|
||||
'';
|
||||
RestartSec = 5;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user