nix-community / NUR

Nix User Repository: User contributed nix packages [maintainer=@Mic92]
https://nur.nix-community.org/
MIT License
1.28k stars 336 forks source link

Namespacing of NixOs Modules following the addition of other OS's #140

Open moredhel opened 5 years ago

moredhel commented 5 years ago

PR #98 describes how to write and import your own home-module modules & configuration. This started a discussion on what the best-practices for doing so is, and what to do as more systems (crostini, macbook, init.d?, windows?) are added in the future.

With this in mind, I have pulled out the discussion into a separate Issue.

Please refer to the following thread for context: https://github.com/nix-community/NUR/pull/98#discussion_r315204124

Currently the following are being discussed:

Possible actionables:

CC @rycee @Mic92

Mic92 commented 5 years ago

What is Crostini?

moredhel commented 5 years ago

https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md

Custom LXC containers running on a chromebook. It's not technically Crostini specific, but I have a few services which I have copied over from NixOs and reworked to run under the user-account.

rycee commented 5 years ago

As I mentioned in that PR the naming scheme I would prefer is

The attribute path gets quite long but at least it is quite clear.

Unfortunately, since repos.abc.modules currently is used for NixOS modules this naming scheme is not backwards compatible. But perhaps this is not too bad? Since the naming of attributes under repos.abc is under the control of abc they could choose the existing scheme or this new one.

I kind of screwed myself by having a repos.rycee.modules.home-manager module that actually is a NixOS module but I suspect most other users could keep the old attributes for backwards compatibility if they want to switch scheme.

moredhel commented 5 years ago

There was a response on the mailing-list which doesn't seem to have been propogated over here. (EDIT Found it: #51)

The reason for this is that one can more easily add additional operating-systems without having to conform to a specified top-level.

Potentially if there are top-level things, such as packages, then it may be worth doing something there:

Mic92 commented 5 years ago

The migration sounds a bit painful for both users/repo owners. How would you implement that?