mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
system/podman: have module available
This commit is contained in:
parent
19520eae7f
commit
7e9276152a
7 changed files with 56 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./docker
|
||||
./podman
|
||||
];
|
||||
}
|
||||
|
||||
|
|
30
modules/system/podman/default.nix
Normal file
30
modules/system/podman/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Podman related settings
|
||||
{ config, inputs, lib, options, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.system.podman;
|
||||
in
|
||||
{
|
||||
options.my.system.podman = with lib; {
|
||||
enable = mkEnableOption "podman configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
];
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
|
||||
# Use fake `docker` command to redirect to `podman`
|
||||
dockerCompat = true;
|
||||
|
||||
# Expose a docker-like socket
|
||||
dockerSocket.enable = true;
|
||||
|
||||
# Allow DNS resolution in the default network
|
||||
defaultNetwork.dnsname.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue