podman: add darwin support with machine management

- restructure module from `podman-linux` to platform-agnostic `podman`
- move linux-specific implementation to `modules/services/podman/linux/`
- add darwin module with declarative machine management
- implement launchd-based watchdog for auto-starting machines
- maintains backward compatibility with existing linux functionality
This commit is contained in:
Thierry Delafontaine
2025-11-01 21:42:11 +01:00
committed by Austin Horstman
parent 297a085108
commit f4bcc1ae1c
54 changed files with 878 additions and 271 deletions

View File

@@ -0,0 +1,24 @@
{ config, lib, ... }:
{
imports = [ ./podman-stubs.nix ];
config = lib.mkIf config.test.enableLegacyIfd {
services.podman = {
enable = true;
images = {
"my-img" = {
image = "docker.io/alpine:latest";
};
};
};
nmt.script = ''
configPath=home-files/.config/systemd/user
imageFile=$configPath/podman-my-img-image.service
assertFileExists $imageFile
imageFile=$(normalizeStorePaths $imageFile)
assertFileContent $imageFile ${./image-expected.service}
'';
};
}