diff --git a/configuration.nix b/configuration.nix index e67a2d4..7ca6330 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,6 @@ { pkgs, ...}: let - nodes = import ./nixops/stokes/nodes.nix; + nodes = import ./nixops/ekman/nodes.nix; in { # deployment.tags = [ "frontend" ]; @@ -15,16 +15,16 @@ in features = { host = { - address = "10.1.62.2"; - name = "c0-0"; + address = "10.255.241.100"; + name = "ekman"; }; os = { - externalInterface = "eno1"; + externalInterface = "enp33s0f0np0"; nfs.enable = true; nfs.exports = '' - /exports 10.1.61.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash) - /exports 10.1.63.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash) + /exports 10.255.241.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash) + /exports 10.255.243.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash) ''; }; @@ -42,16 +42,16 @@ in monitoring = { server = { enable = false; - scrapeHosts = [ "frontend" "mds0-0" ] ++ (builtins.map (x: x.name) nodes); + scrapeHosts = [ "frontend" "mds1-0" ] ++ (builtins.map (x: x.name) nodes); defaultAlertReceiver = { email_configs = [ - { to = "jonas.juselius@tromso.serit.no"; } + { to = "jonas.juselius@oceanbox.io"; } ]; }; pageAlertReceiver = { webhook_configs = [ { - url = "https://prometheus-msteams.k2.itpartner.no/stokes"; + url = "https://prometheus-msteams.k2.itpartner.no/ekman"; http_config = { tls_config = { insecure_skip_verify = true; }; }; @@ -69,16 +69,8 @@ in infiniband-exporter = { enable = true; nameMap = '' - 0x0c42a10300ddc4bc "frontend" - 0x1c34da0300787798 "mds0-0" 0x0c42a10300dbe7f4 "c0-1" - 0x0c42a10300dbe7d8 "c0-2" - 0x0c42a10300dbe800 "c0-3" - 0x0c42a10300dbec80 "c0-4" - 0x0c42a10300dbea50 "c0-5" - 0x0c42a10300dbeb2c "c0-6" - 0x0c42a10300dbe7fc "c0-7" - 0x0c42a10300dbe5a0 "c0-8" + 0x0c42a10300ddc4bc "c0-2" ''; }; slurm-exporter = { @@ -88,47 +80,43 @@ in }; }; - # services.udev.extraRules = '' - # KERNEL=="ibp59s0", SUBSYSTEM=="net", ATTR{create_child}:="0x2222" - # ''; - networking = { - hostName = "stokes"; useDHCP = false; - interfaces.eno1 = { + hostName = "ekman"; + interfaces.enp33s0f0np0 = { useDHCP = false; ipv4.addresses = [ { - address = "10.1.62.2"; + address = "10.255.242.2"; prefixLength = 24; } ]; }; - interfaces.enp175s0f0 = { + interfaces.enp33s0f3np3 = { useDHCP = false; ipv4.addresses = [ { - address = "10.1.61.100"; + address = "10.255.241.100"; prefixLength = 24; } ]; }; - interfaces.ibp59s0 = { + interfaces.ibp65s0 = { useDHCP = false; ipv4.addresses = [ { - address = "10.1.63.100"; + address = "10.255.243.100"; prefixLength = 24; } ]; }; - defaultGateway = "10.1.62.1"; + defaultGateway = "10.255.242.1"; firewall.extraCommands = '' - iptables -I INPUT -s 10.1.63.0/24 -j ACCEPT - iptables -t nat -A POSTROUTING -s 10.1.63.0/24 -j MASQUERADE + iptables -I INPUT -s 10.255.243.0/24 -j ACCEPT + iptables -t nat -A POSTROUTING -s 10.255.243.0/24 -j MASQUERADE ''; }; - fileSystems ={ + fileSystems = { "/exports/home" = { device = "/home"; options = [ "bind" ]; }; - "/stokes" = { + "/frontend" = { device = "/home"; options = [ "bind" ]; }; @@ -142,9 +130,9 @@ in }; }; - nix.extraOptions = '' - secret-key-files = /etc/nix/stokes.private - ''; + # nix.extraOptions = '' + # secret-key-files = /etc/nix/ekman.key + # ''; services.xserver = { enable = true; @@ -163,29 +151,29 @@ in smtp_smarthost = "smtpgw.itpartner.no:465"; smtp_auth_username = "utvikling"; smtp_auth_password = "S0m3rp0m@de#21!"; - smtp_hello = "stokes.regnekraft.io"; - smtp_from = "noreply@stokes.regnekraft.io"; + smtp_hello = "ekman.oceanbox.io"; + smtp_from = "noreply@ekman.oceanbox.io"; }; - services.nginx = { - virtualHosts = { - "ds.matnoc.regnekraft.io" = { - forceSSL = true; - enableACME = true; - serverAliases = []; - locations."/" = { - proxyPass = "http://localhost:9088"; - proxyWebsockets = false; - extraConfig = '' - allow 10.1.2.0/24; - allow 172.19.254.0/24; - allow 172.19.255.0/24; - deny all; - ''; - }; - }; - }; - }; + # services.nginx = { + # virtualHosts = { + # "ds.matnoc.regnekraft.io" = { + # forceSSL = true; + # enableACME = true; + # serverAliases = []; + # locations."/" = { + # proxyPass = "http://localhost:9088"; + # proxyWebsockets = false; + # extraConfig = '' + # allow 10.1.2.0/24; + # allow 172.19.254.0/24; + # allow 172.19.255.0/24; + # deny all; + # ''; + # }; + # }; + # }; + # }; # services.gitlab-runner = { # enable = true; @@ -197,7 +185,7 @@ in # sif = { # registrationConfigFile = "/var/lib/secrets/gitlab-runner-registration"; # executor = "shell"; - # tagList = [ "stokes" "sif" ]; + # tagList = [ "ekman" "sif" ]; # }; # }; # }; @@ -225,9 +213,10 @@ in }; # ssh-rsa is deprecated, but putty/winscp users use it - services.openssh.extraConfig = '' - pubkeyacceptedalgorithms ssh-rsa,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256 - ''; + # services.openssh.extraConfig = '' + # pubkeyacceptedalgorithms ssh-rsa,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256 + # ''; - imports = [ ./nixops/stokes/cluster.nix ./hardware-configuration.nix ]; + imports = [ ./nixops/ekman/cluster.nix ./hardware-configuration.nix ]; } + diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 84acc26..57814eb 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,20 +8,32 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "megaraid_sas" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.availableKernelModules = [ "megaraid_sas" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/099be829-726d-44c9-b113-4c2604a663c5"; + { device = "/dev/disk/by-uuid/c4a5ea80-2a87-440d-8431-a695d623da24"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/8111-9F24"; + { device = "/dev/disk/by-uuid/D8A3-A04D"; fsType = "vfat"; }; swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f1np1.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f2np2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f3np3.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixops/stokes/cluster.nix b/nixops/ekman/cluster.nix similarity index 68% rename from nixops/stokes/cluster.nix rename to nixops/ekman/cluster.nix index c05f156..fdc1abf 100644 --- a/nixops/stokes/cluster.nix +++ b/nixops/ekman/cluster.nix @@ -8,9 +8,9 @@ let existing = true; nodes = { - c0-0 = "10.1.61.100"; - c0-1 = "10.1.61.101"; - c0-2 = "10.1.61.102"; + etcd0 = "10.255.241.100"; + # etcd1 = "10.255.241.80"; + # etcd2 = "10.255.241.81"; }; }; @@ -32,12 +32,16 @@ let loader.efi.canTouchEfiVariables = true; # kernelPackages = pkgs.linuxPackages_5_4; kernelModules = [ "ib_umad" "ib_ipoib" ]; - kernelParams = [ - "console=ttyS0,115200" - "console=tty0" - ]; + # kernelParams = [ + # "console=ttyS0,115200" + # "console=tty0" + # ]; }; + services.udev.extraRules = '' + KERNEL=="ibp1s0", SUBSYSTEM=="net", ATTR{create_child}:="0x3666" + ''; + console = { font = "Lat2-Terminus16"; keyMap = "us"; @@ -67,7 +71,7 @@ let tls = false; tls_starttls = false; port = 24; - from = "stokes@regnekraft.io"; + from = "ekman@oceanbox.io"; host = "smtpgw.itpartner.no"; # user = "utvikling"; # password = "S0m3rp0m@de#21!"; @@ -108,25 +112,25 @@ let slurm = { client = true; mungeKey = ./munge.key; - mungeUid = 997; # hack - controlMachine = "stokes"; + mungeUid = 995; # hack + controlMachine = "ekman"; nodeName = [ - "c0-[1-8] Sockets=1 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=100000 State=UNKNOWN" - "stokes Sockets=2 CoresPerSocket=16 ThreadsPerCore=2 RealMemory=64000 TmpDisk=500000 State=UNKNOWN" + "c0-[1-2] Sockets=2 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" + "ekman Sockets=2 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" ]; partitionName = [ - "batch Nodes=c0-[1-8] Default=YES MaxTime=INFINITE State=UP" - "frontend Nodes=stokes MaxTime=1:00:00 State=UP" + "batch Nodes=c0-[1-2] Default=YES MaxTime=INFINITE State=UP" + "frontend Nodes=ekman MaxTime=1:00:00 State=UP" ]; }; beegfs = { - enable = true; + enable = false; beegfs = { - mds0-0 = { - mgmtdHost = "mds0-0"; + bee0-0 = { + mgmtdHost = "mds1-0"; connAuthFile = "/etc/beegfs/connauthfile"; client = { - enable = true; + enable = false; mountPoint = "/work"; }; }; @@ -137,19 +141,18 @@ let k8s = { enable = true; node.enable = true; - clusterName = "hpc0"; - inherit etcdCluster; + clusterName = "ekman"; initca = ./ca; cidr = "10.100.0.0/16"; master = { - name = "stokes"; - address = "10.1.61.100"; - extraSANs = [ "hpc0-0.regnekraft.io" ]; + name = "ekman"; + address = "10.255.241.100"; + extraSANs = [ "ekman.local" "ekman.oceanbox.io" ]; }; ingressNodes = [ - "hpc0-0.regnekraft.io" + "ekman.oceanbox.io" ]; - fileserver = "mds0-0"; + fileserver = "mds1-0"; charts = { acme_email = "innovasjon@itpartner.no"; grafana_smtp_user = "utvikling"; @@ -164,24 +167,24 @@ let }; networking = { - domain = mkDefault "regnekraft.io"; - defaultGateway = mkDefault "10.1.61.1"; + domain = mkDefault "cluster.local"; + defaultGateway = mkDefault "10.255.241.1"; nameservers = mkDefault [ "8.8.8.8" ]; search = mkDefault [ "local" ]; extraHosts = import ./hosts.nix; firewall.extraCommands = '' - iptables -I INPUT -s 10.1.61.0/24 -j ACCEPT + iptables -I INPUT -s 10.255.241.0/24 -j ACCEPT ''; }; fileSystems = { "/opt" = { - device = "10.1.63.80:/opt"; + device = "10.255.241.81:/opt"; fsType = "nfs"; options = [ "soft" "rdma" "defaults" "vers=4.2" ]; }; "/data" = { - device = "10.1.63.80:/data"; + device = "255.241.81:/data"; fsType = "nfs"; options = [ "soft" "rdma" "defaults" "vers=4.2" ]; }; @@ -201,65 +204,33 @@ let nix = { maxJobs = 32; trustedUsers = [ "@wheel" ]; - # binaryCachePublicKeys = [ - # "stokes-1:BCgUFnXc6wgpstwG0M09/Ccrrz45MxHpS62JSC9sxW5hWxMqBNNvU1otqs4pWUOyvdxLPKIk6P5WCJWp+AFJig==" - # ]; + binaryCachePublicKeys = [ + "ekman:pka41J3q4j9ZC3dr4y+sDN9uMW0pAxoWeCkrzUlqcZs=" + ]; }; }; - i40efix = { - # boot = let kernelExtras = pkgs.callPackage ./kernel.nix { - # kernel = pkgs.linuxPackages_5_4.kernel; - # }; in { - # extraModulePackages = [ kernelExtras.i40e2 ]; - # kernelModules = [ "ib_umad" "ib_ipoib" "i40e2" ]; - # }; - }; - shosts = { environment.etc."ssh/shosts.equiv" = { mode = "0644"; uid = 0; gid = 0; text = '' - 10.1.62.2 - 10.1.61.100 - 10.1.61.101 - 10.1.61.102 - 10.1.61.103 - 10.1.61.104 - 10.1.61.105 - 10.1.61.106 - 10.1.61.107 - 10.1.61.108 - 10.1.63.100 - 10.1.63.101 - 10.1.63.102 - 10.1.63.103 - 10.1.63.104 - 10.1.63.105 - 10.1.63.106 - 10.1.63.107 - 10.1.63.108 + 10.255.241.100 + 10.255.241.101 + 10.255.241.102 ''; }; programs.ssh.knownHosts = { - stokes = { + ekman = { hostNames = [ - "stokes" "stokes.hpc.local" "stokes.regnekraft.io" "10.1.61.100" - "10.1.63.100" "10.1.62.2" + "ekman" "ekman.cluster.local" "ekman.oceanbox.io" "10.255.241.8" ]; - publicKeyFile = ./pubkeys/stokes.pub; + publicKeyFile = ./pubkeys/ekman.pub; }; - c0-1 = { hostNames = [ "c0-1" "c0-1.hpc.local" "10.1.61.101" "10.1.63.101" ]; publicKeyFile = ./pubkeys/c0-1.pub; }; - c0-2 = { hostNames = [ "c0-2" "c0-2.hpc.local" "10.1.61.102" "10.1.63.102" ]; publicKeyFile = ./pubkeys/c0-2.pub; }; - c0-3 = { hostNames = [ "c0-3" "c0-3.hpc.local" "10.1.61.103" "10.1.63.103" ]; publicKeyFile = ./pubkeys/c0-3.pub; }; - c0-4 = { hostNames = [ "c0-4" "c0-4.hpc.local" "10.1.61.104" "10.1.63.104" ]; publicKeyFile = ./pubkeys/c0-4.pub; }; - c0-5 = { hostNames = [ "c0-5" "c0-5.hpc.local" "10.1.61.105" "10.1.63.105" ]; publicKeyFile = ./pubkeys/c0-5.pub; }; - c0-6 = { hostNames = [ "c0-6" "c0-6.hpc.local" "10.1.61.106" "10.1.63.106" ]; publicKeyFile = ./pubkeys/c0-6.pub; }; - c0-7 = { hostNames = [ "c0-7" "c0-7.hpc.local" "10.1.61.107" "10.1.63.107" ]; publicKeyFile = ./pubkeys/c0-7.pub; }; - c0-8 = { hostNames = [ "c0-8" "c0-8.hpc.local" "10.1.61.108" "10.1.63.108" ]; publicKeyFile = ./pubkeys/c0-8.pub; }; + c0-1 = { hostNames = [ "c0-1" "c0-1.cluster.local" "10.255.241.101" "10.255.243.11" ]; publicKeyFile = ./pubkeys/c0-1.pub; }; + c0-2 = { hostNames = [ "c0-2" "c0-2.cluster.local" "10.255.241.102" "10.255.243.11" ]; publicKeyFile = ./pubkeys/c0-1.pub; }; }; environment.systemPackages = [ openssh-shosts ]; @@ -315,20 +286,12 @@ let in { options.node = { - # i40efix = mkEnableOption "Apply fix for i40e driver"; - myvnc = mkEnableOption "Enable myvnc script"; }; config = mkMerge [ configuration - - # deployment - shosts - - # (mkIf config.node.i40efix i40efix) - (mkIf config.node.myvnc myvnc) ]; diff --git a/nixops/ekman/connauthfile b/nixops/ekman/connauthfile new file mode 100644 index 0000000..37cd965 --- /dev/null +++ b/nixops/ekman/connauthfile @@ -0,0 +1 @@ +äˇq‹u \ No newline at end of file diff --git a/nixops/stokes/default.nix b/nixops/ekman/default.nix similarity index 79% rename from nixops/stokes/default.nix rename to nixops/ekman/default.nix index 49e85cd..9222333 100644 --- a/nixops/stokes/default.nix +++ b/nixops/ekman/default.nix @@ -12,8 +12,8 @@ let # deployment.tags = [ "compute" ]; fileSystems = { - "/stokes" = { - device = "10.1.63.100:/home"; + "/frontend" = { + device = "10.255.241.100:/home"; fsType = "nfs4"; options = [ "soft" @@ -26,7 +26,7 @@ let systemd.automounts = [ { - where = "/stokes"; + where = "/frontend"; wantedBy = [ "default.target" ]; } ]; @@ -34,13 +34,13 @@ let mkCompute = host: let - ipoib = builtins.replaceStrings [".61."] [".63."] host.address; + ipoib = builtins.replaceStrings [".241."] [".243."] host.address; hw = ./hw + "/${host.name}.nix"; in { "${host.name}" = { features = { inherit host; - os.externalInterface = "eno33"; + os.externalInterface = "enp33s0f0np0"; hpc.compute = true; # k8s = { inherit etcdCluster; }; }; @@ -52,25 +52,24 @@ let # ''; node = { - # i40efix = true; }; networking = { useDHCP = false; - interfaces.eno33 = { + interfaces.enp33s0f0np0 = { useDHCP = false; ipv4.addresses = [ { address = host.address; prefixLength = 24; } ]; ipv4.routes = [ { - address = "10.1.62.2"; + address = "10.255.242.2"; prefixLength = 32; - via = "10.1.61.100"; + via = "10.1.241.100"; } ]; }; - interfaces.ibp65s0 = { + interfaces.ibp1s0 = { useDHCP = false; ipv4.addresses = [ { address = ipoib; @@ -87,12 +86,12 @@ in builtins.foldl' (a: n: a // mkCompute n) {} nodes ## morph # network = { # inherit pkgs; - # description = "stokes"; + # description = "ekman"; # ordering = { # tags = [ "frontend" "compute" ]; # }; # }; - # inherit stokes; -#} // builtins.foldl' (a: n: a // mkCompute n) {} nodes + # inherit ekman; +# } // builtins.foldl' (a: n: a // mkCompute n) {} nodes diff --git a/nixops/ekman/hosts.nix b/nixops/ekman/hosts.nix new file mode 100644 index 0000000..7cbfbee --- /dev/null +++ b/nixops/ekman/hosts.nix @@ -0,0 +1,11 @@ +'' + 10.255.240.200 ekman ekman.cluster.local + 10.255.240.200 etcd0 etcd0.cluster.local + 10.255.240.201 c0-1 c0-1.cluster.local + + # 10.1.61.80 bee0-0 bee0-0.cluster.local + + # 10.1.63.101 ib0-1 ib0-1.cluster.local + + # 10.1.63.80 ibmds0-0 ibmds0-0.cluster.local +'' diff --git a/nixops/ekman/hw/c0-1.nix b/nixops/ekman/hw/c0-1.nix new file mode 100644 index 0000000..e1eceaf --- /dev/null +++ b/nixops/ekman/hw/c0-1.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/102a2e89-1ffb-4f8b-810e-b742b6f9da98"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/54C4-7983"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/29ba5bab-0777-4ac1-96af-3952e28d570c"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f1np1.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixops/ekman/hw/c0-2.nix b/nixops/ekman/hw/c0-2.nix new file mode 100644 index 0000000..08c97b3 --- /dev/null +++ b/nixops/ekman/hw/c0-2.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/e19cbe18-e194-47f6-8eb5-c60b5be1bb7a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6A07-053A"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/2100e403-0dff-4314-b85a-cad99820aacf"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f0np0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp33s0f1np1.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixops/stokes/kernel.nix b/nixops/ekman/kernel.nix similarity index 94% rename from nixops/stokes/kernel.nix rename to nixops/ekman/kernel.nix index 750da0d..f865667 100644 --- a/nixops/stokes/kernel.nix +++ b/nixops/ekman/kernel.nix @@ -40,7 +40,7 @@ in { i40e2 = i40e; overlay = self: super: { - # linuxPackages_5_4 = super.linuxPackages_5_4 // { inherit i40e; }; + linuxPackages_5_4 = super.linuxPackages_5_4 // { inherit i40e; }; }; } diff --git a/nixops/stokes/munge.key b/nixops/ekman/munge.key similarity index 100% rename from nixops/stokes/munge.key rename to nixops/ekman/munge.key diff --git a/nixops/stokes/nodes.nix b/nixops/ekman/nodes.nix similarity index 72% rename from nixops/stokes/nodes.nix rename to nixops/ekman/nodes.nix index 7d16834..7ba600c 100644 --- a/nixops/stokes/nodes.nix +++ b/nixops/ekman/nodes.nix @@ -1,3 +1,3 @@ with builtins; -let nodes = genList (n: n + 1) 8; in +let nodes = genList (n: n + 1) 2; in map (n: ({ name = "c0-${toString n}"; address = "10.1.61.10${toString n}"; })) nodes diff --git a/nixops/stokes/overlays.nix b/nixops/ekman/overlays.nix similarity index 100% rename from nixops/stokes/overlays.nix rename to nixops/ekman/overlays.nix diff --git a/nixops/ekman/pubkeys/c0-1.pub b/nixops/ekman/pubkeys/c0-1.pub new file mode 100644 index 0000000..41e42c2 --- /dev/null +++ b/nixops/ekman/pubkeys/c0-1.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC11miL1X2hmZ+FZngDIMUECt8Mr7etEF1yXOXMBPwKSLhMaJnIo7+3C1oVlxf0MZjYMA0neIpSB/PpD1PZU89QBrL/HlnEHVChlNoPuTjN3SoMVSwClCf94VW4c5obK4b0EVbJujudreMC7q4sDOzcMVsBwWCZYmOroM1AqQ2dcZFWpj9hk7RWm3UlxnGG8ZPB9i6zzuKECp9W00RznxLaX0Ys6acXIrhg7N1CIZSWyQwQ6hb5bAz6rbTMgub3YZktckVgTlWnpyW6jfR4+xJW5fM5uVcW1kgSP/xQ+sAnAvH099ogBZSlv59oBL/jIGAVQwKptxkacues6drsohAocmstxVRyatBtEMBp5Grn+pzoDH6cIYTXy3qAgpUzQCnSsW6ttG2cVtPvw/3OSgYsJ1J0VHWfJ8AVBDpRahOa20A7hXR0RzbeRJ4xX4Fu4ndcaR+GTdLSBfb/WSyn1751WZmxqegFnjhuKNcxqKj2tjzm9/oKPtO0Ri8bIDVtLSjTJ4Vhed5I2X50Du9YBcbee1FtqHZV09OCfGRWKL39721b+gmC0JYKHCU6NpAnxa1jjrDJieYCKDsmQtXfWm1mtXeVir4I31ufWUJoGc0YTl/qWpcCVKPDmQHBRLvv7pqU2Fz/FkW+7mePf73Ympc1PRfxNoiP8oeQyPzsmN0liw== root@OBNODE01 diff --git a/nixops/ekman/pubkeys/ekman.pub b/nixops/ekman/pubkeys/ekman.pub new file mode 100644 index 0000000..0a83062 --- /dev/null +++ b/nixops/ekman/pubkeys/ekman.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCySwxKuwdqn+jaEi73BPSFslUoLW2St3FKZ1iojQa7H73SZDWQGCyyR9bwmMpjWUCXt/7aZmljF78MF9t/dE/ZJAQfxYv/rt6QCYDWLZBalyNQ2X3R7U2WNlZPF3KwnxnmOJOPCDKnHrbsGaUG7z6oERaCSgngY8haOVsHJIo55gpjBCkAT/WhvFQ4vcaECuJWVg619lebDVTAVNZDdI7I8KzezMOSX+dH1Z/nr90pq54ZunK5RmaMuYo7tb/PeD3T1/cbK8PUyZsx29iih8PtOwoIkeIaszvrk1BeJmFkhfUyuXZp3/a2BlZ01pIIf2RVpimsqCuk4vYw3OB8MQZDihBniYaNjvogsl7VGoVfGiJHb1az3P8NUYDl0kn7MaNJC5Mboaqj9DCDTAht6mTl3qLkDvpMnIAbxxRCNwqSxhfUvOZJRVe3qKWeKfggOeAWFwxy/Ij3EpiD5eiA/PnuZEA0iuJ+EPEbjJdlcUxy9ZjGgn3t0f5VygMV9E6v9fVF+79ocWqyuugwO/4WTWC/jqq5dfujNfsQ3QZ+wfsyuyZsDiCsqdk0GS3sE7ngy4aDs4G4qdkzB0USFaydv7R/Rbvsy2sLwivB+pLboVrnAVtDIlHuaKtMR1De/K9G4vvjEQ89T4Os3bMwkMY15HnEX5mO5vARnnz+VfGcKCbIIQ== root@OBNODE02 diff --git a/nixops/ekman/users.nix b/nixops/ekman/users.nix new file mode 100644 index 0000000..5727823 --- /dev/null +++ b/nixops/ekman/users.nix @@ -0,0 +1,128 @@ +{ pkgs, ... }: +{ + users.groups = { + jonas = { gid = 1000; }; + olean = { gid = 1001; }; + frankgaa = { gid = 1002; }; + bast = { gid = 1003; }; + stig = { gid = 1004; }; + + sif = { + gid = 11000; + members = [ + "jonas" + "olean" + "bast" + "frankgaa" + "stig" + ]; + }; + }; + + users.users = { + jonas = { + description = "Jonas Juselius"; + home = "/home/jonas"; + group = "jonas"; + extraGroups = [ + "users" + "wheel" + "root" + "adm" + "admin" + "cdrom" + "fuse" + "wireshark" + "libvirtd" + "networkmanager" + "tty" + "keys" + ]; + uid = 1000; + isNormalUser = true; + createHome = true; + useDefaultShell = false; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDULdlLC8ZLu9qBZUYsjhpr6kv5RH4yPkekXQdD7prkqapyoptUkO1nOTDwy7ZsKDxmp9Zc6OtdhgoJbowhGW3VIZPmooWO8twcaYDpkxEBLUehY/n8SlAwBtiHJ4mTLLcynJMVrjmTQLF3FeWVof0Aqy6UtZceFpLp1eNkiHTCM3anwtb9+gfr91dX1YsAOqxqv7ooRDu5rCRUvOi4OvRowepyuBcCjeWpTkJHkC9WGxuESvDV3CySWkGC2fF2LHkAu6SFsFE39UA5ZHo0b1TK+AFqRFiBAb7ULmtuno1yxhpBxbozf8+Yyc7yLfMNCyBpL1ci7WnjKkghQv7yM1xN2XMJLpF56v0slSKMoAs7ThoIlmkRm/6o3NCChgu0pkpNg/YP6A3HfYiEDgChvA6rAHX6+to50L9xF3ajqk4BUzWd/sCk7Q5Op2lzj31L53Ryg8vMP8hjDjYcgEcCCsGOcjUVgcsmfC9LupwRIEz3aF14AWg66+3zAxVho8ozjes= jonas.juselius@juselius.io" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKiAS30ZO+wgfAqDE9Y7VhRunn2QszPHA5voUwo+fGOf jonas-3" + ]; + }; + + olean = { + description = "Ole Anders Nøst"; + home = "/home/olean"; + group = "olean"; + extraGroups = [ + "users" + ]; + uid = 1001; + isNormalUser = true; + createHome = true; + useDefaultShell = false; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAlfc2r3mNkvmdta+H/5zfdFe6317zmCdhhPYbipaGVFPUZO2cCTgSso28oDvOpCDldo/wl3jUxYNDlwH8LYMqKT3aGaOZr8JbxYzd+L+5GM2KTD+4YRmPtpYS/LWcc3j+fiFXSgX6Mrrgf6ineCRuBxSooDVE+pBakM1U7d5NE25apaAvclzFTmZBg0Sf9e5sgHkR99r9DUeGEQWGNZVUGwti39dFVp+aC9dsA+1/OtNB/HMF5G1MMk9dqvN7n7i9o9Plef2DParn4QU1GhmUKeEiBe4OAmSP+WwD4YvK6iXSKZG6tuTEspw+mR3rK5gBHrEiaNlCtp7O9BnAw4Wjhw== rsa-key-20201218" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCp3QEG9uJq4EKMRWlBkqg/EQD6+2E90E6/1i+JLbiBYBSV6Yqac6KzyJezaVXzch+qm6FFXas3thaBScbA4cELkETaxyNzYG6sNcLyEhlQn51pEsq2mFiq8IiaMaDc55/2HTbXVrpNoTNQFt6lBwHziKQYuUI0H0cxze+ppp0ZJOu1MsayW8JOv75YSv6WFIDRR+KP6dOEBu1PsP6plTZwK94ogjQ+3KHGcMAnE3cf8VCEF8akNC6GRmCgXNZE4I9MmKTDr217OoFpnXAx5/KTvGo+USkXc6xn/vbQsni4ExwGlMTg97RK49wIHD1NfGxZ3sv7mZ+UQPqqmSxCG+zueJrR6BSBfbm7fw5KvRn69rOihapeo/6GoqqVDe4yn1imtojjHN6+9pgJ9E6o108qbXRw2X6t1KUuXrB+fTfUKvy0kWiJFIMDSUtKF/nhiES+aCI4b4WBwyg5hdKGvgJdjyUS7P/jYgqWRe+qmknAERtQKlFDA/C6ChsTXerFD5Ikvu3dajJUiDehszEON5F4JlxSf2VpUFCDLVNqV/GjJqOg90mXGDk82c+0ZHIUsPLsdqR+t/xnOSv1Ks9I5fId6g+3OlR1ifnb3Qm48QGKbi/CM8M/QXzv4VgeIkRTR0Oi4W0P1tpUSyPd1nyGaM/B/FqN52XIUjRqIfu0emwgiw== olean@navier" + ]; + }; + + frankgaa = { + description = "Frank Gaardsted"; + home = "/home/frankgaa"; + group = "frankgaa"; + extraGroups = [ + "users" + ]; + uid = 1002; + isNormalUser = true; + createHome = true; + useDefaultShell = false; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTq/IAtLkvHaPKTsp5U9YnhBj7PLFflS9vWpm5e/bFXQkSShkqUOktff1GITIN+RTpUS8zF9UkJA8fj5K382DhIn4jVb9HvQzmHNBTxU5ClpOuKhfibrts5IKMLAiN1enwZYu0iUIVfDKTYmqgAnjN8B6OyzIAB8bsBUMdN29PEwJT4cCVRRySLRfoWiXiZKow71FzXIACgxMwGhj2fpslKQoat2LGny03XR7EZrv36u1OktT28Gxf4ZrGpT9+3SAyf7aW20xHALU/dHXVsfsuqnoqw1InZ5VhvIVtoIj+5Vc5dkTXkychL0Hb+WxiH5O/3T18YUqes08UPZX5G9kB fga@akvaplan.niva.no" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXv//iSTq5k1iYPZq9MKuF2OCE2UQPdR6TglWAeAnwL72UoKG068qDK3Ys+mFRY/S957hLn0FPFJPigcSaLzBq2v3G6kKySg68XWQfxBTSi5Wg81taNoJKQK+QAKfU2FiW9i1dLkvRKEXlY3tmF2mZLwqvrClRQMw8Nz0PQ5LnQfRgge07aXA3nDEf/nRuIaPG8zEki56lOONMWz4bGTjPn1y6y9gYAmskOc9w7uEOAy3VxkoR8fKvQM0ZTgt+6+68QxReyaDHH+12AqDxDy4wTCNX1LU902NDxyJZrUa2Xv9me2qN5O7hDOL/8S19MkJPBDEttMtA2rsFQlD9WYqycqgFhbOzLb7gixK1lrL3CYHsE9fXD2LuitSDXf79HFnCVHD5HJG7CbpIJLNNeTOCx94vspf9J8OENNdnNCgMFC1FKV/vdCiZ/RAOUCINrekvrX8FNjlXIhHOeK/gG6gP61oWpx3qbOExeMQTqWa9cGeHPtIdPiJVCza9Mg4X+0D9DCaP7KVLAxKioWqyd2WsyYeVhXA0OqnkEQk/jPZUjnxL1rnlH3I6QtVxHyqKcmmWEoRUnXId0ASUqx2hmsmI0TZD197PLFq53VO86v7jlAXLyzwmPh5VWdTOywklRpM29sZplVG/6gkHm/vM0DVSTEjVW+4mMFlzaiKgujH2fw== frankgaa@frankenstein" + ]; + }; + + bast = { + description = "Radovan Bast"; + home = "/home/bast"; + group = "bast"; + extraGroups = [ + "users" + "wheel" + "root" + ]; + uid = 1003; + isNormalUser = true; + createHome = true; + useDefaultShell = false; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFbrEhm1acesXmbgfO5lN1gcTFXqusq61QyCZXunYJpl" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIdcJteh9d/N1o8BbdEMRVxeMjm28saon/Oh2tV0+TYj" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEg6tHlB5xco85d4XJja71hz1nEe9wFF1+ht8oKULkwh" + ]; + }; + + stig = { + description = "Stig Rune Jensen"; + home = "/home/stig"; + group = "stig"; + extraGroups = [ + "users" + "wheel" + "root" + ]; + uid = 1004; + isNormalUser = true; + createHome = true; + useDefaultShell = false; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [ + ]; + }; + }; + +} diff --git a/nixops/hosts.nix b/nixops/hosts.nix deleted file mode 100644 index 98e83bf..0000000 --- a/nixops/hosts.nix +++ /dev/null @@ -1,26 +0,0 @@ -'' - 10.1.30.10 fs0-0 fs0-0.itpartner.intern - 10.1.30.10 fs1-0 fs1-0.itpartner.intern - 10.1.8.10 fs2-0 fs2-0.itpartner.intern - - 10.1.30.80 psql1-0 psql1-0.itpartner.intern - - 10.1.8.50 k0-0 k0-0.itpartner.intern - 10.1.8.51 k0-1 k0-1.itpartner.intern - 10.1.8.52 k0-2 k0-2.itpartner.intern - - 10.1.8.60 k2-0 k2-0.itpartner.intern - 10.1.8.61 k2-1 k2-1.itpartner.intern - 10.1.8.62 k2-2 k2-2.itpartner.intern - 10.1.8.63 k2-3 k2-3.itpartner.intern - 10.1.8.64 k2-4 k2-4.itpartner.intern - 10.1.8.65 k2-5 k2-5.itpartner.intern - 10.1.8.66 k2-6 k2-6.itpartner.intern - - 10.1.30.100 k1-0 k1-0.itpartner.intern - 10.1.30.101 k1-1 k1-1.itpartner.intern - 10.1.30.102 k1-2 k1-2.itpartner.intern - 10.1.30.103 k1-3 k1-3.itpartner.intern - 10.1.30.104 k1-4 k1-4.itpartner.intern - 10.1.30.105 k1-5 k1-5.itpartner.intern -'' diff --git a/nixops/stokes/connauthfile b/nixops/stokes/connauthfile deleted file mode 100644 index 8c58a28..0000000 --- a/nixops/stokes/connauthfile +++ /dev/null @@ -1 +0,0 @@ -Elĺşt8pźIňŢV‹7öF5(ľăMtßÍsƒÍDŁŁœٝíXŰ%Nöń:@(9s6]ŒŁ*źŻôËq;…SËYbˤ„k—hdŽ1mÂk