aboutsummaryrefslogtreecommitdiffstats
path: root/modules/office/calcurse
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-09-02 17:57:50 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-09-02 17:57:50 +0530
commit1d7e16552cb230b0d35dcad01fb023990186c636 (patch)
tree9c152a11858de648d4d0df0c75e889793e49c782 /modules/office/calcurse
parentf4752f0cf338b89084cbf917b2de88113aeac9f7 (diff)
downloadhome-manager-config-1d7e16552cb230b0d35dcad01fb023990186c636.tar.gz
home-manager-config-1d7e16552cb230b0d35dcad01fb023990186c636.zip
feat(office/calcurse): option to use custom username and password for git remote
Diffstat (limited to 'modules/office/calcurse')
-rw-r--r--modules/office/calcurse/default.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix
index c72896e..3296f95 100644
--- a/modules/office/calcurse/default.nix
+++ b/modules/office/calcurse/default.nix
@@ -54,7 +54,19 @@ in
remote = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
- description = "Git remote URL for the calcurse data directory. When set, calcurse-sync uses it automatically on first init instead of prompting.";
+ description = "Git remote URL for the calcurse data directory. Use an https:// URL if 'credential' is configured. When set, calcurse-sync uses it automatically on first init instead of prompting.";
+ };
+ credential = {
+ username = lib.mkOption {
+ type = lib.types.nullOr lib.types.str;
+ default = null;
+ description = "Username for HTTPS git authentication against the calcurse remote.";
+ };
+ passwordGopassPath = lib.mkOption {
+ type = lib.types.nullOr lib.types.str;
+ default = null;
+ description = "gopass entry path holding the password or token used for HTTPS git authentication against the calcurse remote. E.g. 'git/calcurse-sync'.";
+ };
};
};
};
@@ -94,6 +106,9 @@ in
};
commit.gpgSign = false;
tag.gpgSign = false;
+ }
+ // lib.optionalAttrs (config.office.calcurse.sync.credential.passwordGopassPath != null) {
+ credential.helper = "!f() { echo username=${lib.escapeShellArg config.office.calcurse.sync.credential.username}; echo password=\"$(${config.security.gopass.package}/bin/gopass show -o ${lib.escapeShellArg config.office.calcurse.sync.credential.passwordGopassPath})\"; }; f";
};
}
];