Skip to content

Generic users (rebased) - #161

Open
nim65s wants to merge 3 commits into
numtide:mainfrom
nim65s:generic-users
Open

Generic users (rebased)#161
nim65s wants to merge 3 commits into
numtide:mainfrom
nim65s:generic-users

Conversation

@nim65s

@nim65s nim65s commented Sep 4, 2026

Copy link
Copy Markdown

Hi,

This is just a rebase of @clo4 work from #77

clo4 added 2 commits September 4, 2026 12:42
Blueprint now supports defining user configurations in the top-level
'users' directory, and makes this a first-class way to share user
configurations without exposing them in the public interface of the
flake.

Users are created in 'users/<username>/home-configuration.nix' (though
this is easy to change in the future).

Existing home configurations can access all the generic configurations
through the new 'users' argument. For example, a user defined at
'users/baz/home-configuration.nix' could be imported and used as a base
by 'hosts/foobar/users/baz.nix' (`imports = [ users.baz ];`) OR as a
standalone configuration without a hostname.

Editorial: new users should still be encouraged to start creating their
configuration per-machine to reduce the complexity of their config, and
only move to a shared config when they _need_ to share it between
multiple devices.
This commit removes the 'users' attrset, as it doesn't give users
anything they can't get from referencing the file path directly.
Referencing the file by path makes the dependency tree more obvious.

This commit can (should?) be squashed into its parent before merge.
@mergify

mergify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

```
error:
       … from call site
         at /nix/store/ac2vc86cfchrwdr2rb2kjcxlh4qkzwvl-source/lib/default.nix:394:39:
          393|               // lib.mapAttrs (
          394|                 username: modulePath: mkHomeConfiguration { inherit pkgs username modulePath; }
             |                                       ^
          395|               ) homesGeneric;

       error: function 'mkHomeConfiguration' called without required argument 'system'
       at /nix/store/ac2vc86cfchrwdr2rb2kjcxlh4qkzwvl-source/lib/default.nix:339:13:
          338|           mkHomeConfiguration =
          339|             {
             |             ^
          340|               username,
{
```
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