{ pkgs ? import {} }: let # Pin the deployment package-set to a specific version of nixpkgs # pkgs = import (builtins.fetchTarball { # url = "https://github.com/NixOS/nixpkgs/archive/e6377ff35544226392b49fa2cf05590f9f0c4b43.tar.gz"; # sha256 = "1fra9wwy5gvj5ibayqkzqpwdf715bggc0qbmrfch4fghwvl5m70l"; # }) {}; # pkgs = import {}; nodes = import ./nodes.nix; compute = { deployment.tags = [ "compute" "c0" "cluster" ]; }; mkCompute = host: let hw = ./hardware-configuration.d + "/${host.name}.nix"; in { "${host.name}" = { cluster = { compute = true; k8sNode = true; mounts = { rdma.enable = false; automount.enable = true; users = true; opt = true; work = true; data = true; ceph = true; }; }; features = { host = { name = host.name; address = host.address; }; os.networkmanager.enable = false; os.externalInterface = host.iface; hpc.computeNode = true; # hpc.knem = true; }; deployment.targetHost = host.address; # services.udev.extraRules = '' # KERNEL=="ibp1s0", SUBSYSTEM=="net", ATTR{create_child}:="0x7666" # ''; networking = { useNetworkd = true; hostName = host.name; useDHCP = false; }; # systemd.services.systemd-networkd-wait-online.enable = false; systemd.network.wait-online.ignoredInterfaces = [ "ibp1s0" ]; systemd.network = { # wait-online.enable = false; networks = { "40-${host.iface}" = { matchConfig.Name = host.iface; address = [ "${host.address}/24" ]; routes = [ { Gateway = "172.16.239.1"; } ]; }; # "ibp1s0.7666" = { "45-ibp1s0" = { matchConfig.Name = "ibp1s0"; address = [ "${host.ipoib}/24" ]; }; }; }; imports = [ hw ../default.nix ../mounts.nix #./kernel.nix ]; } // compute; }; in builtins.foldl' (a: n: a // mkCompute n) {} nodes