Sorry if this is an ignorant question. I love Nix, but as a user it feels absurd that changing an option from true to false in a home-manager managed config file that then gets transpiled from Nix to TOML, for instance, takes like 10 seconds on a decently modern machine.
In my world that kind of transpilation should be instant. I get that there's more happening behind the scenes than just doing Nix -> TOML, but still. Imagine if the transpilation of config files were instant, so you could have home-manager automagically do the transpilation every time you save the file. That would be awesome, especially for programs that support hot-reloading like Hyprland or Niri.
Is this a Nix issue or a home-manager issue? How much of speedup would it yield to rewrite Nix and/or home-manager in a faster language like Zig or Rust?
@mawkler@lemmy.ml
Home-manager has a large number of interdependent modules, which makes Nix's evaluation slow. If you add more external homeModules, the situation becomes even worse.
If you are using home-manager's nixosModule, you can try switching to standalone home-manager. Alternatively, you can try lightweight
$HOMEmanagement tools like hejm.You can also try home-manager's
lib.file.mkOutOfStoreSymlinkto speed up your dotfiles iteration. Note that if you are using flakes, you should use absolute path.