update ssh for other servers
This commit is contained in:
parent
96475f3e10
commit
8cd92aaba4
2 changed files with 61 additions and 27 deletions
|
|
@ -96,55 +96,55 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# HOME SERVERS
|
# HOME SERVERS
|
||||||
"h001" = lib.mkIf (hasSecret "nix2h001") {
|
"h001" = {
|
||||||
identityFile = age.secrets.nix2h001.path;
|
identityFile = lib.mkIf (hasSecret "nix2h001") age.secrets.nix2h001.path;
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
"h001_" = lib.mkIf (hasSecret "nix2h001") {
|
"h001_" = {
|
||||||
identityFile = age.secrets.nix2h001.path;
|
identityFile = lib.mkIf (hasSecret "nix2h001") age.secrets.nix2h001.path;
|
||||||
hostname = "10.12.14.10";
|
hostname = "10.12.14.10";
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
"h002" = lib.mkIf (hasSecret "nix2nix") {
|
"h002" = {
|
||||||
identityFile = age.secrets.nix2nix.path;
|
identityFile = lib.mkIf (hasSecret "nix2nix") age.secrets.nix2nix.path;
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
"h002_" = lib.mkIf (hasSecret "nix2nix") {
|
"h002_" = {
|
||||||
identityFile = age.secrets.nix2nix.path;
|
identityFile = lib.mkIf (hasSecret "nix2nix") age.secrets.nix2nix.path;
|
||||||
hostname = "10.12.14.183";
|
hostname = "10.12.14.183";
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
"h003" = lib.mkIf (hasSecret "nix2h003") {
|
"h003" = {
|
||||||
identityFile = age.secrets.nix2h003.path;
|
identityFile = lib.mkIf (hasSecret "nix2h003") age.secrets.nix2h003.path;
|
||||||
hostname = "10.12.14.1";
|
hostname = "10.12.14.1";
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
"h003_" = lib.mkIf (hasSecret "nix2h003") {
|
"h003_" = {
|
||||||
identityFile = age.secrets.nix2h003.path;
|
identityFile = lib.mkIf (hasSecret "nix2h003") age.secrets.nix2h003.path;
|
||||||
user = "luser";
|
user = "luser";
|
||||||
};
|
};
|
||||||
# LINODE SERVERS
|
# LINODE SERVERS
|
||||||
"l001" = lib.mkIf (hasSecret "nix2linode") {
|
"l001" = {
|
||||||
identityFile = age.secrets.nix2linode.path;
|
identityFile = lib.mkIf (hasSecret "nix2linode") age.secrets.nix2linode.path;
|
||||||
hostname = "172.236.111.33"; # Not on the tailscale network it is the primary host
|
hostname = "172.236.111.33"; # Not on the tailscale network it is the primary host
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
"l002_" = lib.mkIf (hasSecret "nix2linode") {
|
"l002_" = {
|
||||||
identityFile = age.secrets.nix2linode.path;
|
identityFile = lib.mkIf (hasSecret "nix2linode") age.secrets.nix2linode.path;
|
||||||
hostname = "172.234.26.141";
|
hostname = "172.234.26.141";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
"l002" = lib.mkIf (hasSecret "nix2linode") {
|
"l002" = {
|
||||||
identityFile = age.secrets.nix2linode.path;
|
identityFile = lib.mkIf (hasSecret "nix2linode") age.secrets.nix2linode.path;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
# ORACLE SERVERS
|
# ORACLE SERVERS
|
||||||
"o001" = lib.mkIf (hasSecret "nix2oracle") {
|
"o001" = {
|
||||||
identityFile = age.secrets.nix2oracle.path;
|
identityFile = lib.mkIf (hasSecret "nix2oracle") age.secrets.nix2oracle.path;
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
"o001_" = lib.mkIf (hasSecret "nix2oracle") {
|
"o001_" = {
|
||||||
identityFile = age.secrets.nix2oracle.path;
|
identityFile = lib.mkIf (hasSecret "nix2oracle") age.secrets.nix2oracle.path;
|
||||||
hostname = "64.181.210.7";
|
hostname = "64.181.210.7";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,41 @@
|
||||||
identityFile = "$SECRET_PATH";
|
identityFile = "$SECRET_PATH";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
nix2h001 = {
|
||||||
|
owner = "josh";
|
||||||
|
group = "users";
|
||||||
|
hmChanges.programs.ssh.matchBlocks = lib.genAttrs [ "h001" "h001_" ] (_: {
|
||||||
|
identityFile = "$SECRET_PATH";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
nix2h002 = {
|
||||||
|
owner = "josh";
|
||||||
|
group = "users";
|
||||||
|
hmChanges.programs.ssh.matchBlocks = lib.genAttrs [ "h002" "h002_" ] (_: {
|
||||||
|
identityFile = "$SECRET_PATH";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
nix2h003 = {
|
||||||
|
owner = "josh";
|
||||||
|
group = "users";
|
||||||
|
hmChanges.programs.ssh.matchBlocks = lib.genAttrs [ "h003" "h003_" ] (_: {
|
||||||
|
identityFile = "$SECRET_PATH";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
nix2linode = {
|
||||||
|
owner = "josh";
|
||||||
|
group = "users";
|
||||||
|
hmChanges.programs.ssh.matchBlocks = lib.genAttrs [ "l001" "l002" "l002_" ] (_: {
|
||||||
|
identityFile = "$SECRET_PATH";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
nix2oracle = {
|
||||||
|
owner = "josh";
|
||||||
|
group = "users";
|
||||||
|
hmChanges.programs.ssh.matchBlocks = lib.genAttrs [ "o001" "o001_" ] (_: {
|
||||||
|
identityFile = "$SECRET_PATH";
|
||||||
|
});
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
|
|
@ -160,11 +195,10 @@
|
||||||
|
|
||||||
inputs.beszel.nixosModules.agent
|
inputs.beszel.nixosModules.agent
|
||||||
({
|
({
|
||||||
beszelAgent = {
|
beszelAgent = {
|
||||||
token = "2fb5f0a0-24aa-4044-a893-6d0f916cd063";
|
token = "2fb5f0a0-24aa-4044-a893-6d0f916cd063";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
)
|
|
||||||
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./hardware-mounts.nix
|
./hardware-mounts.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue