diff options
author | Alan Pearce | 2024-05-03 11:52:06 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-03 11:52:06 +0200 |
commit | 1fb64b09e2dba34784732a61cbebc119cd847803 (patch) | |
tree | 1dc21f3c66c6682089bb8731f84d40ef13bcd424 /importers/nixos-options.nix | |
parent | 0945da8f9654252008ff6bd56022f9363fd3cca6 (diff) | |
download | searchix-1fb64b09e2dba34784732a61cbebc119cd847803.tar.lz searchix-1fb64b09e2dba34784732a61cbebc119cd847803.tar.zst searchix-1fb64b09e2dba34784732a61cbebc119cd847803.zip |
feat: create nixos options.json importer
Diffstat (limited to 'importers/nixos-options.nix')
-rw-r--r-- | importers/nixos-options.nix | 17 |
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 |