Modetc: Move your dotfiles from kernel space

(maxwell.eurofusion.eu)

33 points | by todsacerdoti 6 hours ago ago

16 comments

  • pimlottc 7 minutes ago

    I didn’t understand what this was from the title. Perhaps a better description would be “mod_rewrite for your homedir”

  • tengwar2 3 hours ago

    One of the annoyances of Linux is working out where configuration information is, following through multiple layers of indirection and files over-riding other files. This looks like adding another layer, another place to look, and if you're reading the man file for a shell (for example) it probably won't even mention that this could invalidate the information contained in that in the man file.

    • ktm5j 22 minutes ago

      You're not wrong. In a worst case scenario I resort to using strace to figure out where a program is reading config from.. from what I understand, if this kernel module is in use then even that approach wouldn't help.

      But since the use case is personal dotfiles, I imagine the user isn't going to forget that they set this up.

    • mariusor 2 hours ago

      > working out where configuration information is

      Generally, good behaved applications have an entry in their man page that spells out these details for you, so you don't have to work out anything.

      • user3939382 an hour ago

        Unfortunately so many packages these days don’t even have a man page at all let alone one with good config info.

        • mariusor an hour ago

          Well ... hopefully they're open source and all that.

    • skobes 2 hours ago

      Tomorrow: modify man pages from kernel space!

    • deafpolygon 2 hours ago

      Always check the man pages..

  • yokoprime 3 hours ago

    I struggle to see a valid usecase for this that isn’t handled by symlinks.

    • regularfry 3 hours ago

      If I symlink ~/.ssh -> ~/.config/ssh, I still have .ssh in my ~. Whereas if I rewrite it, I don't.

      • hvenev 3 hours ago

        Will you not have `~/.ssh`? If you have `.ssh .config/ssh` as a rewrite rule, `stat ~/.ssh` will still find it.

        • txtsd 3 hours ago

          The point is to have a clean home directory.

          • trollbridge 37 minutes ago

            You could write a kernel module, then, that just hides certain symlinks from you (which is effectively what this module is).

          • jl6 2 hours ago

            Abandon hope.

            I just treat ~ as a system-owned configuration area, and put my actual files (documents, photos, etc.) in a completely different hierarchy under /.

    • user3939382 an hour ago

      The use case is that you can actually use your home directory without either (a) hiding files or (b) wading through 40 config files and dirs that XDG ignorant devs put there.

  • user3939382 an hour ago

    I absolutely love this and have wanted to take the time to build this for years precisely because of dotfiles. Thank you!