commits
See [#den > Set user unspecific home-manager
options](https://oeiuwq.zulipchat.com/#narrow/channel/548534-den/topic/Set.20user.20unspecific.20home-manager.20options/with/563739770)
This changeset introduces a new Den core context: `{ HM-OS-HOST }`
invoked on host aspects. This context is used by our home-manager
integration but can also be used by any other host aspect to detect when
HM is enabled, for example to set `useGlobalPkgs`.
This context is produced by `hm-os-host.nix` when it detects any host
that has an OS supported by home-manager AND has at least one user with
`homeManager` class.
The aspect from `hm-os-host.nix` is internal, always included in
`den.default`.
When `den._.home-manager` integration is enabled, it reacts to the
`host-aspect { HM-OS-HOST }` context and setups home-manager
integration. For each user it calls `user-aspect { HM-OS-USER }` for
hm-dependencies.nix to include the correct dependencies.
home-manager related code has been moved to ./provides/home-manager/.
Closes #121
Nicely done, Heitor. Thanks :)
Allows users to have a base module for home/host/user definitions:
```nix
den.base.host = {
# applies to all den.hosts.<system>.<name>
# use it to define options all hosts might have.
};
den.base.user = { ... } # included in all den.hosts.<system>.<name>.users.<user>
den.base.home = { ... } # included in all den.homes.<system>.<name>
den.base.conf = { ... } # included in ANY host / user / home config.
```
improve docs of #117
Adds `inputs'` and `self'` aspects
flake-file's dendritic module no longer includes den nor flake-aspects. We now provide our own flakeModules.dendritic that does so.
Fixes #59
See https://github.com/vic/den/discussions/99#discussion-9150825
Fixes #99
This introduces `parametric.withOwn` that is just a `parametric.atLeast`
that also includes the aspect owned configs.
See discussion:
https://github.com/vic/den/discussions/91#discussioncomment-14985716
Calling `parametric x` itself is an alias for `parametric.withOwn x`.
So that both syntax do the same:
```
den.aspects.foo = {
__functor = den.lib.parametric;
nixos.foo = 1;
includes = [ bar ];
};
```
and also, **this is the preferred* syntax that will be documented, since
it is more intuitive and does not surfaces `__functor`:
```
den.aspects.foo = den.lib.parametric {
nixos.foo = 1;
includes = [ bar ];
};
```
Still have to update documentation about this combinator.
Fixes #97.
See https://github.com/vic/den/discussions/91 for context.
See
[failure](https://github.com/vic/bugs-den/actions/runs/19377336327/job/55448108522)
for
[reproduction](https://github.com/vic/bugs-den/commit/f81dca61403c7a08e5381b61bcb2fedc1994efb4)
Support for top-level contextual aspects was added at
https://github.com/vic/flake-aspects/pull/14.
Closes #92.
Fixes #87
Edit `modules/vm.nix`
Closes #82
to be more precise about it providing a fixed context to all its
included functions.
Fixes #84.
This PR removes the directional contexts `fromHost` and `fromUser`. Now
people can include funcitons like:
```nix
den.default.includes = [
({ user, ...}: { nixos.some-array = [ user.name ]; })
];
```
And values are not duplicated now. Added test based on report from #84.
This also simplified a lot the number of contexts we have. Still have to
update documentation about contexts.
This also removes outdated `_profile` directory. Closes #78. Instead our
default template now includes an `eg/routes.nix` example router and
exercises namespaces and angle-brackets, ensuring via tests that they
work.
split into several files, more dendritic.
This helps people find aspect implementation, aspect usage and test in one file.
Closes #73
Available at https://vic.github.io/den
Closes #66. Partially, still need to split README into several pages.
Our new default template is much better suited to be used as a starting
point for people trying out den.
Our previous default template is now named `examples`. It is still
useful as reference of how to use den and is used for CI.
Fixes #67
See [#den > Set user unspecific home-manager
options](https://oeiuwq.zulipchat.com/#narrow/channel/548534-den/topic/Set.20user.20unspecific.20home-manager.20options/with/563739770)
This changeset introduces a new Den core context: `{ HM-OS-HOST }`
invoked on host aspects. This context is used by our home-manager
integration but can also be used by any other host aspect to detect when
HM is enabled, for example to set `useGlobalPkgs`.
This context is produced by `hm-os-host.nix` when it detects any host
that has an OS supported by home-manager AND has at least one user with
`homeManager` class.
The aspect from `hm-os-host.nix` is internal, always included in
`den.default`.
When `den._.home-manager` integration is enabled, it reacts to the
`host-aspect { HM-OS-HOST }` context and setups home-manager
integration. For each user it calls `user-aspect { HM-OS-USER }` for
hm-dependencies.nix to include the correct dependencies.
home-manager related code has been moved to ./provides/home-manager/.
Allows users to have a base module for home/host/user definitions:
```nix
den.base.host = {
# applies to all den.hosts.<system>.<name>
# use it to define options all hosts might have.
};
den.base.user = { ... } # included in all den.hosts.<system>.<name>.users.<user>
den.base.home = { ... } # included in all den.homes.<system>.<name>
den.base.conf = { ... } # included in ANY host / user / home config.
```
This introduces `parametric.withOwn` that is just a `parametric.atLeast`
that also includes the aspect owned configs.
See discussion:
https://github.com/vic/den/discussions/91#discussioncomment-14985716
Calling `parametric x` itself is an alias for `parametric.withOwn x`.
So that both syntax do the same:
```
den.aspects.foo = {
__functor = den.lib.parametric;
nixos.foo = 1;
includes = [ bar ];
};
```
and also, **this is the preferred* syntax that will be documented, since
it is more intuitive and does not surfaces `__functor`:
```
den.aspects.foo = den.lib.parametric {
nixos.foo = 1;
includes = [ bar ];
};
```
Still have to update documentation about this combinator.
Fixes #97.
See https://github.com/vic/den/discussions/91 for context.
See
[failure](https://github.com/vic/bugs-den/actions/runs/19377336327/job/55448108522)
for
[reproduction](https://github.com/vic/bugs-den/commit/f81dca61403c7a08e5381b61bcb2fedc1994efb4)
Support for top-level contextual aspects was added at
https://github.com/vic/flake-aspects/pull/14.
Closes #92.
Fixes #84.
This PR removes the directional contexts `fromHost` and `fromUser`. Now
people can include funcitons like:
```nix
den.default.includes = [
({ user, ...}: { nixos.some-array = [ user.name ]; })
];
```
And values are not duplicated now. Added test based on report from #84.
This also simplified a lot the number of contexts we have. Still have to
update documentation about contexts.