diff options
author | Profpatsch <mail@profpatsch.de> | 2017-06-01 19:55:06 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-06-01 19:55:06 +0200 |
commit | 49eecfdb966eb02efa5b370cb231eb2fe85a3541 (patch) | |
tree | 01c7d04637ba7bcd599f0fa05f6312be7b33a329 /modules/user/openlab/stackenblocken.nix | |
parent | e6115ed089075eaa7e2eab430d48a5f51a16ab6e (diff) |
stackenblocken: add volume option
Diffstat (limited to 'modules/user/openlab/stackenblocken.nix')
-rw-r--r-- | modules/user/openlab/stackenblocken.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/user/openlab/stackenblocken.nix b/modules/user/openlab/stackenblocken.nix index 6fc3d674..4a5630fe 100644 --- a/modules/user/openlab/stackenblocken.nix +++ b/modules/user/openlab/stackenblocken.nix @@ -4,11 +4,20 @@ with lib; let cfg = config.vuizvui.user.openlab.stackenblocken; + package = lib.getBin pkgs.vuizvui.openlab.stackenblocken.override { + volumePercent = cfg.volume; + }; in { options.vuizvui.user.openlab.stackenblocken = { enable = mkEnableOption "STACKENBLOCKEN EVERY DAY"; + + volume = mkOption { + description = "Volume in percent"; + default = 50; + type = types.addCheck types.int (x: x >= 0 && x <= 100); + }; }; config = mkIf cfg.enable { @@ -18,7 +27,7 @@ in description = "stackenblocken timer"; # wantedBy = [ "default.target" ]; serviceConfig = { - ExecStart = "${lib.getBin pkgs.vuizvui.openlab.stackenblocken}/bin/stackenblocken"; + ExecStart = "${package}/bin/stackenblocken"; }; # everyday at 21:45, except Wednesday (Yoga silence) startAt = [ "Mon,Tue,Thu,Fri,Sat,Sun 21:45" "Wed 22:00" ]; |