Skip to content
New issue

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

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

Already on GitHub? # to your account

Home-manager inside ./modules or ./profiles to set user settings in a user agnostic way #303

Closed
Th3Whit3Wolf opened this issue Jun 2, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@Th3Whit3Wolf
Copy link

I couldn't find any previous issues related to this.

Would your feature fix an existing issue?

Not really but I think it would be a nice to have before 1.0

Describe the solution you'd like

I would like to be able to use home-manager inside ./modules or ./profiles in a user agnostic way, so that you could declare settings for a window manager, text editor, etc via home-manager. Ideally in a way that is overridable. I think this would make modules/profiles more powerful.

Describe alternatives you've considered

My nixfu is pretty weak and I'm not certain that this is possible.

Additional context

In case it is unclear, when I say user agnostic I'd like it to either:

  • Only work on users created by the end user (not provided by a package and not root or nobody)

or

  • Work as function that takes a list of users as an argument
@Th3Whit3Wolf Th3Whit3Wolf added the enhancement New feature or request label Jun 2, 2021
@Pacman99
Copy link
Member

Pacman99 commented Jun 2, 2021

I believe we already have this feature, but correct me if your looking for something more.

In any version of devos past 0.9(maybe even earlier) there is a concept of "user profiles" and "user modules". They reside in the users/ folder and work exactly the same as the regular profiles and modules folder, except they are imported/passed to home-manager.

With devos 0.10.0, home-manager has a dedicated API argument where you can pass a list of home-manager modules and have home-manager profiles that get passed as suites to your home-manager users. Theres an example on how to do this in the nixos user profile.

It does look like the documentation needs to be updated: https://github.com/divnix/devos/blob/core/doc/concepts/users.md, I'll try and get around to that.

@Th3Whit3Wolf Th3Whit3Wolf changed the title Home-manager inside ./modules or ./profiles to set user settings in a user agnostic wat Home-manager inside ./modules or ./profiles to set user settings in a user agnostic way Jun 3, 2021
@Th3Whit3Wolf
Copy link
Author

Th3Whit3Wolf commented Jun 3, 2021

It's difficult for me to tell looking at the documentation. I am currently working off of the develop branch. If I want to make all users using sway set wayland.windowManager.sway.terminal = "alacritty"; what would that look like?

@Pacman99
Copy link
Member

Pacman99 commented Jun 3, 2021

If I want to make all users using sway set wayland.windowManager.sway.terminal = "alacritty"; what would that look like?

Setting that option would only affect users that have sway enabled, thats a standard nixos thing. I would personally enable that option in some profile that deals with setting defaults, apps, or perhaps even the sway profile itself. Then import that profile into my user.

@Pacman99
Copy link
Member

Pacman99 commented Jun 3, 2021

I included updates to the home-manager docs in #304

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants