vmix.nix/nixos/default.nix
Git Sagar 7dd67bc893 conditional sandbox relaxation for safe default import
Only set sandbox = "relaxed" when vmix.namespaces is non-empty.
Safe to import as a default module on all hosts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-30 14:06:21 -03:00

20 lines
No EOL
571 B
Nix

{ config, pkgs, lib, ... }:
with lib;
let
vmixLib = import ./../lib {inherit pkgs lib; };
args = { inherit config pkgs lib vmixLib; };
in
{
imports = [ (import ./networks args) (import ./vms args) ];
# only relax sandbox on hosts that actually define VM namespaces
config.nix.settings.sandbox = mkIf (config.vmix.namespaces != {}) "relaxed";
options.vmix.namespaces = mkOption {
type = types.attrsOf
(types.submodule (import ./namespaceSubmoduleOptions.nix args));
default = {};
};
config.nixpkgs.overlays = [ (import ../overlay.nix) ];
}