new: podman
This commit is contained in:
parent
83b1b001e9
commit
9aa11e45b8
@ -40,6 +40,7 @@
|
||||
mkPkgs = pkgs: extraOverlays: import pkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
# config.cudaSupport = true;
|
||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,10 @@
|
||||
steam.enable = true;
|
||||
lutris.enable = true;
|
||||
};
|
||||
graphics.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
models.enable = true;
|
||||
};
|
||||
media = {
|
||||
recording.enable = true;
|
||||
};
|
||||
@ -60,6 +63,7 @@
|
||||
services = {
|
||||
ssh.enable = true;
|
||||
nginx.enable = true;
|
||||
podman.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@ in {
|
||||
unstable.obs-studio-plugins.obs-vkcapture
|
||||
unstable.handbrake
|
||||
ffmpeg
|
||||
olive-editor
|
||||
] else []);
|
||||
};
|
||||
}
|
||||
|
33
modules/services/podman.nix
Normal file
33
modules/services/podman.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user