feat(nixos): add podman module
This commit is contained in:
parent
2ff647abef
commit
f11377e0ca
2 changed files with 22 additions and 0 deletions
21
modules/nixos/machine/virtualisation/podman/default.nix
Normal file
21
modules/nixos/machine/virtualisation/podman/default.nix
Normal 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" ];
|
||||
};
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434";
|
||||
ephemeralRoot = true;
|
||||
};
|
||||
virtualisation.podman.enable = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue