Use overlay instead of ZFS for containers

This commit is contained in:
coolneng 2023-02-27 21:55:12 +01:00
parent 2ec952360f
commit 1c6f4af430
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 21 additions and 74 deletions

View File

@ -23,49 +23,24 @@
fsType = "vfat";
};
fileSystems."/var/lib/containers" =
{ device = "vault/containers";
fsType = "zfs";
};
fileSystems."/var/lib/gitea" =
{ device = "vault/state_directories/gitea";
fsType = "zfs";
};
fileSystems."/var/lib/signald" =
{ device = "vault/state_directories/signald";
fsType = "zfs";
};
fileSystems."/var/lib/matrix-as-facebook" =
{ device = "vault/state_directories/matrix-as-facebook";
fsType = "zfs";
};
fileSystems."/var/lib/wallabag" =
{ device = "vault/state_directories/wallabag";
fsType = "zfs";
};
fileSystems."/var/lib/matrix-as-signal" =
{ device = "vault/state_directories/matrix-as-signal";
fsType = "zfs";
};
fileSystems."/vault" =
{ device = "vault";
fileSystems."/var/lib/signald" =
{ device = "vault/state_directories/signald";
fsType = "zfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/151ec7c12d73e7e161d8df82605f911820f25e6186d655a18c54b481c4be723f/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/18aaf1ac7583433d84488ea6594032549dc37d959751c096780f03cfa8a31ae7/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
fileSystems."/var/lib/gitea" =
{ device = "vault/state_directories/gitea";
fsType = "zfs";
};
fileSystems."/var/lib/matrix-as-telegram" =
@ -73,28 +48,13 @@
fsType = "zfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/1996d0540bceeb3dea027b3e5ef9e6cd94ea527ce657bf6461286d7b4afa637f/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
fileSystems."/vault" =
{ device = "vault";
fsType = "zfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/1dece57fa7124ac19a7f9b1b97b32d1ea137775ec33a35375741f3e74be3e85e/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/737d2ce2ce884a2dffe6640ad1e0ea8fe2cf0a200f13a9490bb7f89bb19940cb/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/522343abee32edddd051c93a47bc7d2208e0bbcef724e4c4319cbbc49f5d361d/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
};
fileSystems."/vault/backups" =
{ device = "vault/backups";
fileSystems."/var/lib/wallabag" =
{ device = "vault/state_directories/wallabag";
fsType = "zfs";
};
@ -103,11 +63,21 @@
fsType = "zfs";
};
fileSystems."/vault/backups" =
{ device = "vault/backups";
fsType = "zfs";
};
fileSystems."/vault/radicale" =
{ device = "vault/radicale";
fsType = "zfs";
};
fileSystems."/vault/backups/zion" =
{ device = "vault/backups/zion";
fsType = "zfs";
};
fileSystems."/vault/syncthing" =
{ device = "vault/syncthing";
fsType = "zfs";
@ -118,21 +88,6 @@
fsType = "zfs";
};
fileSystems."/vault/backups/zion" =
{ device = "vault/backups/zion";
fsType = "zfs";
};
fileSystems."/var/lib/containers/storage/zfs-containers/bdf459f14fb37fc18ea348e6344edf3107b797a8fc3e281d44778550a4a058d2/userdata/shm" =
{ device = "shm";
fsType = "tmpfs";
};
fileSystems."/var/lib/containers/storage/zfs/graph/46fdb9b91b2e60fc56d521f03e2d7b5ee901670d481ced7553d3208d16f654b5" =
{ device = "vault/containers/46fdb9b91b2e60fc56d521f03e2d7b5ee901670d481ced7553d3208d16f654b5";
fsType = "zfs";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -140,9 +95,7 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.cni-podman0.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.vethbb9fbdc4.useDHCP = lib.mkDefault true;
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;

View File

@ -31,15 +31,9 @@
# Set environment variable pointing to wallabag configuration directory
environment.variables.WALLABAG_DATA = "/var/lib/wallabag";
# Podman setup with ZFS
# Podman setup
virtualisation = {
containers.enable = true;
containers.storage.settings.storage = {
driver = "zfs";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
podman = {
enable = true;
dockerCompat = true;