diff options
author | B YI <uuuuuu@protonmail.com> | 2019-11-03 12:43:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 12:43:01 +0800 |
commit | f40f98a732659be090ce6b472e5655c8ccd2fc45 (patch) | |
tree | 07e154ac21a5a8d7a59e5e28fbac64701f48f7cc | |
parent | 1c74b29b05a55f1a66afb595fd5796cb52879aa3 (diff) | |
download | nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar.gz nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar.bz2 nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar.lz nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar.xz nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.tar.zst nixpkgs-f40f98a732659be090ce6b472e5655c8ccd2fc45.zip |
pam_mount: change order of lines in pam_mount.conf
Change order of pam_mount.conf.xml so that users can override the preset configs. My use case is to mount a gocryptfs (a fuse program) volume. I can not do that in current order. Because even if I change the `<fusermount>` and `<fuserumount>` by add below to extraVolumes ``` <fusemount>${pkgs.fuse}/bin/mount.fuse %(VOLUME) %(MNTPT) "%(before=\"-o \" OPTIONS)"</fusemount> <fuseumount>${pkgs.fuse}/bin/fusermount -u %(MNTPT)</fuseumount> ``` mount.fuse still does not work because it can not find `fusermount`. pam_mount will told stat /bin/fusermount failed. Fine, I can add a `<path>` section to extraVolumes ``` <path>${pkgs.fuse}/bin:${pkgs.coreutils}/bin:${pkgs.utillinux}/bin</path> ``` but then the `<path>` section is overridden by the hardcoded `<path>${pkgs.utillinux}/bin</path>` below. So it still does not work.
-rw-r--r-- | nixos/modules/security/pam_mount.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/security/pam_mount.nix b/nixos/modules/security/pam_mount.nix index 8b131c54a2a..75f58462d13 100644 --- a/nixos/modules/security/pam_mount.nix +++ b/nixos/modules/security/pam_mount.nix @@ -50,9 +50,6 @@ in <pam_mount> <debug enable="0" /> - ${concatStrings (map userVolumeEntry (attrValues extraUserVolumes))} - ${concatStringsSep "\n" cfg.extraVolumes} - <!-- if activated, requires ofl from hxtools to be present --> <logout wait="0" hup="no" term="no" kill="no" /> <!-- set PATH variable for pam_mount module --> @@ -64,6 +61,9 @@ in <cryptmount>${pkgs.pam_mount}/bin/mount.crypt %(VOLUME) %(MNTPT)</cryptmount> <cryptumount>${pkgs.pam_mount}/bin/umount.crypt %(MNTPT)</cryptumount> <pmvarrun>${pkgs.pam_mount}/bin/pmvarrun -u %(USER) -o %(OPERATION)</pmvarrun> + + ${concatStrings (map userVolumeEntry (attrValues extraUserVolumes))} + ${concatStringsSep "\n" cfg.extraVolumes} </pam_mount> ''; }]; |