Lots of refactoring

This commit is contained in:
Lauren Lagarde 2025-03-09 22:53:51 -05:00
parent 2f65f8fcba
commit 70e37a959e
46 changed files with 635 additions and 400 deletions

View file

@ -0,0 +1,11 @@
{ ... }: {
virtualisation.docker.enable = true;
virtualisation.containers.enable = true;
# Enable podman, but don't default to it
virtualisation.podman = {
enable = true;
dockerCompat = false;
defaultNetwork.settings.dns_enabled = true;
};
}

View file

@ -0,0 +1,21 @@
{ ... }: {
virtualisation.oci-containers.backend = "docker";
virtualisation.oci-containers.containers = {
dockge = {
image = "louislam/dockge";
ports = [
"5001:5001"
];
volumes = [
"/var/run/docker.sock:/var/run/docker.sock"
"/opt/stacks/dockge/data:/app/data"
"/root/.docker/:/root/.docker"
"/opt/stacks:/opt/stacks"
];
environment = {
DOCKGE_STACKS_DIR = "/opt/stacks";
};
};
};
}

View file

@ -0,0 +1,6 @@
{ ... }: {
boot.initrd = {
kernelModules = [ "virtio_net" "e1000" ];
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
};
}

View file

@ -0,0 +1,3 @@
{ ... }: {
virtualisation.libvirtd.enable = true;
}

View file

@ -0,0 +1,40 @@
{ pkgs, lib, ... }: {
systemd.mounts = [
{
type = "ext4";
options = "rw";
what = "/dev/vda";
where = "/persistent";
}
];
systemd.automounts = [
{
wantedBy = [ "multi-user.target" ];
where = "/persistent";
}
];
virtualisation.docker.daemon.settings = {
data-root = "/persistent/docker-root";
};
virtualisation.oci-containers.backend = "docker";
virtualisation.oci-containers.containers = {
dockge = {
image = "louislam/dockge";
ports = [
"5001:5001"
];
volumes = [
"/var/run/docker.sock:/var/run/docker.sock"
"/persistent/stacks/dockge/data:/app/data"
"/root/.docker/:/root/.docker"
"/persistent/stacks:/persistent/stacks"
];
environment = {
DOCKGE_STACKS_DIR = "/persistent/stacks";
};
};
};
}

View file

@ -0,0 +1,10 @@
{ ... }: {
virtualisation.libvirtd.enable = false;
virtualisation.virtualbox = {
host = {
enable = true;
enableExtensionPack = true;
};
};
}