Skip to content

Commit

Permalink
chore: reformat codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
foo-dogsquared committed Jan 12, 2025
1 parent 2bb1dc6 commit c2625af
Show file tree
Hide file tree
Showing 17 changed files with 466 additions and 277 deletions.
31 changes: 20 additions & 11 deletions docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ let
class = "wrapperManager";
}).options;

# Based from nixpkgs' and home-manager's code.
gitHubDeclaration = user: repo: subpath:
{
# Based from nixpkgs' and home-manager's code.
gitHubDeclaration = user: repo: subpath: {
url = "https://github.com/${user}/${repo}/blob/master/${subpath}";
name = "<${repo}/${subpath}>";
};
Expand All @@ -42,16 +41,21 @@ let
{
options =
if includeModuleSystemOptions then options else builtins.removeAttrs options [ "_module" ];
transformOptions = opt:
opt // {
declarations = map (decl:
transformOptions =
opt:
opt
// {
declarations = map (
decl:
if lib.hasPrefix src (toString decl) then
gitHubDeclaration "foo-dogsquared" "nix-module-wrapper-manager-fds"
(lib.removePrefix "/" (lib.removePrefix src (toString decl)))
gitHubDeclaration "foo-dogsquared" "nix-module-wrapper-manager-fds" (
lib.removePrefix "/" (lib.removePrefix src (toString decl))
)
else if decl == "lib/modules.nix" then
gitHubDeclaration "NixOS" "nixpkgs" decl
else
decl) opt.declarations;
decl
) opt.declarations;
};
}
// builtins.removeAttrs args [
Expand Down Expand Up @@ -106,7 +110,9 @@ in
];
};
in
{ baseUrl ? "https://foo-dogsquared.github.io/nix-module-wrapper-manager-fds" }:
{
baseUrl ? "https://foo-dogsquared.github.io/nix-module-wrapper-manager-fds",
}:

buildHugoSite {
pname = "wrapper-manager-docs";
Expand All @@ -126,7 +132,10 @@ in

vendorHash = "sha256-UDDCYQB/kdYT63vRlRzL6lOePl9F7j3eUIHX/m6rwEs=";

buildFlags = [ "--baseURL" baseUrl ];
buildFlags = [
"--baseURL"
baseUrl
];

nativeBuildInputs = [
asciidoctorWrapped
Expand Down
Loading

0 comments on commit c2625af

Please sign in to comment.