mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 01:19:32 +08:00
- 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
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ config, lib, ... }:
|
|
{
|
|
imports = [ ./podman-stubs.nix ];
|
|
config = lib.mkIf config.test.enableLegacyIfd {
|
|
services.podman = {
|
|
enable = true;
|
|
volumes = {
|
|
"my-vol" = {
|
|
device = "tmpfs";
|
|
extraConfig = {
|
|
Volume = {
|
|
User = 1000;
|
|
};
|
|
};
|
|
extraPodmanArgs = [ "--module=/etc/nvd.conf" ];
|
|
group = 1000;
|
|
type = "tmpfs";
|
|
};
|
|
|
|
"my-vol-2" = {
|
|
extraConfig = {
|
|
Volume = {
|
|
VolumeName = "some-other-volume-name";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
test.asserts.assertions.expected = [
|
|
''In 'my-vol-2' config. Volume.VolumeName: 'some-other-volume-name' does not match expected type: value "my-vol-2" (singular enum)''
|
|
];
|
|
|
|
nmt.script = ''
|
|
configPath=home-files/.config/systemd/user
|
|
volumeFile=$configPath/podman-my-vol-volume.service
|
|
assertFileExists $volumeFile
|
|
|
|
volumeFile=$(normalizeStorePaths $volumeFile)
|
|
|
|
assertFileContent $volumeFile ${./volume-expected.service}
|
|
'';
|
|
};
|
|
}
|