summaryrefslogtreecommitdiff
path: root/sys/boot/namespaced.nix
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/namespaced.nix')
-rw-r--r--sys/boot/namespaced.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/boot/namespaced.nix b/sys/boot/namespaced.nix
new file mode 100644
index 0000000..9927ae2
--- /dev/null
+++ b/sys/boot/namespaced.nix
@@ -0,0 +1,27 @@
+{ config, lib, options, ... }:
+with lib; let
+ cfg = config.local.boot.namespaced;
+in
+{
+ options.local.boot.namespaced = {
+ enable = mkEnableOption "system containerization";
+ };
+
+ config = mkIf cfg.enable {
+ boot.isContainer = true;
+
+ local.boot = mkMerge ([
+ {
+ enable = mkForce false;
+
+ efi.enable = mkForce false;
+ secureBoot.enable = mkForce false;
+ impermanence.enable = mkForce false;
+ }
+ ] ++ map
+ (name: {
+ stack.${name}.enable = mkForce false;
+ })
+ (attrNames options.local.boot.stack));
+ };
+}