Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home-manager: refactor & improve inconsistencies #209

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nazarewk
Copy link

@nazarewk nazarewk commented Aug 30, 2024

basically quite large refactor of home-manager module

supersedes #208

changes

  • switch most of shell to fully-fledged script files with their own dependencies:
    • proper syntax highlighting in IDEs
    • automated shellchecks during builds
    • significantly smaller and easier to identify home.activation snippets
    • most operations are copy-pasteable oneliners for easier debugging
  • normalizes a lot of repeated code (getHomeDirCfg @ lib.nix)
  • both files and directories are coerced to submodule types (instead of handling both strings and objects throughout the code)
  • added method="external" for both files and directories so one can handle mountpoints management themselves (eg: in a NixOS module for root user, which doesn't have dedicated user instance of systemd), see my code

fixes

backward incompatibilities

  • switched systemd service naming schemes from bindMount-<shell-escaped then sanitized source dir> to bindMount--<sanitized mountpoint> without further escaping
  • files & directories are automatically converted to objects

@nazarewk
Copy link
Author

FYI: using home-manager mounts seems very slow, I have switched to external mounts through NixOS for A LOT better performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant