Use ZFS storage driver for containers

This commit is contained in:
2022-12-20 14:03:09 +01:00
parent 8ea60d90df
commit 663e5cb739
2 changed files with 96 additions and 77 deletions

View File

@@ -31,11 +31,31 @@
# Set environment variable pointing to wallabag configuration directory
environment.variables.WALLABAG_DATA = "/var/lib/wallabag";
# Openbooks configuration
virtualisation.oci-containers.containers = {
openbooks = {
image = "evanbuss/openbooks:latest";
ports = [ "127.0.0.1:9000:80" ];
# Podman setup with ZFS
virtualisation = {
containers.enable = true;
containers.storage.settings.storage = {
driver = "zfs";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
podman = {
enable = true;
dockerCompat = true;
extraPackages = with pkgs; [ zfs ];
};
# Openbooks configuration
oci-containers = {
backend = "podman";
containers = {
openbooks = {
image = "evanbuss/openbooks:latest";
ports = [ "127.0.0.1:9000:80" ];
};
};
};
};
}