diff --git a/ops/nixos/blade-janeway/default.nix b/ops/nixos/blade-janeway/default.nix index 26f5b196de..9ddb13b0af 100644 --- a/ops/nixos/blade-janeway/default.nix +++ b/ops/nixos/blade-janeway/default.nix @@ -7,51 +7,19 @@ let inherit (depot.ops) secrets; in { imports = [ - ../lib/zfs.nix + ../lib/blade.nix ]; - boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "uhci_hcd" "be2iscsi" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.kernelParams = [ "mitigations=off" ]; - - fileSystems = let - zfs = device: { - device = device; - fsType = "zfs"; - }; - in { - "/" = zfs "tank/local/root"; - "/tmp" = zfs "tank/local/tmp"; - "/nix" = zfs "tank/local/nix"; - "/var" = zfs "tank/safe/var"; - "/home" = zfs "tank/safe/home"; - }; - - boot.loader.grub.enable = true; - boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/disk/by-id/usb-USB_SanDisk_3.2Gen1_0401c0556e165beb5c1df7b9f438e6ba98af3caa816d88e69b2bf7ec2909f6ca293a000000000000000000009c7343f0ff88671891558107c52824c1-0:0"; # Networking! networking = { hostName = "blade-janeway"; hostId = "3a62390f"; - domain = "house.as205479.net"; - nameservers = ["8.8.8.8" "8.8.4.4"]; - useDHCP = false; - interfaces.bond0.useDHCP = true; - bonds.bond0 = { - interfaces = [ - "enp4s0f0" "enp4s0f1" - "enp5s0f0" "enp5s0f1" - ]; - driverOptions = { - mode = "802.3ad"; - miimon = "1000"; - lacp_rate = "fast"; - }; - }; + bonds.bond0.interfaces = [ + "enp4s0f0" "enp4s0f1" + "enp5s0f0" "enp5s0f1" + ]; }; my.ip.tailscale = "100.121.116.85"; - - system.stateVersion = "21.05"; } diff --git a/ops/nixos/lib/blade.nix b/ops/nixos/lib/blade.nix new file mode 100644 index 0000000000..67d04bc36f --- /dev/null +++ b/ops/nixos/lib/blade.nix @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../lib/zfs.nix + ]; + + boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "uhci_hcd" "be2iscsi" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.kernelParams = [ "mitigations=off" ]; + + fileSystems = let + zfs = device: { + device = device; + fsType = "zfs"; + }; + in { + "/" = zfs "tank/local/root"; + "/tmp" = zfs "tank/local/tmp"; + "/nix" = zfs "tank/local/nix"; + "/var" = zfs "tank/safe/var"; + "/home" = zfs "tank/safe/home"; + }; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + + # Networking! + networking = { + domain = "house.as205479.net"; + nameservers = ["8.8.8.8" "8.8.4.4"]; + useDHCP = false; + interfaces.bond0.useDHCP = true; + bonds.bond0 = { + driverOptions = { + mode = "802.3ad"; + miimon = "1000"; + lacp_rate = "fast"; + }; + }; + }; + + virtualisation.podman.enable = true; + + system.stateVersion = "21.05"; +}