# Read-only facts for pkgs/install-system/install-system.sh, which evaluates # `nixosConfigurations..config.my` and reads user.name, user.uid, # boot.secureBoot.enable and secrets.enable. Everything here is derived from # the real configuration; no aspect may read `config.my`. { config, lib, ... }: let inherit (config.meta) owner; in { flake.modules.nixos.core = { config, ... }: { options.my = lib.mkOption { type = lib.types.raw; readOnly = true; internal = true; description = "Facts for install-system (derived; do not set, do not read in aspects)."; }; config.my = { user = { inherit (owner) name; inherit (config.users.users.${owner.name}) uid; }; # Only the secure-boot aspect imports lanzaboote. boot.secureBoot.enable = config.boot.lanzaboote.enable or false; secrets.enable = config.age.secrets != { }; }; }; }