diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-09-02 22:08:57 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-09-02 22:08:57 +0530 |
| commit | f6ef02e1a420b0bc79c05a04e572eb47ec7e0203 (patch) | |
| tree | 1442be6c6e475258248332cb35bbd7866551c7f0 /modules/office | |
| parent | 627c1f723302f949e28d9df5a3acb380186b4c44 (diff) | |
| parent | 5ac48b36e56d652d55272b77a6752558e630b3c7 (diff) | |
| download | home-manager-config-f6ef02e1a420b0bc79c05a04e572eb47ec7e0203.tar.gz home-manager-config-f6ef02e1a420b0bc79c05a04e572eb47ec7e0203.zip | |
Merge branch 'some-changes-to-git-usage'
Diffstat (limited to 'modules/office')
| -rw-r--r-- | modules/office/calcurse/default.nix | 17 |
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"; }; } ]; |
