Compare commits
5 commits
fdf03e9547
...
d19c81dfb4
Author | SHA1 | Date | |
---|---|---|---|
d19c81dfb4 | |||
20afd1b93e | |||
c07ac78bec | |||
fa8f67bc4b | |||
8ef843fa94 |
5 changed files with 42 additions and 37 deletions
|
@ -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.
|
||||||
|
|
|
@ -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";}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"];
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue