mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
disable swap in disko-install
Update disko-install Co-authored-by: Michael Hoang <Enzime@users.noreply.github.com>
This commit is contained in:
1 parent
eb1bb9fe27
commit
fd3e326e9a
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -240,7 +240,9 @@ main() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$disko_script"
|
# We don't want swap as can break your running system in weird ways if you eject the disk
|
||||||
|
# Hopefully disko-install has enough RAM to run without swap, otherwise we can make this configurable in future.
|
||||||
|
DISKO_SKIP_SWAP=1 "$disko_script"
|
||||||
|
|
||||||
for source in "${!extraFiles[@]}"; do
|
for source in "${!extraFiles[@]}"; do
|
||||||
destination=${extraFiles[$source]}
|
destination=${extraFiles[$source]}
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@
|
|||||||
# TODO: we don't support encrypted swap yet
|
# TODO: we don't support encrypted swap yet
|
||||||
default = lib.optionalAttrs (!config.randomEncryption) {
|
default = lib.optionalAttrs (!config.randomEncryption) {
|
||||||
fs.${config.device} = ''
|
fs.${config.device} = ''
|
||||||
if ! swapon --show | grep -q "^$(readlink -f "${config.device}") "; then
|
if test "''${DISKO_SKIP_SWAP:-}" != 1 && ! swapon --show | grep -q "^$(readlink -f "${config.device}") "; then
|
||||||
swapon ${
|
swapon ${
|
||||||
lib.optionalString (config.discardPolicy != null)
|
lib.optionalString (config.discardPolicy != null)
|
||||||
"--discard${lib.optionalString (config.discardPolicy != "both")
|
"--discard${lib.optionalString (config.discardPolicy != "both")
|
||||||
|
|||||||
Reference in new issue
Block a user