From 9ab6c819e0fd9f5dffe03cda90fbbf2ab97ad40f Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sun, 24 Sep 2023 20:27:22 +0200 Subject: [PATCH] pinwheel: Add module for `podman` --- hosts/pinwheel/configuration.nix | 1 + hosts/pinwheel/modules/podman/default.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 hosts/pinwheel/modules/podman/default.nix diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index d09582e..be159d3 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -31,6 +31,7 @@ ./modules/go ./modules/nix ./modules/spotify + ./modules/podman ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/hosts/pinwheel/modules/podman/default.nix b/hosts/pinwheel/modules/podman/default.nix new file mode 100644 index 0000000..8dd13e0 --- /dev/null +++ b/hosts/pinwheel/modules/podman/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + 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; + }; + }; + + home-manager.users.alex = { + home.packages = [ pkgs.podman-compose ]; + }; +}