aboutsummaryrefslogtreecommitdiff
path: root/homes/floppydisk/ssh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'homes/floppydisk/ssh.nix')
-rw-r--r--homes/floppydisk/ssh.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/homes/floppydisk/ssh.nix b/homes/floppydisk/ssh.nix
new file mode 100644
index 0000000..99e77c5
--- /dev/null
+++ b/homes/floppydisk/ssh.nix
@@ -0,0 +1,17 @@
+{
+ nixosConfig,
+ config,
+ lib,
+ ...
+}: let
+ _1passwordAgent = {
+ enable = nixosConfig != {} && nixosConfig.programs._1password-gui.enable && nixosConfig.programs._1password-gui.sshAgent;
+ path = "${config.home.homeDirectory}/.1password/agent.sock";
+ };
+in {
+ programs.ssh = {
+ enable = true;
+ forwardAgent = _1passwordAgent.enable;
+ extraConfig = lib.optionalString _1passwordAgent.enable "IdentityAgent ${_1passwordAgent.path}";
+ };
+} \ No newline at end of file