aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotgne22021-01-08 14:45:10 -0700
committernotgne22021-01-08 14:54:00 -0700
commit330a73e329caa1c1b320b67b1b35fb5448223a31 (patch)
treea8784de823fa7d2b030573f856cf2615a7446644
parent1021191b90f31fe34592a1ee95a5d588a2d61dc2 (diff)
Check if systemd-boot is enabled before attempting to delete default entry line
-rw-r--r--flake.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index e7afbdd..368e627 100644
--- a/flake.nix
+++ b/flake.nix
@@ -84,7 +84,9 @@
$PROFILE/bin/switch-to-configuration switch
# https://github.com/serokell/deploy-rs/issues/31
- sed -i '/^default /d' ${base.config.boot.loader.efi.efiSysMountPoint}/loader/loader.conf || :
+ ${with base.config.boot.loader;
+ pkgs.lib.optionalString systemd-boot.enable
+ "sed -i '/^default /d' ${efi.efiSysMountPoint}/loader/loader.conf"}
'';
noop = base: custom base ":";