32 lines
763 B
Nix
32 lines
763 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
virtualisation.docker.enable = true;
|
|
virtualisation.oci-containers = {
|
|
# Specify Docker as the backend engine
|
|
backend = "docker";
|
|
|
|
# Define your containers
|
|
containers = {
|
|
device-manager = {
|
|
image = "ndouba/device-mapping-manager";
|
|
|
|
# Equivalent to --restart always
|
|
autoStart = true;
|
|
|
|
privileged = true;
|
|
volumes = [
|
|
"/sys:/host/sys"
|
|
"/var/run/docker.sock:/var/run/docker.sock"
|
|
];
|
|
|
|
# Use extraOptions for flags not directly mapped to NixOS options
|
|
extraOptions = [
|
|
"--pid=host" # --pid=host
|
|
"--cgroupns=host" # --cgroupns=host
|
|
"--userns=host" # --userns=host
|
|
];
|
|
};
|
|
};
|
|
};
|
|
} |