change podman config
This commit is contained in:
47
hosts/fw.cloonar.com/modules/podman.nix
Normal file
47
hosts/fw.cloonar.com/modules/podman.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ pkgs, ... }: {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings = {
|
||||
cniVersion = "0.4.0";
|
||||
name = "newnet";
|
||||
plugins = [
|
||||
{
|
||||
type = "macvlan";
|
||||
master = "server";
|
||||
pam = {
|
||||
type = "dhcp";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
systemd.sockets."io.podman.dhcp" = {
|
||||
description = "DHCP Client for CNI";
|
||||
socketConfig = {
|
||||
ListenStreams = "%t/cni/dhcp.sock";
|
||||
SocketMode = 0600;
|
||||
};
|
||||
wantedBy = "sockets.target";
|
||||
};
|
||||
|
||||
systemd.services."io.podman.dhcp" = {
|
||||
description = "DHCP Client CNI Service";
|
||||
after = [ "io.podman.dhcp.socket" ];
|
||||
requires = [ "io.podman.dhcp.socket" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
also = "io.podman.dhcp.socket";
|
||||
path = [ pkgs.cni-plugins ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart= "${pkgs.cni-plugins}/bin/dhcp daemon";
|
||||
TimeoutStopSec = 30;
|
||||
KillMode = "process";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user