4 ms·
I'm familiar with home manager (or as I like to call it, a hammer looking for a nail, that solves no problem). I don't think home manager has any relationship w
by sourcegrift 3y ago
I'm familiar with home manager (or as I like to call it, a hammer looking for a nail, that solves no problem). I don't think home manager has any relationship with flakes. Also, nix solves actual real problems, home manager doesn't. There are better dotfile managers. In fact, vim understands the syntaxes of a lot of dotfiles, with home manager, you even lose that.
- colordrops 3y agoThere are Nix LSP servers now that handle embedded config files. But beyond that, you can always just leave the config in its original format and import it into the Nix config, and not lose your syntax highlighting. Speaking of vim, I've got neovim configured completely with home manager. It references plugins as first-class nix packages, and also any external dependencies like language servers, node packages, parsing tools etc are also managed by Nix. You can reference the deps in the vim config and it will automatically download and point to them in the nix store without even installing them. It's amazing. Everytime I upgrade and building my system, my nvim setup gets upgraded automatically too. No need for a package manager or manual updates.
- sourcegrift 3y agoBut I have the exact same setup without the "hammer-searching-for-nail" home manager. (Almost) all of my vim plugins are managed by my nixos config
- teekert 3y agoWhich you can presumably only do on a 1 user system right? (I’m just trying to understand, I thought home manager makes more sense on a multi user system, and has some options for more fine grained configuration?
- chriswarbo 3y agoHome Manager is less useful if you're using NixOS. I've found it handy on non-NixOS systems, e.g. my phone; although I'm planning to switch that to NixOS at some point too ;)
- monka14675 3y agoCan you tell me which one of the nix lsp servers supports the embedded configuration in multiline strings? I think neither rnix-lsp, nil or nixd support this, but maybe I am missing something.
- teekert 3y agoSo very package should be a system package, available to every user?
- teekert 3y agoVery=every.
- chriswarbo 3y ago> In fact, vim understands the syntaxes of a lot of dotfiles, with home manager, you even lose that. Nix is perfectly capable of referencing external text files (e.g. `./my-config-file.ini`), which you can write with vim or whatever if you like. It's trivial to put such files in place with Home Manager (or NixOS config) if you want, e.g. home.file.foo.source = ./my-config-file.ini; Home Manager is certainly overkill if that's all you're using it for; but many more things become possible thanks to its use of Nix. For example, you can run some find/replace on the file contents (say, to splice in some Nix store paths, or the results of some calculation); you can fetch arbitrary files from arbitrary locations (e.g. some other git repo); you can choose between alternative contents based on arbitrary criteria (say, CPU type, or hostname); etc.
- pkulak 3y agoI moved from Chezmoi to Home Manager. Chezmoi is easily the best dotfile manager I had used at the time, and Home Manager is on a totally different level.
- lillecarl 3y agoJust because you can't grasp the benefits doesn't mean they're not there, in reality it solves all in-user config for a lot of people using it.
- pxc 3y ago> vim understands the syntaxes of a lot of dotfiles, with home manager, you even lose that. I wonder what we can do about this, or what is the best way to annotate long strings in Nix code that are actually source snippets. Something like how code snippets are handled in Org files would be awesome.