diff --git a/ops/nixos/blade-leader/default.nix b/ops/nixos/blade-leader/default.nix new file mode 100644 index 0000000000..e4be4792eb --- /dev/null +++ b/ops/nixos/blade-leader/default.nix @@ -0,0 +1,56 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + 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 + btrfs = subvol: { + device = "/dev/sda1"; + fsType = "btrfs"; + options = [ "subvol=${subvol}" ]; + }; + in { + "/" = btrfs "nixos/local/root"; + "/tmp" = btrfs "nixos/local/tmp"; + "/nix" = btrfs "nixos/local/nix"; + "/var" = btrfs "nixos/safe/var"; + "/home" = btrfs "nixos/safe/home"; + }; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.devices = [ + "/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E43F" + "/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E45D" + ]; + + # Networking! + networking = { + hostName = "blade-leader"; + 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"; + }; + }; + }; + my.ip.tailscale = "100.87.45.114"; + + system.stateVersion = "21.05"; +} diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index 8df2fff134..71ebd59950 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -15,7 +15,18 @@ let system = builtins.currentSystem; modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ]; }); - systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" "totoro" "kusakabe" "swann" "clouvider-lon01" "etheroute-lon01" ]; + systems = [ + "porcorosso" + "ixvm-fra01" + "marukuru" + "clouvider-fra01" + "totoro" + "kusakabe" + "swann" + "clouvider-lon01" + "etheroute-lon01" + "blade-leader" + ]; rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; })); systemCfgs = lib.genAttrs systems (name: import (./. + "/${name}"));