From 02abf4ed0131237c25e0a10db50fa4c41a902a50 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 14 Jul 2024 17:53:13 -0600 Subject: sys: final merge of dmz, hv into sys --- sys/boot/namespaced.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sys/boot/namespaced.nix (limited to 'sys/boot/namespaced.nix') 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)); + }; +} -- cgit v1.2.3