Commit 2faaee5b30ab
Changed files (1)
home
common
services
home/common/services/nextmeeting.nix
@@ -1,77 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-
-with lib;
-
-let
- cfg = config.services.nextmeeting;
- tomlFormat = pkgs.formats.toml { };
-in
-{
- options.services.nextmeeting = {
- enable = mkEnableOption "nextmeeting calendar widget for waybar";
-
- package = mkOption {
- type = types.package;
- default = pkgs.nextmeeting;
- description = "The nextmeeting package to use";
- };
-
- settings = mkOption {
- type = tomlFormat.type;
- default = { };
- example = literalExpression ''
- {
- nextmeeting = {
- calendar = "Work";
- max-title-length = 30;
- today-only = true;
- };
- }
- '';
- description = "Configuration for nextmeeting in TOML format";
- };
-
- waybar = {
- enable = mkOption {
- type = types.bool;
- default = true;
- description = "Enable waybar integration";
- };
-
- maxTitleLength = mkOption {
- type = types.int;
- default = 30;
- description = "Maximum title length for waybar display";
- };
-
- notifyMinBefore = mkOption {
- type = types.int;
- default = 5;
- description = "Minutes before meeting to trigger 'soon' class";
- };
-
- extraArgs = mkOption {
- type = types.listOf types.str;
- default = [ ];
- example = [
- "--calendar=Work"
- "--google-domain=example.com"
- ];
- description = "Extra arguments to pass to nextmeeting";
- };
- };
- };
-
- config = mkIf cfg.enable {
- home.packages = [ cfg.package ];
-
- xdg.configFile."nextmeeting/config.toml" = mkIf (cfg.settings != { }) {
- source = tomlFormat.generate "nextmeeting-config" cfg.settings;
- };
- };
-}