feat(nixos): add podman module

This commit is contained in:
Mohammad Rafiq 2025-06-19 20:13:00 +08:00
parent 2ff647abef
commit f11377e0ca
No known key found for this signature in database
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.machine.virtualisation.podman;
in
{
options.machine.virtualisation.podman = {
enable = mkEnableOption "";
};
config = mkIf cfg.enable {
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
users.users."${config.mainUser.name}".extraGroups = [ "podman" ];
};
}

View file

@ -14,6 +14,7 @@
drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434";
ephemeralRoot = true;
};
virtualisation.podman.enable = true;
};
desktop = {