home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
44
modules/home/gammastep/default.nix
Normal file
44
modules/home/gammastep/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.gammastep;
|
||||
|
||||
mkTempOption = with lib; description: default: mkOption {
|
||||
inherit description default;
|
||||
type = types.int;
|
||||
example = 1000;
|
||||
};
|
||||
|
||||
mkTimeOption = with lib; description: default: mkOption {
|
||||
inherit description default;
|
||||
type = types.str;
|
||||
example = "12:00-14:00";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.home.gammastep = with lib; {
|
||||
enable = mkEnableOption "gammastep configuration";
|
||||
|
||||
temperature = {
|
||||
day = mkTempOption "Colour temperature to use during the day" 6500;
|
||||
night = mkTempOption "Colour temperature to use during the night" 2000;
|
||||
};
|
||||
|
||||
times = {
|
||||
dawn = mkTimeOption "Dawn time" "6:00-7:30";
|
||||
dusk = mkTimeOption "Dusk time" "18:30-20:00";
|
||||
};
|
||||
};
|
||||
|
||||
config.services.gammastep = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
tray = true;
|
||||
|
||||
dawnTime = cfg.times.dawn;
|
||||
duskTime = cfg.times.dusk;
|
||||
|
||||
temperature = {
|
||||
inherit (cfg.temperature) day night;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue