From b0e58ab19827b7601e4fb2b830557f4dc575c0f6 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 7 Feb 2021 20:21:32 +0000 Subject: [PATCH] ops/nixos: rename blade-leader to blade-janeway --- .../default.nix | 31 ++++++++++--------- ops/nixos/default.nix | 2 +- 2 files changed, 17 insertions(+), 16 deletions(-) rename ops/nixos/{blade-leader => blade-janeway}/default.nix (63%) diff --git a/ops/nixos/blade-leader/default.nix b/ops/nixos/blade-janeway/default.nix similarity index 63% rename from ops/nixos/blade-leader/default.nix rename to ops/nixos/blade-janeway/default.nix index e4be4792eb..26f5b196de 100644 --- a/ops/nixos/blade-leader/default.nix +++ b/ops/nixos/blade-janeway/default.nix @@ -6,34 +6,35 @@ 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 - btrfs = subvol: { - device = "/dev/sda1"; - fsType = "btrfs"; - options = [ "subvol=${subvol}" ]; + zfs = device: { + device = device; + fsType = "zfs"; }; 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"; + "/" = 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.devices = [ - "/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E43F" - "/dev/disk/by-id/ata-CT2000MX500SSD1_2052E4E1E45D" - ]; + boot.loader.grub.device = "/dev/disk/by-id/usb-USB_SanDisk_3.2Gen1_0401c0556e165beb5c1df7b9f438e6ba98af3caa816d88e69b2bf7ec2909f6ca293a000000000000000000009c7343f0ff88671891558107c52824c1-0:0"; # Networking! networking = { - hostName = "blade-leader"; + hostName = "blade-janeway"; + hostId = "3a62390f"; domain = "house.as205479.net"; nameservers = ["8.8.8.8" "8.8.4.4"]; useDHCP = false; @@ -50,7 +51,7 @@ in { }; }; }; - my.ip.tailscale = "100.87.45.114"; + my.ip.tailscale = "100.121.116.85"; system.stateVersion = "21.05"; } diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index b3b21eedfe..0679b3c763 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -25,7 +25,7 @@ let "swann" "clouvider-lon01" "etheroute-lon01" - "blade-leader" + "blade-janeway" ]; rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; })); systemCfgs = lib.genAttrs systems