diff --git a/hosts/pinwheel/modules/ssh/default.nix b/hosts/pinwheel/modules/ssh/default.nix index 327baf7..8536ad4 100644 --- a/hosts/pinwheel/modules/ssh/default.nix +++ b/hosts/pinwheel/modules/ssh/default.nix @@ -23,11 +23,6 @@ hostname = "github.com"; identityFile = "/home/alex/.ssh/alex.pinwheel-github.com"; }; - - "gitlab.com" = { - hostname = "gitlab.com"; - identityFile = "/home/alex/.ssh/alex.pinwheel-work"; - }; }; }; @@ -59,18 +54,6 @@ owner = "alex"; group = "users"; }; - "alex.pinwheel-work" = { - file = ../../../../secrets/pinwheel/alex.pinwheel-work.age; - path = "/home/alex/.ssh/alex.pinwheel-work"; - owner = "alex"; - group = "users"; - }; - "alex.pinwheel-work.pub" = { - file = ../../../../secrets/pinwheel/alex.pinwheel-work.pub.age; - path = "/home/alex/.ssh/alex.pinwheel-work.pub"; - owner = "alex"; - group = "users"; - }; }; services.openssh = { diff --git a/hosts/pinwheel/modules/work/default.nix b/hosts/pinwheel/modules/work/default.nix index 882fbe9..023818c 100644 --- a/hosts/pinwheel/modules/work/default.nix +++ b/hosts/pinwheel/modules/work/default.nix @@ -40,6 +40,17 @@ in goPrivate = [ "gitlab.com/zebware/*" ]; }; + programs.ssh = { + enable = true; + + matchBlocks = { + "gitlab.com" = { + hostname = "gitlab.com"; + identityFile = "/home/alex/.ssh/alex.pinwheel-work"; + }; + }; + }; + home.packages = lib.mkIf openvpnEnabled [ work-vpn ]; }; @@ -51,10 +62,22 @@ in group = "users"; }; + "alex.pinwheel-work" = { + file = ../../../../secrets/pinwheel/alex.pinwheel-work.age; + path = "/home/alex/.ssh/alex.pinwheel-work"; + owner = "alex"; + group = "users"; + }; + "alex.pinwheel-work.pub" = { + file = ../../../../secrets/pinwheel/alex.pinwheel-work.pub.age; + path = "/home/alex/.ssh/alex.pinwheel-work.pub"; + owner = "alex"; + group = "users"; + }; + "work-ovpn" = lib.mkIf openvpnEnabled { file = ../../../../secrets/pinwheel/work-ovpn.age; }; - "work-ovpn-userpass" = lib.mkIf openvpnEnabled { file = ../../../../secrets/pinwheel/work-ovpn-userpass.age; };