Nix configurations for my personal machines (Linux & macOS)

home: point borgbase ssh to 1password agent

ovyerus.com 5208811a a1832ff2

verified
Changed files
+10 -6
home
modules
+10 -6
home/modules/ssh.nix
···
-
{lib, ...}: {
+
{lib, ...}: let
+
_1passwordAgent = options:
+
lib.hm.dag.entryBefore ["*"] ({
+
extraOptions.IdentityAgent = "~/.1password/agent.sock";
+
extraOptions.IdentitiesOnly = "no";
+
}
+
// options);
+
in {
programs.ssh = {
enable = true;
matchBlocks = {
···
user = "ovy";
};
# OpenWrt
-
"192.168.1.1" = lib.hm.dag.entryBefore ["*"] {
-
user = "root";
-
extraOptions.IdentityAgent = "~/.1password/agent.sock";
-
extraOptions.IdentitiesOnly = "no";
-
};
+
"192.168.1.1" = _1passwordAgent {user = "root";};
+
"*.repo.borgbase.com" = _1passwordAgent {};
};
};
}