Open maxdevjs opened 5 years ago
It's not great - whenever I edit the configs in /etc/nixos, I just copy all the files from /etc/nixos to this repo, which lives somewhere in the home directory of my normal user account.
Originally I toyed with making /etc/nixos a git repo itself, and trying to manage it that way, but I decided I didn't want to mess with the root permissions issues there.
For my other dot files, I just make symbolic links from my home directory to this repo.
Definitely not a super elegant setup by any means...
Thanks for the reply.
Just installed NixOS, but I am more or less in the same situation. Did you ever tried to symlink from /etc/nixos to this repo? Would still cope with permissions issues, but perhaps would be leaner to edit things all in the same place? Wondering if, over time, this might cause some problems...
I never actually tried linking to/from /etc/nixos. I would be curious to hear what your experiences are if you try it though :smiley:
In theory, it seems like you should be able to put symlinks in /etc/nixos to a repo somewhere else.
I'm not sure where Nix discussions take place, but it might be worth asking some of the more experienced people if they have any suggestions. I posted something on the NixOS subreddit once https://www.reddit.com/r/nixos, but I don't know if that's the best place to ask questions.
Living adventurously!
/etc/nixos
dir to $HOME/dotfiles
(ending up with $HOME/dotfiles/nixos
and no /etc/nixos
whatsoever)sudo ln -sfv $HOME/dotfiles /etc/nixos /etc/
So far no issues, I can rebuild etc and there are not complaints. Theoretically should work with no flaws, testing it for a while.
By the way, did you try the
dotfiles = stringAfter [ "users" ]
''
cd /home/user
'';
option?
Cool - I might have to switch to the links for the /etc files. Thanks for the info.
I have not tried that dotfiles
option - I need to look into that. Thanks!
Thanks to you... And if you find some interesting solution, let me know!
Hello,
I am curious: how do you manage nix configuration? Linking/copying it in /etc/nixos, ...?