redo ssh.nix to use forEach on all hostnames

This commit is contained in:
Chaos 2022-11-29 09:27:09 +00:00
parent 96068aa583
commit 9ca10ad75a
No known key found for this signature in database
3 changed files with 9 additions and 24 deletions

View file

@ -1,9 +0,0 @@
{ lib, ... }: {
home.file = lib.mkMerge (map (x: {
"${x}" = {
text = ''
nyaa!~
'';
};
}) [ "girl" "boy" "enby" ]);
}

View file

@ -1,17 +1,10 @@
_: { { lib, ... }: {
programs.ssh.enable = true; programs.ssh.enable = true;
programs.ssh.matchBlocks = { programs.ssh.matchBlocks = (lib.mkMerge
"hetzner-vm" = { (lib.forEach [ "hetzner-vm" "storage" "vault" "buildbox" ] (hostname: {
"${hostname}" = {
user = "root"; user = "root";
hostname = "hetzner-vm.servers.genderfucked.monster"; hostname = "${hostname}.servers.genderfucked.monster";
};
"storage" = {
user = "root";
hostname = "storage.servers.genderfucked.monster";
};
"vault" = {
user = "root";
hostname = "vault.servers.genderfucked.monster";
};
}; };
})));
} }

View file

@ -18,6 +18,7 @@ in {
la = "exa -Ga"; la = "exa -Ga";
ll = "exa -l"; ll = "exa -l";
lla = "exa -lga"; lla = "exa -lga";
ip6 = "ip -6";
sys = "systemctl"; sys = "systemctl";
sysu = "systemctl --user"; sysu = "systemctl --user";
logu = "journalctl --user"; logu = "journalctl --user";