Replies: 3 comments 1 reply
-
You can see that nixos-flake uses Which is why that single module of yours uses I'd be happy to help with further questions you have in our Zulip (we also have a stream for nixos-flake itself). |
Beta Was this translation helpful? Give feedback.
-
Thanks! So this As to Zulip, sorry, it somehow gets me super confused how to use it - if you'll forgive me, I'd prefer continuing this conversation here; especially given that it seems we're already having it finalized I think? I'll try to consider Zulip for future questions if you prefer that one. |
Beta Was this translation helpful? Give feedback.
-
Your understanding is correct. The thing you put in |
Beta Was this translation helpful? Give feedback.
-
I'm very interested in migrating to
nixos-flake
, hoping to eventually merge all my home-manager & nixos & nix-darwin configurations. For now, I intended to start by trying to migrate my home-manager configurations only. Currently I have a rather complex and messy (thus also hoping to eventually migrate to "modules")flake.nix
for home-manager, with configs for multipleuser@host
values. As for theuser@host
part, I intend for now to create a.#switch
script or something, inspired by #19, so that is for now not the priority to solve. However, what I got stuck at, is the question: which attributes should I put inperSystem
vs.flake
? Specifically, I tried to mold my config based onexamples/home
, but I got confused and stuck - in the example I see notably two areas:a) in
perSystem =
attribute:https://github.com/srid/nixos-flake/blob/4e422edf6b511f8e214b392cf1a0d4707a0399a4/examples/home/flake.nix#L29-L32
b) in
flake =
attribute:https://github.com/srid/nixos-flake/blob/4e422edf6b511f8e214b392cf1a0d4707a0399a4/examples/home/flake.nix#L39-L44
— both of which seem to sport some contents specific to home-manager configs. What I'm stuck at is: where should I paste the contents from my old config from
user_a@host_x
, and why? And then, as a next step: where should I paste the config of my otheruser_b@host_y
- again, inflake
or inperSystem
? Or should I somehow put parts inflake
, parts inperSystem
? but which parts, and why? Also inflake
, should they all go tohomeModules.default
, or should I create some others sub-attributes inhomeModules
, and why? Finally, in my old configs, I was "modularizing" things by usinginputs.home-manager.lib.homeManagerConfiguration { modules = [ ... ] }
, but now I don't seemodules
innixos-flake
example, but instead seeimports = [ ... ]
, and they seem to be at a different level. This has me even more confused...Is there a chance you could help me try to understand what I should do - how should I choose what I put in
perSystem
vs.flake
(and whether to usedefault
or some other name(s) there), plus how should I split my numerous host-specific tweaks?Beta Was this translation helpful? Give feedback.
All reactions