From 0a7e176c1e7f7c4dc5c41281021ef07edc019da2 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Tue, 29 Apr 2025 17:11:08 -0700 Subject: [PATCH] [dev] Sets up podman as a system package instead of homemanager. --- home-manager/features/development/docker.nix | 5 +---- system/features/podman-dev.nix | 14 ++++++++++++++ system/hosts/altair/configuration.nix | 1 + system/hosts/vega/configuration.nix | 4 ++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 system/features/podman-dev.nix diff --git a/home-manager/features/development/docker.nix b/home-manager/features/development/docker.nix index 68e838d..226b062 100644 --- a/home-manager/features/development/docker.nix +++ b/home-manager/features/development/docker.nix @@ -1,9 +1,6 @@ { pkgs, ... }: { - # Use podman over docker - services.podman = { - enable = true; - }; + # Podman is enabled at the system level. home.packages = with pkgs; [ podman-compose diff --git a/system/features/podman-dev.nix b/system/features/podman-dev.nix new file mode 100644 index 0000000..71bebd6 --- /dev/null +++ b/system/features/podman-dev.nix @@ -0,0 +1,14 @@ +{ ... }: +{ + 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; + }; + }; +} diff --git a/system/hosts/altair/configuration.nix b/system/hosts/altair/configuration.nix index 2ee3f8a..a2e7dd7 100644 --- a/system/hosts/altair/configuration.nix +++ b/system/hosts/altair/configuration.nix @@ -10,6 +10,7 @@ { imports = [ ./qmk.nix + ../../features/podman-dev.nix ]; networking.hostName = "altair"; # Define your hostname. diff --git a/system/hosts/vega/configuration.nix b/system/hosts/vega/configuration.nix index 5dac2f7..671defc 100644 --- a/system/hosts/vega/configuration.nix +++ b/system/hosts/vega/configuration.nix @@ -1,5 +1,9 @@ { pkgs, ... }: { + imports = [ + ../../features/podman-dev.nix + ]; + networking.hostName = "vega"; # Define your hostname. # Configure network proxy if necessary