Skip to content

Simplify default template#142

Merged
vic merged 1 commit intomainfrom
tmplates
Feb 6, 2026
Merged

Simplify default template#142
vic merged 1 commit intomainfrom
tmplates

Conversation

@vic
Copy link
Copy Markdown
Member

@vic vic commented Feb 6, 2026

This will help people getting started.

Our old default template is now named example, as it provides some layout structure users can consider but it is not enforced at all.

Also renamed examples template to be CI now. since it is used for running all tests.

@vic vic force-pushed the tmplates branch 11 times, most recently from ee3c56a to 22a4414 Compare February 6, 2026 07:43
Other templates were renamed:

examples -> ci
default  -> example
@vic vic changed the title templates Simplify default template Feb 6, 2026
@vic vic merged commit 42e09c1 into main Feb 6, 2026
11 checks passed
@vic vic deleted the tmplates branch February 6, 2026 07:55
@Buttars
Copy link
Copy Markdown

Buttars commented Feb 19, 2026

This example fails nix flake check with

den/templates/default on  main
❯ nix flake check
warning: unknown flake output 'modules'
evaluation warning: system.stateVersion is not set, defaulting to 26.05. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
error:
       … while checking flake output 'nixosConfigurations'

       … while checking the NixOS configuration 'nixosConfigurations.igloo'

       … while calling the 'head' builtin
         at /nix/store/wzcf74b2g5c3qfg4rcswcz28ngiwzzp0-source/lib/attrsets.nix:1713:13:
         1712|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1713|             head values
             |             ^
         1714|           else

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/wzcf74b2g5c3qfg4rcswcz28ngiwzzp0-source/nixos/modules/system/activation/top-level.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error:
       Failed assertions:
       - The ‘fileSystems’ option does not specify your root file system.
       - You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.

den/templates/default on  main

@Buttars
Copy link
Copy Markdown

Buttars commented Feb 19, 2026

I added the following lines which seemed to fix the issue but I'm not sure what the implications are to the vm host. I'm not sure if this will affect iso builds.

    den.aspect.<vm host aspect>.nixos = {
      fileSystems."/".device = lib.mkDefault "/dev/noroot";
      boot.loader.grub.enable = lib.mkDefault false;
    };

@vic
Copy link
Copy Markdown
Member Author

vic commented Feb 19, 2026

Hey, @Buttars, thanks for reporting.

The CI is green because test.yml creates a module having _module.args.CI = {} which enables the CI environment, and we have a den._.ci-noboot that when disables grub and root device when CI is present.

We have to fix that, because as you mentioned, people are expecting to clone and have no problems. They don't have _module.args.CI and that's why there's no boot device. Feel free to submit a PR fixing this, I'm currently busy moving the context-propagation system outside of den.default.

@vic
Copy link
Copy Markdown
Member Author

vic commented Feb 19, 2026

grep the repo for grub.enable

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.

2 participants