mirror of
https://github.com/nix-community/impermanence
synced 2024-11-10 05:44:17 +00:00
home-manager: allow dependencies on bind mounts
This commit is contained in:
parent
df5038f20c
commit
77a0cebfdd
1 changed files with 2 additions and 1 deletions
|
@ -140,7 +140,7 @@ in
|
|||
++ optional (versionAtLeast pkgs.bindfs.version "1.14.9") "fsname=${targetDir}"
|
||||
);
|
||||
bindfsOptionFlag = optionalString (bindfsOptions != "") (" -o " + bindfsOptions);
|
||||
bindfs = "bindfs -f" + bindfsOptionFlag;
|
||||
bindfs = "bindfs" + bindfsOptionFlag;
|
||||
startScript = pkgs.writeShellScript name ''
|
||||
set -eu
|
||||
if ! mount | grep -F ${mountPoint}' ' && ! mount | grep -F ${mountPoint}/; then
|
||||
|
@ -183,6 +183,7 @@ in
|
|||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
ExecStart = "${startScript}";
|
||||
ExecStop = "${stopScript}";
|
||||
Environment = "PATH=${makeBinPath [ pkgs.coreutils pkgs.utillinux pkgs.gnugrep pkgs.bindfs ]}:/run/wrappers/bin";
|
||||
|
|
Loading…
Reference in a new issue