From 1fb64b09e2dba34784732a61cbebc119cd847803 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 3 May 2024 11:52:06 +0200 Subject: feat: create nixos options.json importer --- importers/nixos-options.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 importers/nixos-options.nix (limited to 'importers/nixos-options.nix') 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 { } +, 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 -- cgit 1.4.1