Skip to content

Releases: vic/den

v0.7.0

17 Dec 04:32
@vic vic
64497b4

Choose a tag to compare

This release includes a couple of new features as we work on decoupling Den from flake-parts.

In the future Den will be module-type agnostic, you will be able to use it with flake-parts or any alternative (froyo / falake / lib.evalModules). We are trying to make flake-parts specific feature opt-in so we have compatibility between flakes and non-flakes worlds.

What's Changed

Full Changelog: v0.6.0...v0.7.0

v0.6.0

21 Nov 07:07
@vic vic

Choose a tag to compare

This release improves Den stability, we eliminated several duplicate-configuration problems that raised from our new parametric { } aspects.

Read more about the parametric aspects here.

Once again, thanks to all and each of you who helped testing Den, you are awesome! Hopefully, we are near to the last (unstable) Den release.

I've also updated my infra with latest revision and it feels ok. Also, be sure to checkout @michaelBelsanti's Den setup which is awesome, and nicely organized, it is now featured in our readme 👯

Breaking changes!!

flake-file dendritic module no longer includes den and flake-aspects as dependencies. See https://github.com/vic/flake-file/issues/53.
Follow the changes we made to our default template to update.

What's Changed

  • Provide a parametric combinator that is atLeast but preserves owned configs by @vic in #98
  • Fix dups from parametric owned modules. by @vic in #100
  • Fix parametric dup values on homeManager by @vic in #105
  • Add minimalistic den template by @vic in #107
  • update checkmate by @vic in #108
  • Provide a dendritic module that adds flake-aspects and den as dependencies. by @vic in #109

Full Changelog: v0.5.0...v0.6.0

v0.5.0

16 Nov 10:24
@vic vic
324e2c9

Choose a tag to compare

Thanks to everyone who has helped testing Den. 🙇 🎉

In this release the dependencies system is more stable, fixed some duplication errors and improved documentation a lot.

Documentation website is automatically published when it changes in the wiki, so updates to docs do not appear on changelog, be sure to take a look at the website from time to time.

Upgrading

This release requires flake-aspects v0.3.0

nix flake update flake-aspects

What's Changed

  • example namespaces and angle-brackets in default template. by @vic in #79
  • default template includes routes.nix example and tests with namespaces and angle-brackets. by @vic in #80
  • Fixed dependencies, removed directional contexts, and prevent duplication from functions included in den.default. by @vic in #83
  • Rename parametric.context to parametric.fixedTo by @vic in #85
  • Enable swiching default VM between console and gui. by @vic in #86
  • Fix home-manager integration. Use takes.exactly instead of just { host, ...} context. by @vic in #88
  • Evaluate hm-aspects shared between OS & Standalone wihout conflicts by @vic in #90
  • Test top-level contextual aspects. by @vic in #93
  • use parametric.atLeast instead of parametric true by @vic in #94

Full Changelog: v0.4.0...v0.5.0

v0.4.0

12 Nov 01:41
@vic vic
19e00ef

Choose a tag to compare

What's Changed

  • feat: Experimental angle brackets! by @vic in #38
  • Fix the method host-provides-host-config name in readme to correct name host-provides-user-config by @mariolopjr in #39
  • Fix typos and change .provides. -> ._. in readme by @esselius in #43
  • WIP: non-recursive defaults by @vic in #42
  • WIP: create a template for reporting bugs by @vic in #44
  • Social denful aspects! Improve support for namespaces. by @vic in #45
  • A template (den) for bug reproduction. by @vic in #50
  • contexts are not strict now by @vic in #52
  • test other templates in CI by @vic in #53
  • Use { userToHost } and { hostToUser } contexts. by @vic in #54
  • BREAKING. New Intent-oriented and Incremental contexts. by @vic in #57
  • skip CI on draft PRs by @vic in #61
  • bug report issue template by @vic in #63
  • Fix double inclusion of host owned settings. by @vic in #65
  • Re-organize templates. Better default template. by @vic in #70
  • update templates flake.lock by @vic in #71
  • Documentation website. by @vic in #72
  • Improve comment on how to avoid duplication from default.includes. by @vic in #74
  • reorg test examples by @vic in #75

New Contributors

Full Changelog: v0.3.0...v0.4.0

v0.3.0

05 Nov 03:59
@vic vic
04dfe09

Choose a tag to compare

You might want to re-read the README.md file, it has been updated with more details about the parametric stuff and aspect dependency system.

feat(aspects)!: Introduce Parametric Aspects and Unify Configuration

This major release overhauls the aspect system, introducing "Parametric Aspects" a more powerful and intuitive way to define and compose configurations. It simplifies the overall structure, unifies default settings, and enhances the ability to share configuration between different entities like hosts and users.

This change is breaking and requires user migration.

Breaking Changes

This release introduces significant structural changes. Manual migration of your configuration is required.

1. Unified den.default Aspect

The separate den.default.host, den.default.user, and den.default.home aspects have been merged into a single, unified den.default aspect.

Migration:

Merge all your default configurations into a single den.default attribute set.

  • Before:

    {
      den.default.host.nixos.system.stateVersion = "25.05";
      den.default.user.homeManager.home.stateVersion = "25.05";
    }
  • After:

    {
      den.default = {
        nixos.system.stateVersion = "25.05";
        homeManager.home.stateVersion = "25.05";
      };
    }

2. Simplified includes Path

The nested ._.host, ._.user, and ._.home paths for including parametric aspects have been removed. Includes are now always defined at the top level of an aspect.

Migration:

Move your includes from the nested paths to the top-level includes attribute of the aspect.

  • Before:

    {
      # In a host aspect
      den.aspects.my-host._.host.includes = [ my-parametric-aspect ];
    
      # In a user aspect
      den.aspects.my-user._.user.includes = [ my-other-aspect ];
    }
  • After:

    {
      # In any aspect
      den.aspects.my-aspect.includes = [
        my-parametric-aspect
        my-other-aspect
      ];
    }

3. Standardized Aspect Providers (den._.*)

Providers are now more consistently implemented as parametric functions. Sub-paths like ._.home or ._.host within providers have been removed in favor of automatic context detection.

Migration:

Update your provider usage to the new, flatter structure.

  • den._.define-user: The ._.home variant is removed. Use den._.define-user for all contexts (host-user and standalone-home).

    • Before: den.aspects.my-home._.home.includes = [ den._.define-user._.home ];
    • After: den.aspects.my-home.includes = [ den._.define-user ];
  • den._.import-tree: The ._.host, ._.user, ._.home variants are now helpers on the main provider.

    • Before: den.default.host._.host.includes = [ (den._.import-tree._.host ./hosts) ];
    • After: den.default.includes = [ (den._.import-tree._.host ./hosts) ];

New Features

Parametric Aspects

The core of this release is the introduction of Parametric Aspects. An aspect can now be a function that receives contextual parameters (host, user, home, etc.). This allows for creating highly dynamic and reusable configuration modules.

The framework automatically supplies the correct parameters based on the evaluation context.

  • Static Aspect (No change): An attribute set that provides static configuration.

    den.aspects.rockhopper.homeManager.programs.direnv.enable = true;
  • Parametric Aspect (New): A function that returns an attribute set based on its inputs.

    # An aspect that sets the hostname based on the host context.
    set-host-name = { host }: {
      ${host.class}.networking.hostName = host.name;
    };
    
    # Include it in your defaults, it will be called for Host configurations that provide `{ host }`
    # See README for more on documentation of parametric aspects.
    den.default.includes = [ set-host-name ];

Cross-Aspect Contributions

The new model simplifies how aspects contribute configuration to each other. For example, a user aspect can now directly provide configuration to the host it's associated with, and vice-versa. This is achieved by including the contributing aspect, which then receives the combined context ({ host, user }).

  • Example: User contributing to a Host
    A user aspect can define host-level configuration.

    # In alice's aspect
    den.aspects.alice.nixos.users.users.alice.description = "Alice Q. User";

    When alice is a user on the rockhopper host, this configuration is automatically applied to rockhopper's NixOS configuration.

  • Example: Host contributing to a User
    A host aspect can define configuration for all its users.

    # In rockhopper's aspect
    den.aspects.rockhopper.homeManager.programs.direnv.enable = true;

    This enables direnv in Home Manager for every user on the rockhopper host.

Refactoring and Internal Improvements

  • Aspect Functor: A new internal module (nix/aspect-functor.nix) implements the logic for applying context to parametric aspects.
  • Dependency Management: The modules/aspects/dependencies.nix file has been completely refactored to build the dependency graph using the new parametric model, resulting in cleaner and more understandable logic.
  • Provider Standardization: All built-in providers in modules/aspects/provides/ have been updated to use the new __functor pattern, making them more consistent and robust.
  • Code Organization: A new modules/lib.nix centralizes helper functions, and module argument injection has been moved from options.nix to scope.nix for better separation of concerns.
  • Examples and Profiles: All templates and profiles in templates/default/ have been updated to reflect best practices with the new system, serving as a comprehensive reference implementation.

Full Changelog: v0.2.0...v0.3.0

v0.2.0

02 Nov 10:28
@vic vic

Choose a tag to compare

den is now being used in the real world. doing so caused many previously uncovered bugs to be fixed (see #18).

we now have more batteries included, most extracted from our examples CI code and some utilities from vic's own infra.
Provided batteries are intended to be small, opt-in and serve as examples for writing generic code with aspects.

I've also added a _profile in our default template, as an easy option for getting started with a more organized layout. Since our CI examples might not reflect best organization practices as they are focused on den features.

What's Changed from v0.1.0

  • docs: update readme
  • feat: add _profile layout on default template, a minimalistic vix like setup. (#29)
  • feat(batteries): Add den._.define-user. extracted from examples. (#28)
  • feat(batteries): Add den._.primary-user (#27)
  • feat(batteries): Add den.provides.user-shell (#26)
  • feat(batteries): Add den.provides.unfree (#25)
  • refactor(aspects): reorganize aspects into provides module; add import-tree provider and move home-manager (#23)
    • Move batteries/home-manager.nix -> modules/aspects/provides/home-manager.nix (adapted to new provides API).
    • Add modules/aspects/provides.nix to expose den._.provides submodule.
    • Add modules/aspects/provides/import-tree.nix implementing the import-tree provider and functor.
    • Inline aspect-option implementation in modules/aspects/defaults.nix.
    • Update templates to use den._.import-tree and den._.home-manager.
    • Remove legacy files: modules/aspects/_aspect_option.nix, modules/aspects/batteries/_den_aspect.nix, modules/aspects/batteries/import-tree.nix.
      BREAKING CHANGE: Public provider names and import paths changed:
    • References to den.import-tree should be updated to den._.import-tree.
    • References to den.home-manager should be updated to den._.home-manager.
    • Legacy aspect helpers (_aspect_option.nix, _den_aspect.nix, and batteries/import-tree.nix) were removed — update any custom integrations accordingly.
  • feat: add _den_aspect helper for defining batteries included at den top-level.
  • docs: update README with configuration definitions
  • docs: update README with real-world examples links
  • chore: regenerate flake.lock on default
  • test: add more tests (#18)
  • refactor: simplify dependencies

Full Changelog: v0.1.0...v0.2.0

v0.1.0

29 Oct 09:48
@vic vic

Choose a tag to compare

This is the first release. The library is feature complete for now, and can be used with confidence. main branch will be used for unstable version. We will be using semantic versioning for tags.

What's Changed

  • feat: add inputs' and self' special args by @HeitorAugustoLN in #1
  • refactor: remove lib from prelude and builtins functions by @HeitorAugustoLN in #2
  • Refactor os config by @HeitorAugustoLN in #3
  • regen flake-file for defaut-template. by @vic in #6
  • Standalone home and other changes by @HeitorAugustoLN in #7
  • support different inputs for nixpkgs, darwin. also add systemManager. by @vic in #8
  • refactor(config): remove deprecated top-level system argument by @HeitorAugustoLN in #9
  • test macos examples by @vic in #10
  • update examples by @vic in #11
  • fixing ci cache by @vic in #12
  • Use den.aspects/den.modules instead of flake.aspects/flake.modules by @vic in #14
  • basic batteries included by @vic in #15
  • add parametric includes for host/user/home by @vic in #17

New Contributors

Full Changelog: https://github.com/vic/den/commits/v0.1.0