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.matchBlocks = {
"hetzner-vm" = {
programs.ssh.matchBlocks = (lib.mkMerge
(lib.forEach [ "hetzner-vm" "storage" "vault" "buildbox" ] (hostname: {
"${hostname}" = {
user = "root";
hostname = "hetzner-vm.servers.genderfucked.monster";
};
"storage" = {
user = "root";
hostname = "storage.servers.genderfucked.monster";
};
"vault" = {
user = "root";
hostname = "vault.servers.genderfucked.monster";
};
hostname = "${hostname}.servers.genderfucked.monster";
};
})));
}

View file

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