nixos-containers: Set DevicePolicy=closed

This makes the container a bit more secure, by preventing root
creating device nodes to access the host file system, for
instance. (Reference: systemd-nspawn@.service in systemd.)
This commit is contained in:
Eelco Dolstra 2016-07-28 17:39:14 +02:00
parent bf3edfbb3c
commit fd5bbdb436

View File

@ -415,6 +415,8 @@ in
# after the timeout). So send an ignored signal.
KillMode = "mixed";
KillSignal = "WINCH";
DevicePolicy = "closed";
};
};
in {