diff options
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" ]; |