new: podman

This commit is contained in:
L-Nafaryus 2023-06-29 15:59:03 +05:00
parent 83b1b001e9
commit 9aa11e45b8
4 changed files with 40 additions and 1 deletions

View File

@ -40,6 +40,7 @@
mkPkgs = pkgs: extraOverlays: import pkgs { mkPkgs = pkgs: extraOverlays: import pkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
# config.cudaSupport = true;
overlays = extraOverlays ++ (lib.attrValues self.overlays); overlays = extraOverlays ++ (lib.attrValues self.overlays);
}; };

View File

@ -25,7 +25,10 @@
steam.enable = true; steam.enable = true;
lutris.enable = true; lutris.enable = true;
}; };
graphics.enable = true; graphics = {
enable = true;
models.enable = true;
};
media = { media = {
recording.enable = true; recording.enable = true;
}; };
@ -60,6 +63,7 @@
services = { services = {
ssh.enable = true; ssh.enable = true;
nginx.enable = true; nginx.enable = true;
podman.enable = true;
}; };
}; };

View File

@ -23,6 +23,7 @@ in {
unstable.obs-studio-plugins.obs-vkcapture unstable.obs-studio-plugins.obs-vkcapture
unstable.handbrake unstable.handbrake
ffmpeg ffmpeg
olive-editor
] else []); ] else []);
}; };
} }

View File

@ -0,0 +1,33 @@
{ config, options, pkgs, lib, ... }:
with lib;
with lib.custom;
let
cfg = config.modules.services.podman;
in {
options.modules.services.podman = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
oci-containers = {
backend = "podman";
containers = {
container-name = {
image = "container-image";
autoStart = true;
ports = [ "127.0.0.1:1234:1234" ];
};
};
};
};
};
}