Skip to content

Commit

Permalink
nixos/activation: remove specialfs activationScript
Browse files Browse the repository at this point in the history
The stage-2-init.sh script has the same functionality hardcoded so we do
not need it in the activationScript again.
  • Loading branch information
nikstur committed Oct 24, 2023
1 parent 59e3726 commit a8f50f9
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions nixos/modules/system/activation/activation-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ in

system.activationScripts.stdio = ""; # obsolete
system.activationScripts.var = ""; # obsolete
system.activationScripts.specialfs = ""; # obsolete

systemd.tmpfiles.rules = [
"D /var/empty 0555 root root -"
Expand All @@ -252,25 +253,6 @@ in
rmdir --ignore-fail-on-non-empty /usr/bin /usr
'';

system.activationScripts.specialfs =
''
specialMount() {
local device="$1"
local mountPoint="$2"
local options="$3"
local fsType="$4"
if mountpoint -q "$mountPoint"; then
local options="remount,$options"
else
mkdir -p "$mountPoint"
chmod 0755 "$mountPoint"
fi
mount -t "$fsType" -o "$options" "$device" "$mountPoint"
}
source ${config.system.build.earlyMountScript}
'';

systemd.user = {
services.nixos-activation = {
description = "Run user-specific NixOS activation";
Expand Down

0 comments on commit a8f50f9

Please sign in to comment.