Generic users (rebased) - #161
Open
nim65s wants to merge 3 commits into
Open
Conversation
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.
|
Tick the box to add this pull request to the merge queue (same as
|
3 tasks
```
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,
{
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This is just a rebase of @clo4 work from #77