pinwheel: Move work ssh keys to work module

This commit is contained in:
Alexander Heldt
2023-10-29 20:09:47 +01:00
parent 28e0ff7189
commit 90420f6b6d
2 changed files with 24 additions and 18 deletions

View File

@@ -23,11 +23,6 @@
hostname = "github.com"; hostname = "github.com";
identityFile = "/home/alex/.ssh/alex.pinwheel-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"; owner = "alex";
group = "users"; 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 = { services.openssh = {

View File

@@ -40,6 +40,17 @@ in
goPrivate = [ "gitlab.com/zebware/*" ]; 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 ]; home.packages = lib.mkIf openvpnEnabled [ work-vpn ];
}; };
@@ -51,10 +62,22 @@ in
group = "users"; 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 { "work-ovpn" = lib.mkIf openvpnEnabled {
file = ../../../../secrets/pinwheel/work-ovpn.age; file = ../../../../secrets/pinwheel/work-ovpn.age;
}; };
"work-ovpn-userpass" = lib.mkIf openvpnEnabled { "work-ovpn-userpass" = lib.mkIf openvpnEnabled {
file = ../../../../secrets/pinwheel/work-ovpn-userpass.age; file = ../../../../secrets/pinwheel/work-ovpn-userpass.age;
}; };