Files
nixos/configuration/modules/virtualisation.nix
worble c3171bd792 remove nftables (linux uses this by default now anyways i think?)
add busybox since its basically expected by some programs (comes with xz)
make virtualisation a proper module so i can flip between docker and podman (i will make podman work one day i swear)
add waydroid back in
electrum is busted for now
make resharper a bit more modular
add new firefox bs
2025-11-07 11:28:21 +00:00

56 lines
1.6 KiB
Nix

{ pkgs, lib, config, inputs, ... }:
with lib;
{
options.virtualisation.containerManagement = mkOption {
type = types.enum [ "docker" "podman" ];
default = "docker";
};
config = {
virtualisation = {
containers = {
# Enable common container config files in /etc/containers
enable = true;
};
libvirtd = {
enable = true;
qemu = {
vhostUserPackages = [ pkgs.virtiofsd ];
ovmf.enable = true;
};
};
# remember to add the necessary users to the podman group
podman = {
enable = if (config.virtualisation.containerManagement == "podman") then true else false;
dockerSocket.enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
# remember to add the necessary users to the docker group
docker = {
enable = if (config.virtualisation.containerManagement == "docker") then true else false;
storageDriver = "btrfs";
};
waydroid = {
enable = true;
# TODO: update when this is in stable
package = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waydroid-nftables;
};
};
programs.virt-manager.enable = true;
environment.systemPackages = with pkgs;[
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waydroid-helper
] ++ optionals (config.virtualisation.containerManagement == "podman") [
docker-compose
# podman-compose
podman-tui
podman-desktop
] ++ optionals (config.virtualisation.containerManagement == "docker") [
lazydocker
];
};
}