From cbfbdd3bcf6a921a313a7fbf2c866d6c5ad9a457 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 19 Oct 2024 18:17:00 -0500 Subject: [PATCH] add distrobox/podman to othalan --- hosts/othalan/default.nix | 4 ++-- hosts/othalan/pkgs.nix | 1 + modules/oizys.nix | 1 + modules/virtualization/podman.nix | 27 +++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 modules/virtualization/podman.nix diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index a1c0b61..a62811d 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -18,10 +18,10 @@ // ( '' vpn|desktop|hyprland|chrome - docker|vbox|backups|hp-scanner|llm + backups|hp-scanner|llm + podman|docker|vbox '' |> listify |> enableAttrs ); - } diff --git a/hosts/othalan/pkgs.nix b/hosts/othalan/pkgs.nix index 858c9c7..7645b27 100644 --- a/hosts/othalan/pkgs.nix +++ b/hosts/othalan/pkgs.nix @@ -3,6 +3,7 @@ environment.systemPackages = [ (flake.pkg "utils") ] ++ (with pkgs; [ + distrobox zk quarto cachix diff --git a/modules/oizys.nix b/modules/oizys.nix index 42e6131..134249a 100644 --- a/modules/oizys.nix +++ b/modules/oizys.nix @@ -26,6 +26,7 @@ in virtualbox docker + podman gui fonts diff --git a/modules/virtualization/podman.nix b/modules/virtualization/podman.nix new file mode 100644 index 0000000..2bb3df7 --- /dev/null +++ b/modules/virtualization/podman.nix @@ -0,0 +1,27 @@ +{ + config, + pkgs, + mkOizysModule, + enabled, + ... +}: +mkOizysModule config "podman" { + + # I'm not sure what this is doing, but it was in the old wiki... + # Enable common container config files in /etc/containers + virtualisation.containers = enabled; + virtualisation = { + podman = enabled // { + # 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; + }; + }; + + environment.systemPackages = with pkgs; [ + podman-tui # status of containers in the terminal + podman-compose # start group of containers for dev + ]; +}