Add arch to hosts, share host config with flake.
This commit is contained in:
+2
-10
@@ -1,16 +1,8 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
is-nix-file = filename: type: (builtins.match ".+\.nix$" filename) != null;
|
||||
is-regular-file = filename: type: type == "regular" || type == "link";
|
||||
hostname-from-file = filename: builtins.replaceStrings [".nix"] [""] filename;
|
||||
|
||||
host-files = attrNames (filterAttrs is-nix-file (filterAttrs is-regular-file (builtins.readDir ./hosts)));
|
||||
hosts = map hostname-from-file host-files;
|
||||
syslib = pkgs.callPackage ../lib/hosts.nix {};
|
||||
|
||||
load-host-file = hostname: import (./. + "/hosts/${hostname}.nix");
|
||||
|
||||
in {
|
||||
config.fudo.hosts = genAttrs hosts (hostname: load-host-file hostname);
|
||||
config.fudo.hosts = syslib.base-host-config ./hosts;
|
||||
}
|
||||
|
||||
@@ -6,4 +6,5 @@
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
profile = "laptop";
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
profile = "server";
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB07Jf/NB4OlFSEI/eLJlNLA2sM9cHw1hX43r43nQ7a5";
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -15,4 +15,6 @@
|
||||
profile = "desktop";
|
||||
ssh-pubkey =
|
||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPqyDT/JqTxWZbpOXzy1Sxba2z2hNzt2BqjLspPvJLVc9zks1GMlnKAY5Nb7y7oi+CzeZMU+KAa069wZ/mYvpas=";
|
||||
arch = "x86_64-linux";
|
||||
nixos-system = false;
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
profile = "server";
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1COad5NSK3mi66WK5uWf79NLMf5rk350kvJGsEdDmn";
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPB5JY6jnHCRLxjqWKYkK8Xpmfyq2nA+0noPazYGd9a+";
|
||||
enable-gui = false;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMqymGZ5dI6ChI1Qx1QfjBo/h0+xFwpRx/wQSDxWQprI";
|
||||
tmp-on-tmpfs = false;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
profile = "server";
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHT8Uf6m8ZrSn4nmPyIO+JWLbgXJGX4jJTk0wfqDzzjb";
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDMPjwpcktL0Rhjc/D3ZmzwkSRqSJX5TGjMXVstpg8nNqQQrj9DxPq7gV4a+1LxMtQGPUv4gYx7De1a5LMVk8u6qJJnaLlt3TB1e1SUCBxxeh5sWIY5BMx8Q0/aRTkyTchyczX6FX0LXM7FP6yvxZVZSn2WHRp7REr8G1PUAwuIGy2a4bKOUSh5Uj4riXFXnROW2mp1vUfe5oH4X5HP3ACCXWRVUFdqDt1ldcrqqi+7/8x2G1eOHJcQ7B5FdL3uuq0nBrUzFQTt6KCHy0C2Jc3DFwOS1+ZdGKZpao+/arh/fH+LQfMUePx/AQOkYrJwvuRwbxg8XmlZ89u2gyDuqapzjBmsu+wyd5pF2QglyTRZW9Ijy1NTuzduPm6wgqN0Q09evFJvM9ZjShcIY3xTcCGDxpwTeYgMVXMF79sV9u+JwCSBpaIyteIJ7M/J/NWmaKoUF6Ia9mNts889Ba9TKzQFek19KYetOB2hfXV+7bvXrH+OBppzpdrztJFavBceQTs="
|
||||
];
|
||||
tmp-on-tmpfs = false;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -15,4 +15,6 @@
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEsvl1mTSWJJrqXbYrc8wYdlOiW5gNg4Nzf2QCxB6XW";
|
||||
tmp-on-tmpfs = false;
|
||||
enable-gui = false;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
site = "seattle";
|
||||
profile = "laptop";
|
||||
domain = "sea.fudo.org";
|
||||
arch = "x86_64-linux";
|
||||
nixos-system = false;
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
ssh-pubkey =
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP4TqqumZwSDLkg8cTpR734zM+nuqEp1ufaQPoFdqCab";
|
||||
tmp-on-tmpfs = false;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
android-dev = true;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
android-dev = true;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
@@ -13,4 +13,6 @@
|
||||
site = "russell";
|
||||
domain = "rus.selby.ca";
|
||||
profile = "desktop";
|
||||
arch = "x86_64-linux";
|
||||
nixos-system = false;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@
|
||||
domain = "sea.fudo.org";
|
||||
site = "seattle";
|
||||
android-dev = true;
|
||||
arch = "x86_64-linux";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user