lol

Merge pull request #264200 from K900/revert-specialfs

Revert "nixos/activation: remove specialfs activationScript"

authored by

K900 and committed by
GitHub
b9d8a730 173c9a5f

+19 -1
+19 -1
nixos/modules/system/activation/activation-script.nix
··· 230 230 231 231 system.activationScripts.stdio = ""; # obsolete 232 232 system.activationScripts.var = ""; # obsolete 233 - system.activationScripts.specialfs = ""; # obsolete 234 233 235 234 systemd.tmpfiles.rules = [ 236 235 # Prevent the current configuration from being garbage-collected. ··· 250 249 else '' 251 250 rm -f /usr/bin/env 252 251 rmdir --ignore-fail-on-non-empty /usr/bin /usr 252 + ''; 253 + 254 + system.activationScripts.specialfs = 255 + '' 256 + specialMount() { 257 + local device="$1" 258 + local mountPoint="$2" 259 + local options="$3" 260 + local fsType="$4" 261 + 262 + if mountpoint -q "$mountPoint"; then 263 + local options="remount,$options" 264 + else 265 + mkdir -p "$mountPoint" 266 + chmod 0755 "$mountPoint" 267 + fi 268 + mount -t "$fsType" -o "$options" "$device" "$mountPoint" 269 + } 270 + source ${config.system.build.earlyMountScript} 253 271 ''; 254 272 255 273 systemd.user = {