Compare commits

...

5 commits

Author SHA1 Message Date
d19c81dfb4 docker.local 2025-08-25 16:22:40 +08:00
20afd1b93e Finish minecraft 2025-08-24 22:35:48 +08:00
c07ac78bec Start on minecraft VM 2025-08-24 22:13:47 +08:00
fa8f67bc4b Disk paths 2025-08-24 21:28:03 +08:00
8ef843fa94 First docker changes 2025-08-24 20:55:23 +08:00
5 changed files with 42 additions and 37 deletions

View file

@ -1,21 +1,23 @@
{pkgs, ...}: { {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;
# Root filesystem. # Root filesystem.
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/cac60222-9b38-4938-8b17-5fddd67e8e26"; device = rootPart;
fsType = "ext4"; fsType = "ext4";
}; };
# Docker data directory # Docker data directory
fileSystems."/home/fern/docker/data" = { fileSystems."/home/fern/docker/data" = {
device = "/dev/disk/by-uuid/95461a94-ad91-43b9-b502-2b5d4496b84e"; device = dockerPart;
fsType = "ext4"; fsType = "ext4";
}; };
# Swap.
swapDevices = [
{device = "/dev/disk/by-uuid/55dfb275-75de-4519-8f98-3491cefed32b";}
];
# Media HDDs. # Media HDDs.
fileSystems."/mnt/hdd0" = { fileSystems."/mnt/hdd0" = {
device = "/dev/disk/by-uuid/fcee0188-8ca1-4fda-81b7-f5920c79ab48"; device = "/dev/disk/by-uuid/fcee0188-8ca1-4fda-81b7-f5920c79ab48";
@ -35,8 +37,6 @@
# Install some packages. # Install some packages.
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
mergerfs mergerfs
ansible
(python3.withPackages (ps: [ps.ansible ps.pip ps.requests]))
]; ];
# MergerFS. # MergerFS.

View file

@ -1,18 +1,20 @@
{ 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. # Root filesystem.
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/cbd70e61-fcdc-4b1f-af03-d3da8a2866ea"; device = rootPart;
fsType = "ext4"; fsType = "ext4";
}; };
# Docker data directory. # Docker data directory.
fileSystems."/home/fern/docker/data" = { fileSystems."/home/fern/docker" = {
device = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3"; device = dockerPart;
fsType = "ext4"; fsType = "ext4";
}; };
# Swap.
swapDevices = [
{device = "/dev/disk/by-uuid/45cafadd-90f2-4b65-82fc-60d59eb75786";}
];
} }

View file

@ -1,18 +1,20 @@
{pkgs, ...}: { {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;
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/5d71cc16-f1ee-4b87-87b2-00fdf98442bd"; device = rootPart;
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home/fern/docker/data" = { fileSystems."/home/fern/docker" = {
device = "/dev/disk/by-uuid/0eb05c79-7765-4b7e-bf22-c3a53f516db5"; device = dockerPart;
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [
{device = "/dev/disk/by-uuid/b2456f94-1a8b-4de4-bd49-a9909d7487ec";}
];
# Update Musicbrainz search indexes once a week. # Update Musicbrainz search indexes once a week.
systemd.timers."musicbrainz-update-indexes" = { systemd.timers."musicbrainz-update-indexes" = {
wantedBy = ["timers.target"]; wantedBy = ["timers.target"];

View file

@ -7,12 +7,16 @@
# Enable docker. # Enable docker.
virtualisation.docker = { virtualisation.docker = {
enable = true; enable = true;
autoPrune.enable = true;
liveRestore = true; liveRestore = true;
daemon.settings.default-address-pools = [ daemon.settings = {
{ data-root = "/home/fern/docker/daemon";
base = "172.20.0.0/12"; default-address-pools = [
size = 24; {
} base = "172.20.0.0/12";
]; size = 24;
}
];
};
}; };
} }

View file

@ -16,10 +16,7 @@
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
# Configure the bootloader. # Configure the bootloader.
boot.loader.grub = { boot.loader.grub.enable = true;
enable = true;
device = "/dev/sda";
};
# Enable QEMU guest agent # Enable QEMU guest agent
services.qemuGuest.enable = true; services.qemuGuest.enable = true;