summaryrefslogtreecommitdiffstats
path: root/nixos/modules/profiles
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-10-12 22:59:19 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-10-12 23:10:41 +0200
commit508c310222b7f07ad9cf6752fdd5c1af59a37061 (patch)
tree375f518fb7c3e90bc59773d2fe56def5f6c45b39 /nixos/modules/profiles
parent9443a0b51e356116ae4ee22be9b8aae5d3bcd386 (diff)
darwin.linux-builder: Expose nixosConfig and nixosOptions attributes
I chose not to do nixos.{config, options} because that would make it look too much like a configuration object, which it is not. A configuration object I would define as for example the result of calling NixOS, an attrset with `_type = "configuration";`. Recreating a configuration object without evalModules is quite feasible but not guaranteed to be correct, and not maintainable.
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r--nixos/modules/profiles/macos-builder.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/profiles/macos-builder.nix b/nixos/modules/profiles/macos-builder.nix
index f36b8e70fd38..d48afed18f7e 100644
--- a/nixos/modules/profiles/macos-builder.nix
+++ b/nixos/modules/profiles/macos-builder.nix
@@ -1,4 +1,4 @@
-{ config, lib, ... }:
+{ config, lib, options, ... }:
let
keysDirectory = "/var/keys";
@@ -167,6 +167,11 @@ in
meta = (old.meta or { }) // {
platforms = lib.platforms.darwin;
};
+ passthru = (old.passthru or { }) // {
+ # Let users in the repl inspect the config
+ nixosConfig = config;
+ nixosOptions = options;
+ };
});
system = {