Skip to content

Commit

Permalink
Merge pull request #199 from minijackson/fix-formatting
Browse files Browse the repository at this point in the history
Fix formatting
  • Loading branch information
minijackson authored Nov 5, 2024
2 parents 3e695fe + 259c83d commit 1074596
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ insert_final_newline = unset
indent_style = space
indent_size = 2

# Formatting is checked with the Nix formatter,
# no need to check it with eclint
eclint_indent_style = unset

[*.md]
indent_style = space

Expand Down
1 change: 1 addition & 0 deletions ioc/modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ with lib; {
nixpkgs.overlays = [
epnix.inputs.poetry2nix.overlays.default
epnix.inputs.bash-lib.overlay
epnix.inputs.sphinxcontrib-nixdomain.overlays.default
epnix.overlays.default
];
};
Expand Down
27 changes: 15 additions & 12 deletions pkgs/docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,32 @@
iocOptions = documentation.options.iocOptions iocConfig;
nixosOptions = documentation.options.nixosOptions nixosConfig;

nixosOptionsAttrSet = (epnixLib.inputs.nixpkgs.lib.nixosSystem {
inherit (stdenvNoCC) system;
modules = [
epnixLib.inputs.self.nixosModules.nixos
];
}).options;
nixosOptionsAttrSet =
(epnixLib.inputs.nixpkgs.lib.nixosSystem {
inherit (stdenvNoCC) system;
modules = [
epnixLib.inputs.self.nixosModules.nixos
];
})
.options;

isOurs = option: lib.any (lib.hasPrefix "${epnixLib.inputs.self}") option.declarations;
isVisible = option: !option.internal;

relativePath = path: lib.pipe path [
(lib.splitString "/")
(lib.sublist 4 255)
(lib.concatStringsSep "/")
];
relativePath = path:
lib.pipe path [
(lib.splitString "/")
(lib.sublist 4 255)
(lib.concatStringsSep "/")
];

# rev = epnixLib.inputs.self.sourceInfo.rev or "master";

nixosOptionsSpec = lib.pipe nixosOptionsAttrSet [
nixdomainLib.optionAttrSetToDocList
(lib.filter isOurs)
(lib.filter isVisible)
(map (x: x // { declarations = map relativePath x.declarations; }))
(map (x: x // {declarations = map relativePath x.declarations;}))
(map (x: lib.nameValuePair x.name x))
lib.listToAttrs
builtins.toJSON
Expand Down

0 comments on commit 1074596

Please sign in to comment.