Skip to content

Commit

Permalink
refactor: hide op-ssh-sign behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Oct 5, 2023
1 parent 1b3bca7 commit 9869ea7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/home/tools/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ in
userName = mkOpt types.str user.fullName "The name to configure git with.";
userEmail = mkOpt types.str user.email "The email to configure git with.";
wslAgentBridge = mkBoolOpt false "Whether to enable the wsl agent bridge.";
_1password = mkBoolOpt false "Whether to enable 1Password integration.";
};

config = mkIf cfg.enable {
Expand Down Expand Up @@ -268,9 +269,9 @@ in
};

gpg.format = "ssh";
# "gpg \"ssh\"".program = ''''
# + ''${lib.optionalString pkgs.stdenv.isLinux (getExe' pkgs._1password-gui-beta "op-ssh-sign")}''
# + ''${lib.optionalString pkgs.stdenv.isDarwin "${pkgs._1password-gui-beta}/Applications/1Password.app/Contents/MacOS/op-ssh-sign"}'';
"gpg \"ssh\"".program = mkIf cfg._1password (''''
+ ''${lib.optionalString pkgs.stdenv.isLinux (getExe' pkgs._1password-gui-beta "op-ssh-sign")}''
+ ''${lib.optionalString pkgs.stdenv.isDarwin "${pkgs._1password-gui-beta}/Applications/1Password.app/Contents/MacOS/op-ssh-sign"}'');

init = {
defaultBranch = "main";
Expand Down

0 comments on commit 9869ea7

Please sign in to comment.