Merge pull request #258299 from Arcayr/virtualisation-hostname

nixos/virtualisation: add hostname option to oci-containers.

Changed files
+9
nixos
modules
virtualisation
+9
nixos/modules/virtualisation/oci-containers.nix
···
'';
};
+
hostname = mkOption {
+
type = with types; nullOr str;
+
default = null;
+
description = lib.mdDoc "The hostname of the container.";
+
example = "hello-world";
+
};
+
extraOptions = mkOption {
type = with types; listOf str;
default = [];
···
"--log-driver=${container.log-driver}"
] ++ optional (container.entrypoint != null)
"--entrypoint=${escapeShellArg container.entrypoint}"
+
++ optional (container.hostname != null)
+
"--hostname=${escapeShellArg container.hostname}"
++ lib.optionals (cfg.backend == "podman") [
"--cidfile=/run/podman-${escapedName}.ctr-id"
"--cgroups=no-conmon"