mirror of
https://github.com/0xbbjubjub/miniguest.git
synced 2025-01-08 13:38:13 +03:00
add warning for #6
This commit is contained in:
parent
7f4151712b
commit
afa16606d9
@ -22,6 +22,7 @@ let
|
||||
{
|
||||
boot.miniguest.enable = true;
|
||||
boot.miniguest.hypervisor = "lxc";
|
||||
boot.miniguest.storeCorruptionWarning = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
@ -6,5 +6,11 @@ with lib;
|
||||
let cfg = config.boot.miniguest;
|
||||
in
|
||||
mkIf (cfg.enable && cfg.hypervisor == "lxc") {
|
||||
warnings = lib.optional (cfg.storeCorruptionWarning) ''
|
||||
Running a guest in LXC without enabling UID mapping or otherwise confining the guest's superuser can result in host store corruption!
|
||||
Double-check your container settings!
|
||||
You can suppress this warning with:
|
||||
boot.miniguest.storeCorruptionWarning = false;
|
||||
'';
|
||||
boot.isContainer = mkDefault true;
|
||||
}
|
||||
|
@ -10,6 +10,11 @@ with lib;
|
||||
default = "qemu";
|
||||
type = types.enum [ "qemu" "lxc" ];
|
||||
};
|
||||
storeCorruptionWarning = mkOption {
|
||||
description = "Whether to display a warning about container guests being able to corrupt the Nix store.";
|
||||
default = true;
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user