Skip to content

Conversation

@vic
Copy link
Owner

@vic vic commented Nov 12, 2025

split into several files, more dendritic.

@vic vic marked this pull request as ready for review November 12, 2025 09:23
Copilot AI review requested due to automatic review settings November 12, 2025 09:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the default template to use a namespace-based organization, splitting the monolithic den.nix and dendritic.nix files into a more modular, dendritic structure with dedicated files for different concerns.

  • Introduces an eg (example) namespace for organizing aspects
  • Splits configuration into focused modules (inputs, namespace, aspects, CI)
  • Reorganizes aspects into separate files under modules/aspects/ and modules/aspects/eg/

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
templates/default/modules/namespace.nix Creates the new eg namespace using den's namespace function
templates/default/modules/inputs.nix Extracts flake inputs from dendritic.nix (home-manager, darwin, commented WSL inputs)
templates/default/modules/dendritic.nix Simplified to only import the dendritic flake module
templates/default/modules/den.nix Reduced to minimal host/home definitions, with aspects moved to separate files
templates/default/modules/ci.nix New module to set CI flag for conditional configurations
templates/default/modules/aspects/igloo.nix Extracts igloo host configuration using the eg namespace
templates/default/modules/aspects/eg/xfce-desktop.nix Non-parametric XFCE desktop aspect in eg namespace
templates/default/modules/aspects/eg/vm-bootable.nix VM installer aspect in eg namespace
templates/default/modules/aspects/eg/ci-no-boot.nix CI boot disabling aspect in eg namespace
templates/default/modules/aspects/eg/autologin.nix Parametric autologin aspect in eg namespace
templates/default/modules/aspects/defaults.nix Global defaults and includes configuration
templates/default/modules/aspects/alice.nix Alice user configuration using eg namespace
templates/default/README.md Getting started guide documenting the new structure

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

use angle brackets in default.nix demo
Copilot AI review requested due to automatic review settings November 12, 2025 10:02
@vic vic changed the title use namespaces in default template. example namespaces and angle-brackets in default template. Nov 12, 2025
@vic
Copy link
Owner Author

vic commented Nov 12, 2025

@xdbr guess what !? Looks like you discovered a bug, haha. Because there was no test exercising the angle brackets syntax. So I just updated our default template in this PR and it uncovered a bug that angle-brackets did not correctly handled namespaces. Fix is already in this commit.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vic vic merged commit 594ba47 into main Nov 12, 2025
14 checks passed
@vic vic deleted the default-ns branch November 12, 2025 10:15
@xdbr
Copy link

xdbr commented Nov 12, 2025

@vic well... i'm happy to help ;) after all, there seems to be value in being an early adopter – plus you get front-row seats ;) looking forward to your fix!

@vic
Copy link
Owner Author

vic commented Nov 12, 2025

@vic well... i'm happy to help ;) after all, there seems to be value in being an early adopter – plus you get front-row seats ;) looking forward to your fix!

already merged, angle-brackets should work now with namespaces.

I'm not sure about your "foo.bar" naming tho, that might cause problems, I'm not sure that <vix/"foo.bar"> is valid nix syntax, I guess it is not.

@xdbr
Copy link

xdbr commented Nov 12, 2025

Sadly, even after pulling the latest update (through nix flake update) the fix doesn't (yet) work for me in my configuration.nix

Some questions and observations:

  • what exactly is the difference between imports = [ (inputs.den.namespace "eg" false) ]; and imports = [ (inputs.den.namespace "eg" true) ];? I believe the documentation uses true?
  • is the full exposition exercised, i.e. the combination of __findFile, custom namespace and an includes with angle-bracket syntax?
  • if not, could igloo.nix potentially be a good place to rewrite into this direction to see if it really works in this kind of setup/situation?
  • also, is there a (technical) possibility to have __findFile available automatically? however, this is obviously only a cosmetic improvement, but as far as I can see, apparently it is possible to have a custom namespace automatically in scope, so maybe yes?!

@xdbr
Copy link

xdbr commented Nov 12, 2025

I'm not sure about your "foo.bar" naming tho, that might cause problems, I'm not sure that <vix/"foo.bar"> is valid nix syntax, I guess it is not.

Ah I see – just to mention, I haven't used <vix/"foo.bar">-type includes but I can try to see if renaming the aspect helps, just to make sure

@vic
Copy link
Owner Author

vic commented Nov 12, 2025

Sadly, even after pulling the latest update (through nix flake update) the fix doesn't (yet) work for me in my configuration.nix

Some questions and observations:

* [ ]  what exactly is the difference between `imports = [ (inputs.den.namespace "eg" false) ];` and `imports = [ (inputs.den.namespace "eg" true) ];`? I believe the documentation uses `true`?

The boolean enables the flake output, use false for private namespaces. See here

* [ ]  is the full exposition exercised, i.e. the combination of `__findFile`, custom namespace and an `includes` with angle-bracket syntax?

I believe it is.

* [ ]  if not, could [igloo.nix](https://github.com/vic/den/blob/f57da63114e2ccc2d465a6dc954192f0eb74d1b3/templates/default/modules/aspects/igloo.nix) potentially be a good place to rewrite into this direction to see if it really works in this kind of setup/situation?

Yep. See defaults.nix and alice.nix which both use __findFile.

* [ ]  also, is there a (technical) possibility to have `__findFile` available automatically? however, this is obviously only a cosmetic improvement, but as far as I can see, apparently it is possible to have a custom namespace automatically in scope, so maybe yes?!

It is currently experimental, meaning I don't know how well it will play in the long run. That is why it is enabled explicitly by the user at the module level. I would even recommend not using it module-level (as a module arg) but instead a as a let-binding (see alice.nix)

@vic
Copy link
Owner Author

vic commented Nov 12, 2025

I'm adding yet more checks to the default template regarding angle brackets.

Just wanted to say, thank you for using den <3, and discovering tests I'm missing, I'll add a couple just to make sure it must work for you.

@xdbr
Copy link

xdbr commented Nov 12, 2025

I'm just genuinely happy to see such a great and well-thought out library/framework (i.e. also including flake-aspects, etc) in this problem space :) – in my opinion this is next-gen stuff and one of the best inventions since sliced bread (as we like to say around here). I'm really looking forward to checking out your latest developments first thing tomorrow morning. Keep cracking, I can't wait!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants