diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index 606b620ef120..b5dae96d79c6 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -255,11 +255,6 @@ in umount = mkSetuidRoot "${lib.getBin pkgs.util-linux}/bin/umount"; }; - boot.specialFileSystems.${parentWrapperDir} = { - fsType = "tmpfs"; - options = [ "nodev" "mode=755" "size=${config.security.wrapperDirSize}" ]; - }; - # Make sure our wrapperDir exports to the PATH env variable when # initializing the shell environment.extraInit = '' @@ -275,6 +270,17 @@ in mrpx ${wrap.source}, '') wrappers; + systemd.mounts = [{ + where = parentWrapperDir; + what = "tmpfs"; + type = "tmpfs"; + options = lib.concatStringsSep "," ([ + "nodev" + "mode=755" + "size=${config.security.wrapperDirSize}" + ]); + }]; + systemd.services.suid-sgid-wrappers = { description = "Create SUID/SGID Wrappers"; wantedBy = [ "sysinit.target" ];