home: split up ssh into blocks, and add more targets

This commit is contained in:
Oystein Kristoffer Tveit 2023-12-11 13:34:14 +01:00
parent b1650e91a6
commit 6289b53ff7
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
4 changed files with 35 additions and 11 deletions

View File

@ -0,0 +1,6 @@
{
imports = [
./pvv.nix
./other.nix
];
}

10
home/config/ssh/other.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, ... }:
{
programs.ssh.matchBlocks = {
"pascal wack" = {
user = "h7x4";
hostname = "wiki.wackattack.eu";
port = 1337;
};
};
}

View File

@ -7,7 +7,16 @@ let
[ "hildring" "pvv-login" "pvv" ] [ "hildring" "pvv-login" "pvv" ]
"demiurgen" "demiurgen"
"eirin" "eirin"
[ "jokum" "pvv-nix" ] "bekkalokk"
"ildkule"
"shark"
"buskerud"
"bicep"
{
names = [ "bob" ];
proxyJump = "hildring";
}
"knutsen"
"isvegg" "isvegg"
[ "microbel" "pvv-users" "pvv-mail" ] [ "microbel" "pvv-users" "pvv-mail" ]
]; ];
@ -16,18 +25,17 @@ let
[ "knakelibrak" "pvv-databases" ] [ "knakelibrak" "pvv-databases" ]
[ "spikkjeposche" "pvv-web" "pvv-wiki" "pvv-webmail" ] [ "spikkjeposche" "pvv-web" "pvv-wiki" "pvv-webmail" ]
"sleipner" "sleipner"
"fenris" # "fenris"
"balduzius" "balduzius"
"joshua" "joshua"
"skrotnisse" # "skrotnisse"
"principal" "principal"
"tom" "tom"
"monty" # "monty"
# {
{ # names = [ "dvask" ];
names = ["dvask"]; # proxyJump = "monty";
proxyJump = "monty"; # }
}
[ "innovation" "pvv-minecraft" ] [ "innovation" "pvv-minecraft" ]
]; ];
@ -44,7 +52,7 @@ let
inherit (lib.lists) head; inherit (lib.lists) head;
inherit (lib.strings) split; inherit (lib.strings) split;
in in
names: { hostname = "${head names}.pvv.org"; }; names: { hostname = "${head names}.pvv.ntnu.no"; };
# AttrSet -> AttrSet -> AttrSet # AttrSet -> AttrSet -> AttrSet
convertMachineWithDefaults = defaults: normalizedMachine: let convertMachineWithDefaults = defaults: normalizedMachine: let

View File

@ -8,7 +8,7 @@ in {
./shell.nix ./shell.nix
./packages.nix ./packages.nix
./config/ssh/hosts/pvv.nix ./config/ssh
./config/xdg ./config/xdg
./programs/atuin.nix ./programs/atuin.nix