1
0
Fork 0
This commit is contained in:
Sandro - 2023-01-02 17:15:14 +01:00
parent 90fc1389e8
commit f8bccd8508
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 28 additions and 23 deletions

View File

@ -17,7 +17,8 @@ let
) null [ "cluster" "serv" ]; ) null [ "cluster" "serv" ];
in { in {
# Open firewall between cluster members # Open firewall between cluster members
networking.firewall.extraCommands = lib.concatMapStrings (server: networking.firewall.extraCommands = lib.concatMapStrings
(server:
let let
netConfig = zentralwerk.lib.config.site.net.${serverNet server}; netConfig = zentralwerk.lib.config.site.net.${serverNet server};
in in
@ -26,7 +27,9 @@ in {
${lib.concatMapStrings (hosts6: '' ${lib.concatMapStrings (hosts6: ''
ip6tables -A nixos-fw --source ${hosts6.${server}} -j ACCEPT ip6tables -A nixos-fw --source ${hosts6.${server}} -j ACCEPT
'') (builtins.attrValues netConfig.hosts6)} '') (builtins.attrValues netConfig.hosts6)}
'') servers; ''
)
servers;
# Cluster configuration # Cluster configuration
skyflake = { skyflake = {
@ -42,23 +45,25 @@ in {
inherit servers; inherit servers;
# run tasks only on these: # run tasks only on these:
client.enable = builtins.elem hostName microvmServers; client.enable = builtins.elem hostName microvmServers;
client.meta = client.meta = lib.optionalAttrs (builtins.elem hostName storageServers) {
lib.optionalAttrs (builtins.elem hostName storageServers) {
"c3d2.storage" = "big"; "c3d2.storage" = "big";
}; };
}; };
microvmUid = 997; microvmUid = 997;
users.c3d2 = { users = {
c3d2 = {
uid = 1001; uid = 1001;
sshKeys = config.users.users.root.openssh.authorizedKeys.keys; sshKeys = config.users.users.root.openssh.authorizedKeys.keys;
}; };
users.leon = { leon = {
uid = 1002; uid = 1002;
sshKeys = with (import ../../ssh-public-keys.nix).users; sshKeys = with (import ../../ssh-public-keys.nix).users;
leon ++ leon ++
astro; astro;
}; };
};
deploy.customizationModule = ./deployment.nix; deploy.customizationModule = ./deployment.nix;
storage.glusterfs = { storage.glusterfs = {