Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
moredhel opened this issue Aug 19, 2019 · 5 comments
Open

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

moredhel opened this issue Aug 19, 2019 · 5 comments

Comments

@moredhel
Copy link
Contributor

moredhel commented Aug 19, 2019

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: #98 (comment)

Currently the following are being discussed:

  • Home-Manager: hmModules
  • Darwin: ndModules
  • Crostini: crosModules

Possible actionables:

  • extend the template default.nix to include these namespaces
  • add documentation about the expected locations of these namespaces
  • all the above

CC @rycee @Mic92

@Mic92
Copy link
Member

Mic92 commented Aug 20, 2019

What is Crostini?

@moredhel
Copy link
Contributor Author

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
Copy link
Member

rycee commented Sep 2, 2019

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

  • repos.abc.modules.nixos.xyz
  • repos.abc.modules.home-manager.xyz
  • repos.abc.modules.nix-darwin.xyz

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
Copy link
Contributor Author

moredhel commented Sep 4, 2019

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

  • repos.abc.nixos.modules.xyz
  • repos.abc.home-manager.modules.xyz

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:

  • repos.abc.pkgs.emacs
  • repos.abc.darwin.pkgs.emacs (if only mac compatible)

@Mic92
Copy link
Member

Mic92 commented Sep 6, 2019

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

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

No branches or pull requests

3 participants