Modetc: move your dotfiles from kernel space

In the past week I managed to work a bit on modetc and fix the last remaining bugs (unwanted references keeping mountpoints busy, handling paths starting with ../).

I have also added some sanitisation to the parameters, so modetc will no longer crash your kernel if you forget to set them. The latest version should be pretty safe to use, now.

Finally, the default rule (e.g. ~/.random_dotfile → ~/.config/random_dotfile) can now be disabled, so modetc can be used for more general purposes.
For example, you should be able to rewrite Nix store paths and apply a security patch without recompiling all the packages (very expensive) or using system.replaceDependencies (still quite slow).

7 Likes