mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-06-28 21:06:17 +02:00
22 lines
727 B
Nix
22 lines
727 B
Nix
{
|
|
lib,
|
|
outputs,
|
|
}:
|
|
lib.genAttrs (builtins.attrNames outputs.nixosConfigurations) (
|
|
name:
|
|
let
|
|
settings = outputs.nixosConfigurations.${name}.config.nix.settings;
|
|
effectiveSystemFeatures =
|
|
(settings.system-features or [ ]) ++ (settings.extra-system-features or [ ]);
|
|
in
|
|
{
|
|
autoAllocateUids = settings.auto-allocate-uids or false;
|
|
hasUidRange = builtins.elem "uid-range" effectiveSystemFeatures;
|
|
hasAutoAllocateUidsFeature = builtins.elem "auto-allocate-uids" (
|
|
settings.experimental-features or [ ]
|
|
);
|
|
hasCgroupsFeature = builtins.elem "cgroups" (settings.experimental-features or [ ]);
|
|
hasDevNetSandboxPath = builtins.elem "/dev/net" (settings.sandbox-paths or [ ]);
|
|
}
|
|
)
|