Skip to content

Commit

Permalink
Fix flake.parts docs (#533)
Browse files Browse the repository at this point in the history
* Fix flake.parts docs generation

* ci: Check flake.parts docs generation

* ci: note about future refactor

---------

Co-authored-by: Sridhar Ratnakumar <[email protected]>
  • Loading branch information
roberth and srid authored Mar 22, 2024
1 parent 33b06ad commit 22b2036
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
- name: Check closure size
run: |
nix run .#check-closure-size
- name: Docs for flake.parts
run: |
# TODO: Define this in nixci itself.
nix build \
github:hercules-ci/flake.parts-website#generated-docs-emanote \
--override-input emanote ../emanote/ \
--show-trace
# TODO: Use self-hosted runner
website:
Expand Down
9 changes: 7 additions & 2 deletions nix/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ in
type = types.str;
description = ''Like `path` but local (not in Nix store)'';
default = builtins.toString config.path;
defaultText = lib.literalMD "toString path";
};
mountPoint = mkOption {
type = types.nullOr types.str;
Expand All @@ -57,15 +58,19 @@ in
type = types.str;
description = ''Layer spec'';
readOnly = true;
default = if config.mountPoint == null then "${config.path}" else "${config.path}@${config.mountPoint}";
};
outputs.layerString = mkOption {
type = types.str;
description = ''Layer spec'';
readOnly = true;
default = if config.mountPoint == null then config.pathString else "${config.pathString}@${config.mountPoint}";
};
};
config = {
outputs.layer =
if config.mountPoint == null then "${config.path}" else "${config.path}@${config.mountPoint}";
outputs.layerString =
if config.mountPoint == null then config.pathString else "${config.pathString}@${config.mountPoint}";
};
}));
};
# TODO: Consolidate all these options below with those of home-manager-module.nix
Expand Down

0 comments on commit 22b2036

Please sign in to comment.