diff --git a/hosts/docker/default.nix b/hosts/docker/default.nix index 388e1de..f9bf070 100644 --- a/hosts/docker/default.nix +++ b/hosts/docker/default.nix @@ -1,23 +1,21 @@ -{pkgs, ...}: let - rootDisk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0"; - rootPart = "/dev/disk/by-uuid/5dc8ca3b-177a-458e-b8a8-89309168d0fc"; - dockerPart = "/dev/disk/by-uuid/95461a94-ad91-43b9-b502-2b5d4496b84e"; -in { - # Boot loader. - boot.loader.grub.device = rootDisk; - +{pkgs, ...}: { # Root filesystem. fileSystems."/" = { - device = rootPart; + device = "/dev/disk/by-uuid/cac60222-9b38-4938-8b17-5fddd67e8e26"; fsType = "ext4"; }; # Docker data directory fileSystems."/home/fern/docker/data" = { - device = dockerPart; + device = "/dev/disk/by-uuid/95461a94-ad91-43b9-b502-2b5d4496b84e"; fsType = "ext4"; }; + # Swap. + swapDevices = [ + {device = "/dev/disk/by-uuid/55dfb275-75de-4519-8f98-3491cefed32b";} + ]; + # Media HDDs. fileSystems."/mnt/hdd0" = { device = "/dev/disk/by-uuid/fcee0188-8ca1-4fda-81b7-f5920c79ab48"; @@ -37,6 +35,8 @@ in { # Install some packages. environment.systemPackages = with pkgs; [ mergerfs + ansible + (python3.withPackages (ps: [ps.ansible ps.pip ps.requests])) ]; # MergerFS. diff --git a/hosts/minecraft/default.nix b/hosts/minecraft/default.nix index 9a15107..ec2d423 100644 --- a/hosts/minecraft/default.nix +++ b/hosts/minecraft/default.nix @@ -1,20 +1,18 @@ -let - rootDisk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0"; - rootPart = "/dev/disk/by-uuid/f59330d9-0315-43c0-90a1-d9b13c6298f9"; - dockerPart = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3"; -in { - # Bootloader. - boot.loader.grub.device = rootDisk; - +{ # Root filesystem. fileSystems."/" = { - device = rootPart; + device = "/dev/disk/by-uuid/cbd70e61-fcdc-4b1f-af03-d3da8a2866ea"; fsType = "ext4"; }; # Docker data directory. - fileSystems."/home/fern/docker" = { - device = dockerPart; + fileSystems."/home/fern/docker/data" = { + device = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3"; fsType = "ext4"; }; + + # Swap. + swapDevices = [ + {device = "/dev/disk/by-uuid/45cafadd-90f2-4b65-82fc-60d59eb75786";} + ]; } diff --git a/hosts/musicbrainz/default.nix b/hosts/musicbrainz/default.nix index 37d4fc7..fd44584 100644 --- a/hosts/musicbrainz/default.nix +++ b/hosts/musicbrainz/default.nix @@ -1,20 +1,18 @@ -{pkgs, ...}: let - rootDisk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0"; - rootPart = "/dev/disk/by-uuid/d90b9f44-42fb-4ccc-8b8d-05375d953742"; - dockerPart = "/dev/disk/by-uuid/0eb05c79-7765-4b7e-bf22-c3a53f516db5"; -in { - boot.loader.grub.device = rootDisk; - +{pkgs, ...}: { fileSystems."/" = { - device = rootPart; + device = "/dev/disk/by-uuid/5d71cc16-f1ee-4b87-87b2-00fdf98442bd"; fsType = "ext4"; }; - fileSystems."/home/fern/docker" = { - device = dockerPart; + fileSystems."/home/fern/docker/data" = { + device = "/dev/disk/by-uuid/0eb05c79-7765-4b7e-bf22-c3a53f516db5"; fsType = "ext4"; }; + swapDevices = [ + {device = "/dev/disk/by-uuid/b2456f94-1a8b-4de4-bd49-a9909d7487ec";} + ]; + # Update Musicbrainz search indexes once a week. systemd.timers."musicbrainz-update-indexes" = { wantedBy = ["timers.target"]; diff --git a/suites/server/docker/default.nix b/suites/server/docker/default.nix index af46ad8..4e43145 100644 --- a/suites/server/docker/default.nix +++ b/suites/server/docker/default.nix @@ -7,16 +7,12 @@ # Enable docker. virtualisation.docker = { enable = true; - autoPrune.enable = true; liveRestore = true; - daemon.settings = { - data-root = "/home/fern/docker/daemon"; - default-address-pools = [ - { - base = "172.20.0.0/12"; - size = 24; - } - ]; - }; + daemon.settings.default-address-pools = [ + { + base = "172.20.0.0/12"; + size = 24; + } + ]; }; } diff --git a/suites/server/vm/default.nix b/suites/server/vm/default.nix index 22b57e7..1cfb78f 100644 --- a/suites/server/vm/default.nix +++ b/suites/server/vm/default.nix @@ -16,7 +16,10 @@ boot.kernelModules = ["kvm-intel"]; # Configure the bootloader. - boot.loader.grub.enable = true; + boot.loader.grub = { + enable = true; + device = "/dev/sda"; + }; # Enable QEMU guest agent services.qemuGuest.enable = true;