about summary refs log tree commit diff stats
path: root/importers/nixos-options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'importers/nixos-options.nix')
-rw-r--r--importers/nixos-options.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/importers/nixos-options.nix b/importers/nixos-options.nix
new file mode 100644
index 0000000..894f05e
--- /dev/null
+++ b/importers/nixos-options.nix
@@ -0,0 +1,17 @@
+{ pkgs ? import <nixpkgs> { }
+, system ? builtins.currentSystem
+, stateVersion ? pkgs.lib.version
+, ...
+}:
+let
+  inherit (pkgs) lib;
+  nixos = pkgs.nixos ({ lib, pkgs, config, ... }: {
+    nixpkgs.hostPlatform = system;
+    system.stateVersion = lib.versions.majorMinor stateVersion;
+  });
+
+  doc = pkgs.nixosOptionsDoc {
+    inherit (nixos) options;
+  };
+in
+doc.optionsJSON