Compare commits
No commits in common. "d19c81dfb48b0d9c33fffc443b5a085c3928414c" and "fdf03e95474efac67273de778d3588d42d50b3cb" have entirely different histories.
d19c81dfb4
...
fdf03e9547
5 changed files with 37 additions and 42 deletions
|
@ -1,23 +1,21 @@
|
||||||
{pkgs, ...}: let
|
{pkgs, ...}: {
|
||||||
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 = rootPart;
|
device = "/dev/disk/by-uuid/cac60222-9b38-4938-8b17-5fddd67e8e26";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docker data directory
|
# Docker data directory
|
||||||
fileSystems."/home/fern/docker/data" = {
|
fileSystems."/home/fern/docker/data" = {
|
||||||
device = dockerPart;
|
device = "/dev/disk/by-uuid/95461a94-ad91-43b9-b502-2b5d4496b84e";
|
||||||
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";
|
||||||
|
@ -37,6 +35,8 @@ in {
|
||||||
# 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,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.
|
# Root filesystem.
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = rootPart;
|
device = "/dev/disk/by-uuid/cbd70e61-fcdc-4b1f-af03-d3da8a2866ea";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Docker data directory.
|
# Docker data directory.
|
||||||
fileSystems."/home/fern/docker" = {
|
fileSystems."/home/fern/docker/data" = {
|
||||||
device = dockerPart;
|
device = "/dev/disk/by-uuid/3730e48a-8784-4c49-8692-473c9b4bc8c3";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Swap.
|
||||||
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/45cafadd-90f2-4b65-82fc-60d59eb75786";}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
{pkgs, ...}: let
|
{pkgs, ...}: {
|
||||||
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 = rootPart;
|
device = "/dev/disk/by-uuid/5d71cc16-f1ee-4b87-87b2-00fdf98442bd";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home/fern/docker" = {
|
fileSystems."/home/fern/docker/data" = {
|
||||||
device = dockerPart;
|
device = "/dev/disk/by-uuid/0eb05c79-7765-4b7e-bf22-c3a53f516db5";
|
||||||
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,16 +7,12 @@
|
||||||
# Enable docker.
|
# Enable docker.
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoPrune.enable = true;
|
|
||||||
liveRestore = true;
|
liveRestore = true;
|
||||||
daemon.settings = {
|
daemon.settings.default-address-pools = [
|
||||||
data-root = "/home/fern/docker/daemon";
|
{
|
||||||
default-address-pools = [
|
base = "172.20.0.0/12";
|
||||||
{
|
size = 24;
|
||||||
base = "172.20.0.0/12";
|
}
|
||||||
size = 24;
|
];
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
|
||||||
# Configure the bootloader.
|
# Configure the bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub = {
|
||||||
|
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