Merge pull request 'use faster podman zfs driver instead of overlayfs' (#97) from Mic92-main into main
All checks were successful
build / test (push) Successful in 9s

This commit is contained in:
clan-bot 2023-09-13 10:28:03 +00:00
commit e48532f8ca
3 changed files with 16 additions and 7 deletions

View File

@ -15,11 +15,6 @@
}
];
hcloud.imports = [
inputs.srvos.nixosModules.hardware-hetzner-cloud
./single-disk.nix
];
hetzner-ax102.imports = [
inputs.srvos.nixosModules.hardware-hetzner-online-amd
./zfs-crypto-raid.nix

View File

@ -19,7 +19,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "podman.service" ];
requires = [ "podman.service" ];
path = [ pkgs.podman pkgs.gnutar pkgs.shadow pkgs.getent ];
path = [ config.virtualisation.podman.package pkgs.gnutar pkgs.shadow pkgs.getent ];
# we also include etc here because the cleanup job also wants the nixuser to be present
script = ''
set -eux -o pipefail
@ -94,7 +94,17 @@ in
};
# Format of the token file:
virtualisation.podman.enable = true;
virtualisation = {
podman.enable = true;
podman.extraPackages = [ pkgs.zfs ];
};
virtualisation.containers.storage.settings = {
storage.driver = "zfs";
storage.graphroot = "/var/lib/containers/storage";
storage.runroot = "/run/containers/storage";
storage.options.zfs.fsname = "zroot/root/podman";
};
virtualisation.containers.containersConf.settings = {
# podman seems to not work with systemd-resolved
containers.dns_servers = [ "8.8.8.8" "8.8.4.4" ];

View File

@ -82,6 +82,10 @@ in
options.mountpoint = "/home";
mountpoint = "/home";
};
"root/podman" = {
type = "zfs_fs";
options.mountpoint = "none";
};
};
};
};