nixos/virtualisation: disallow specialisation in nspawn-container
This commit is contained in:
@@ -71,6 +71,14 @@ in
|
||||
boot.isNspawnContainer = true;
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.specialisation == { };
|
||||
message = ''
|
||||
Setting 'specialisation' is disallowed for systemd-nspawn container configurations.
|
||||
Activating a specialisation requires creating SUID wrappers (e.g., for 'sudo'),
|
||||
which is prohibited within the Nix build sandbox where the test is run.
|
||||
'';
|
||||
}
|
||||
{
|
||||
# Check every interface defined in allInterfaces.
|
||||
# Containers try to create a bridge "${config.system.name}-${interfaceName}"
|
||||
|
||||
Reference in New Issue
Block a user