feat: Move home.nix into this repo
This makes it much easier to test and apply changes.
This commit is contained in:
parent
9b1fb2432a
commit
b3b4b78660
10 changed files with 703 additions and 224 deletions
|
@ -1,20 +1,25 @@
|
|||
{ pkgs, lib, markdown }:
|
||||
{ pkgs, lib }:
|
||||
let
|
||||
eval = lib.evalModules { modules = [ ../nixos/options.nix ]; };
|
||||
nixos-eval = lib.evalModules { modules = [ ../nixos/options.nix ]; };
|
||||
home-eval = lib.evalModules { modules = [ ../home/options.nix ]; };
|
||||
nixos-markdown = (pkgs.nixosOptionsDoc {
|
||||
inherit (eval) options;
|
||||
inherit (nixos-eval) options;
|
||||
transformOptions = option: option // { visible = option.visible && builtins.elemAt option.loc 0 == "jconfig"; };
|
||||
}).optionsCommonMark;
|
||||
home-markdown = (pkgs.nixosOptionsDoc {
|
||||
inherit (home-eval) options;
|
||||
transformOptions = option: option // { visible = option.visible && builtins.elemAt option.loc 0 == "jconfig"; };
|
||||
}).optionsCommonMark;
|
||||
in
|
||||
{
|
||||
markdown = nixos-markdown;
|
||||
inherit nixos-markdown home-markdown;
|
||||
docs = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "nixos-configuration-book";
|
||||
src = ./.;
|
||||
|
||||
patchPhase = ''
|
||||
# copy generated options removing the declared by statement
|
||||
sed '/^\*Declared by:\*$/,/^$/d' <${markdown} >> src/home-options.md
|
||||
sed '/^\*Declared by:\*$/,/^$/d' <${home-markdown} >> src/home-options.md
|
||||
sed '/^\*Declared by:\*$/,/^$/d' <${nixos-markdown} >> src/nixos-options.md
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue