From 1588c525c60bcb012eea04636c8f6738cf03247f Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 22 Jun 2024 21:44:27 +0200 Subject: [PATCH] Execute mount scripts as root --- lib/modules/partition.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/modules/partition.nix b/lib/modules/partition.nix index 89372d80..885c92e7 100644 --- a/lib/modules/partition.nix +++ b/lib/modules/partition.nix @@ -287,6 +287,7 @@ mountScript = lib.strings.concatLines ( builtins.map (_: builtins.concatStringsSep " " [ + "sudo" "mount" "--mkdir" (builtins.concatStringsSep " " (builtins.map (_: "-o ${_}") _.mountOptions)) @@ -297,7 +298,7 @@ swapScript = lib.strings.concatLines ( builtins.map - (_: "swapon ${partPath _}") + (_: "sudo swapon ${partPath _}") (builtins.filter (_: _.useSwap) partitions)); in lib.strings.concatLines ( (builtins.map (_: _.script) disks) ++ [