Commit graph

9 commits

Author SHA1 Message Date
talyz
4b3000b9be
home-manager: Remove unnecessary PartOf in systemd unit
Fixes #20
2020-10-17 23:45:30 +02:00
talyz
ecb89af129
home-manager: Abbreviate commands using nix- and env variables 2020-10-03 09:40:36 +02:00
talyz
b6181bd997
home-manager: Make quoting and grepping more robust
Try to more properly escape paths using `escapeShellArg` and use
`grep -F` to avoid accidental regexes.
2020-10-03 09:39:34 +02:00
talyz
4d2cfadbc1
home-manager: Make unmounts more robust
Try to unmount normally a few times, and if that fails, unmount lazily
to at least clean up the mount point before the fuse process is killed.
2020-07-24 13:41:21 +02:00
talyz
5b3345400c
home-manager: Bind mount directories instead of symlinking them
Use bindfs to create bind mounts for directories instead of symlinking
them. This should be less problematic for many applications, since
bind mounts are much more transparent.

This sets up the bind mounts in the activation script, before any
writes are done by home-manager, then tears them down again
afterwards. The bind mounts are then handled by individual systemd
services, since they're long-running fuse processes and need to be
managed as such. This also means we leverage home-manager's mechanism
for deciding which user services should be active after a switch to a
new generation, and don't have to bother with cleaning up old leftover
fuse processes.

NOTE: All unmounts done in the activation script are put into a
function which is run either on error, or right before home-manager
starts / reloads systemd units. This will conflict with other attempts
to add traps on ERR, but this isn't currently done upstream.
2020-07-24 13:00:13 +02:00
talyz
def13ddc2e
home-manager: Fix types - string -> str, since string is deprecated 2020-06-07 10:14:06 +02:00
talyz
2472286e92
nixos, home-manager: Handle whitespace in persistentStoragePaths 2020-06-07 10:14:00 +02:00
talyz
27a984a236
Format with nixpkgs-fmt 2020-06-05 19:37:07 +02:00
talyz
b8868e1d83
Add initial home-manager module 2020-06-05 19:36:37 +02:00