From 8c770400013df96d015c28d70dc20d2d06017b26 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Fri, 24 Nov 2023 21:37:18 +0100 Subject: [PATCH] remove patches --- lib/mkmachine.nix | 2 +- machines/fischer/home-julien.nix | 2 +- machines/x2100/home-julien.nix | 2 +- patches/bcachefs-systemd-stage-1.patch | 63 -------------------------- 4 files changed, 3 insertions(+), 66 deletions(-) delete mode 100644 patches/bcachefs-systemd-stage-1.patch diff --git a/lib/mkmachine.nix b/lib/mkmachine.nix index 6da4d8b..8f1998f 100644 --- a/lib/mkmachine.nix +++ b/lib/mkmachine.nix @@ -6,7 +6,7 @@ let nixpkgs-patched-src = (import inputs.nixpkgs { system = arch; }).applyPatches { name = "nixpkgs-patches"; src = inputs.nixpkgs; - patches = [ ../patches/bcachefs-systemd-stage-1.patch ]; + patches = [ ]; }; in { diff --git a/machines/fischer/home-julien.nix b/machines/fischer/home-julien.nix index 7f0e667..baf93af 100644 --- a/machines/fischer/home-julien.nix +++ b/machines/fischer/home-julien.nix @@ -71,7 +71,7 @@ gh gh-dash cvc5 - nixpkgs-patched.signal-desktop-beta + signal-desktop-beta coqPackages.coqide (why3.withProvers [ diff --git a/machines/x2100/home-julien.nix b/machines/x2100/home-julien.nix index 8e1146d..63ea51c 100644 --- a/machines/x2100/home-julien.nix +++ b/machines/x2100/home-julien.nix @@ -69,7 +69,7 @@ gh gh-dash cvc5 - nixpkgs-patched.signal-desktop-beta + signal-desktop-beta coqPackages.coqide (why3.withProvers [ diff --git a/patches/bcachefs-systemd-stage-1.patch b/patches/bcachefs-systemd-stage-1.patch deleted file mode 100644 index 71604ed..0000000 --- a/patches/bcachefs-systemd-stage-1.patch +++ /dev/null @@ -1,63 +0,0 @@ -diff --git a/nixos/modules/tasks/filesystems/bcachefs.nix b/nixos/modules/tasks/filesystems/bcachefs.nix -index 851c09781339..6e5adb2a64c5 100644 ---- a/nixos/modules/tasks/filesystems/bcachefs.nix -+++ b/nixos/modules/tasks/filesystems/bcachefs.nix -@@ -63,6 +63,32 @@ in - ''; - }; - -+ boot.initrd.systemd.services = lib.mapAttrs' (mountpoint: fileSystem: let -+ mountUnitName = -+ if mountpoint == "/" -+ then "sysroot.mount" -+ else "sysroot-" + (utils.escapeSystemdPath mountpoint) + ".mount"; -+ deviceUnit = (utils.escapeSystemdPath fileSystem.device) + ".device"; -+ in { -+ name = "unlock-bcachefs-${utils.escapeSystemdPath mountpoint}"; -+ value = { -+ requiredBy = [mountUnitName]; -+ before = [mountUnitName]; -+ after = [deviceUnit]; -+ requires = [deviceUnit]; -+ serviceConfig.Type = "oneshot"; -+ script = '' -+ if ! bcachefs unlock -c ${fileSystem.device}; then -+ exit 0 -+ fi -+ passphrase= -+ until bcachefs unlock ${fileSystem.device} <<<"$passphrase"; do -+ passphrase=$(systemd-ask-password "bcachefs passphrase for ${fileSystem.device}") -+ done -+ ''; -+ }; -+ }) bootFs; -+ - boot.initrd.extraUtilsCommands = lib.mkIf (!config.boot.initrd.systemd.enable) '' - copy_bin_and_libs ${pkgs.bcachefs-tools}/bin/bcachefs - ''; -diff --git a/nixos/tests/installer-systemd-stage-1.nix b/nixos/tests/installer-systemd-stage-1.nix -index 03f0ec8d746b..69c19f089e4c 100644 ---- a/nixos/tests/installer-systemd-stage-1.nix -+++ b/nixos/tests/installer-systemd-stage-1.nix -@@ -8,6 +8,8 @@ - # them when fixed. - inherit (import ./installer.nix { inherit system config pkgs; systemdStage1 = true; }) - # bcache -+ bcachefsSimple -+ bcachefsEncrypted - btrfsSimple - btrfsSubvolDefault - btrfsSubvolEscape -diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix -index 590988d95986..027153ed31ec 100644 ---- a/nixos/tests/installer.nix -+++ b/nixos/tests/installer.nix -@@ -916,7 +916,7 @@ in { - enableOCR = true; - preBootCommands = '' - machine.start() -- machine.wait_for_text("enter passphrase for ") -+ machine.wait_for_text("passphrase for ") - machine.send_chars("password\n") - ''; -