mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-12-23 02:36:05 +01:00
add podman
This commit is contained in:
parent
06b4ecb70e
commit
0c49512ebc
@ -42,6 +42,7 @@ in
|
||||
../../modules/thunderbird.nix
|
||||
#../../modules/digikam.nix
|
||||
#../../modules/android.nix
|
||||
#../../modules/podman.nix
|
||||
];
|
||||
|
||||
networking.hostName = "yodaTab";
|
||||
|
@ -42,6 +42,7 @@ in
|
||||
../../modules/thunderbird.nix
|
||||
../../modules/digikam.nix
|
||||
../../modules/android.nix
|
||||
../../modules/podman.nix
|
||||
];
|
||||
|
||||
networking.hostName = "yodaTux";
|
||||
|
@ -44,6 +44,7 @@ in
|
||||
#../../modules/thunderbird.nix
|
||||
#../../modules/digikam.nix
|
||||
#../../modules/android.nix
|
||||
../../modules/podman.nix
|
||||
];
|
||||
|
||||
networking.hostName = "yodaYoga";
|
||||
|
39
modules/podman.nix
Normal file
39
modules/podman.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# https://nixos.wiki/wiki/Podman#Install_and_configure_podman_with_NixOS_service_configuration
|
||||
# https://search.nixos.org/options?channel=23.05&query=virtualisation.podman
|
||||
|
||||
# TODO: Run as systemd services. https://nixos.wiki/wiki/Podman#Run_Podman_containers_as_systemd_services
|
||||
# TODO: Podman Terminal UI: https://github.com/containers/podman-tui#podman-tui
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose
|
||||
];
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
# Run `podman system prune` every week.
|
||||
autoPrune.enable = true;
|
||||
autoPrune.dates = "weekly";
|
||||
autoPrune.flags = [
|
||||
# Recursively remove all unused pods, containers, images, networks, and volume data.
|
||||
# https://docs.podman.io/en/stable/markdown/podman-system-prune.1.html#all-a
|
||||
"--all"
|
||||
# Prune volumes currently unused by any container
|
||||
# https://docs.podman.io/en/stable/markdown/podman-system-prune.1.html#volumes
|
||||
"--volumes"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user