diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-07-09 00:34:46 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-07-09 00:34:46 +0530 |
| commit | 3a6f2ce2a2334c514c5310aa58cab626775d3e01 (patch) | |
| tree | 96af9971a43047a758956a8c7b79dcb541e01867 /modules/programs | |
| parent | 6941090be12bb5eae7edd76ec19c255536802493 (diff) | |
| download | home-manager-config-3a6f2ce2a2334c514c5310aa58cab626775d3e01.tar.gz home-manager-config-3a6f2ce2a2334c514c5310aa58cab626775d3e01.zip | |
fix: some minor typos
Diffstat (limited to 'modules/programs')
| -rw-r--r-- | modules/programs/git/default.nix | 16 | ||||
| -rw-r--r-- | modules/programs/pass/default.nix | 48 |
2 files changed, 34 insertions, 30 deletions
diff --git a/modules/programs/git/default.nix b/modules/programs/git/default.nix index bd91511..3d367df 100644 --- a/modules/programs/git/default.nix +++ b/modules/programs/git/default.nix @@ -12,14 +12,17 @@ type = lib.types.str; description = "Git username."; }; + email = lib.mkOption { type = lib.types.str; description = "Git email."; }; + + useSSH = lib.mkEnableOption "Use SSH instead of HTTPS for common git platforms."; }; config = lib.mkIf config.programs.git.enable { - home.packages = lib.mkIfconfig config.programs.pass.enable [ pkgs.pass-git-helper ]; + home.packages = lib.mkIf config.programs.pass.enable [ pkgs.pass-git-helper ]; programs.git = { settings = @@ -32,11 +35,12 @@ core.askPass = ""; } ( - lib.optionalAttrs config.programs.pass.enable { - credential."https://github.com" = { - username = config.programs.pass.github.username; - helper = lib.getExe pkgs.pass-git-helper; - }; + lib.optionalAttrs config.programs.git.useSSH { + url."git@github.com:".insteadOf = "https://github.com/"; + url."git@gitlab.com:".insteadOf = "https://gitlab.com/"; + url."git@bitbucket.org:".insteadOf = "https://bitbucket.org/"; + url."git@codeberg.org:".insteadOf = "https://codeberg.org/"; + url."git@git.sr.ht:".insteadOf = "https://git.sr.ht/"; } ); }; diff --git a/modules/programs/pass/default.nix b/modules/programs/pass/default.nix index d5067b9..0455d31 100644 --- a/modules/programs/pass/default.nix +++ b/modules/programs/pass/default.nix @@ -19,35 +19,35 @@ }; }; - config = lib.mkIf config.program.pass.enable { + config = lib.mkIf config.programs.pass.enable { programs.password-store = { enable = true; - package = config.program.pass.package; + package = config.programs.pass.package; settings = { - PASSWORD_STORE_DIR = config.program.pass.storeDir; + PASSWORD_STORE_DIR = config.programs.pass.storeDir; }; }; - home.file.".config/pass-git-helper/git-pass-mapping.ini".text = '' - [github.com] - target = github/token - username = ${config.program.pass.github.username} - username_extractor = static - - [github.com/*] - target = github/token - username = ${config.program.pass.github.username} - username_extractor = static - - [*.github.com] - target = github/token - username = ${config.program.pass.github.username} - username_extractor = static - - [*.github.com/*] - target = github/token - username = ${config.program.pass.github.username} - username_extractor = static - ''; + # home.file.".config/pass-git-helper/git-pass-mapping.ini".text = '' + # [github.com] + # target = github/token + # username = ${config.programs.pass.github.username} + # username_extractor = static + # + # [github.com/*] + # target = github/token + # username = ${config.programs.pass.github.username} + # username_extractor = static + # + # [*.github.com] + # target = github/token + # username = ${config.programs.pass.github.username} + # username_extractor = static + # + # [*.github.com/*] + # target = github/token + # username = ${config.programs.pass.github.username} + # username_extractor = static + # ''; }; } |
