Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nix/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let

parametric.atLeast = funk (lib.flip take.atLeast);
parametric.exactly = funk (lib.flip take.exactly);
parametric.context = lib.flip parametric.atLeast;
parametric.fixedTo = lib.flip parametric.atLeast;
parametric.expands = attrs: funk (ctx: (lib.flip take.atLeast) (ctx // attrs));
parametric.__functor =
self: ctx:
Expand All @@ -79,7 +79,7 @@ let
else if isFn ctx then
funk ctx
else
self.context ctx;
self.fixedTo ctx;

aspects = inputs.flake-aspects.lib lib;

Expand Down
13 changes: 10 additions & 3 deletions templates/default/modules/aspects/eg/routes.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# This example implements an aspect "routing" pattern.
#
# Unlike `den.default` which is `parametric.atLeast` we use `parametric.exactly` here
# to be more strict and prevent multiple values inclusion.
# Unlike `den.default` which is `parametric.atLeast`
# we use `parametric.fixedTo` here, which help us
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subject-verb agreement: "help" should be "helps" since the subject "which" refers to the singular parametric.fixedTo.

Suggested change
# we use `parametric.fixedTo` here, which help us
# we use `parametric.fixedTo` here, which helps us

Copilot uses AI. Check for mistakes.
# propagate an already computed context to all includes.
#
# This aspect, when installed in a `parametric.atLeast`
# will just forward the same context.
# The `mutual` helper returns an static configuration which
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Article usage: "an static" should be "a static" since "static" begins with a consonant sound.

Suggested change
# The `mutual` helper returns an static configuration which
# The `mutual` helper returns a static configuration which

Copilot uses AI. Check for mistakes.
# is ignored by parametric aspects, thus allowing
# non-existing aspects to be just ignored.
#
# Be sure to read: https://vic.github.io/den/dependencies.html
# See usage at: defaults.nix, alice.nix, igloo.nix
Expand All @@ -19,7 +26,7 @@
routes =
{ host, user, ... }@ctx:
{
__functor = parametric ctx;
__functor = parametric.fixedTo ctx;
includes = [
(mutual user host)
(mutual host user)
Expand Down
Loading