diff --git a/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch b/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch index e3a2f969273..bcc8d8f32f7 100644 --- a/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch +++ b/pkgs/os-specific/linux/systemd/0001-Make-systemctl-daemon-reexec-do-the-right-thing-on-N.patch @@ -1,7 +1,7 @@ From 8f861550827e750fb56954c3f91a2f565abb42bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 15:44:33 +0100 -Subject: [PATCH 1/8] Make "systemctl daemon-reexec" do the right thing on +Subject: [PATCH 1/9] Make "systemctl daemon-reexec" do the right thing on NixOS --- diff --git a/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch b/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch index a68973e7895..27ac6183efc 100644 --- a/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch +++ b/pkgs/os-specific/linux/systemd/0002-Ignore-duplicate-paths-in-systemctl-start.patch @@ -1,7 +1,7 @@ From 2afcee0b4da066fb5f8fc00b749d88f5bd9df3d3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 15:45:01 +0100 -Subject: [PATCH 2/8] Ignore duplicate paths in "systemctl start" +Subject: [PATCH 2/9] Ignore duplicate paths in "systemctl start" --- src/systemctl/systemctl.c | 2 +- diff --git a/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch b/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch index ee95a33839f..ad162fa789a 100644 --- a/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch +++ b/pkgs/os-specific/linux/systemd/0003-Start-device-units-for-uninitialised-encrypted-devic.patch @@ -1,7 +1,7 @@ From b288ca7d376e3a78368a2b59529ebe5ba812babf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 15:46:30 +0100 -Subject: [PATCH 3/8] Start device units for uninitialised encrypted devices +Subject: [PATCH 3/9] Start device units for uninitialised encrypted devices This is necessary because the NixOS service that initialises the filesystem depends on the appearance of the device unit. Also, this diff --git a/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch b/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch index a060a1bbce5..7fe18f378f9 100644 --- a/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch +++ b/pkgs/os-specific/linux/systemd/0004-Set-switch-to-configuration-hints-for-some-units.patch @@ -1,7 +1,7 @@ From 7a498e661f3d111fa09700a6cfa62cfd6733b1cc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 15:48:19 +0100 -Subject: [PATCH 4/8] Set switch-to-configuration hints for some units +Subject: [PATCH 4/9] Set switch-to-configuration hints for some units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch b/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch index 6905b507c74..78683f0cf08 100644 --- a/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch +++ b/pkgs/os-specific/linux/systemd/0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch @@ -1,7 +1,7 @@ From e6bbe5fa858bd8196c8e1f264904679e6bda426d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 15:56:03 +0100 -Subject: [PATCH 5/8] sysinit.target: Drop the dependency on local-fs.target +Subject: [PATCH 5/9] sysinit.target: Drop the dependency on local-fs.target and swap.target Having all services with DefaultDependencies=yes depend on diff --git a/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch b/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch index 8dca3cb0e8c..e440f6113dc 100644 --- a/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch +++ b/pkgs/os-specific/linux/systemd/0006-Don-t-call-plymouth-quit.patch @@ -1,7 +1,7 @@ From 4731a9074538e9e24d2b81fc737917b064e194e6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 18:36:28 +0100 -Subject: [PATCH 6/8] Don't call "plymouth quit" +Subject: [PATCH 6/9] Don't call "plymouth quit" NixOS doesn't use Plymouth (yet). --- diff --git a/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch b/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch index 9fdb454a2a9..9c322c9fc59 100644 --- a/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch +++ b/pkgs/os-specific/linux/systemd/0007-Ignore-IPv6-link-local-addresses.patch @@ -1,7 +1,7 @@ From f0c362873860526579bf9bda216005fd5a0936dd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Feb 2013 12:41:14 +0100 -Subject: [PATCH 7/8] Ignore IPv6 link-local addresses +Subject: [PATCH 7/9] Ignore IPv6 link-local addresses Returning IPv6 link-local addresses is a bad idea, because they only work if an application connects specifically over the corresponding diff --git a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch b/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch index d8384e1332a..803227031f7 100644 --- a/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch +++ b/pkgs/os-specific/linux/systemd/0008-Don-t-try-to-unmount-nix-or-nix-store.patch @@ -1,7 +1,7 @@ From 0112df74e576dd683c132ec33861b7099dc94454 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Apr 2013 13:16:57 +0200 -Subject: [PATCH 8/8] Don't try to unmount /nix or /nix/store +Subject: [PATCH 8/9] Don't try to unmount /nix or /nix/store They'll still be remounted read-only. diff --git a/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch b/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch new file mode 100644 index 00000000000..d0bade9ba5b --- /dev/null +++ b/pkgs/os-specific/linux/systemd/0009-Start-ctrl-alt-del.target-irreversibly.patch @@ -0,0 +1,27 @@ +From ed7c22c76e1399861ec8e0216f08a7f9419eea50 Mon Sep 17 00:00:00 2001 +From: Eelco Dolstra +Date: Tue, 7 May 2013 14:03:13 +0200 +Subject: [PATCH 9/9] Start ctrl-alt-del.target irreversibly + +This makes ctrl-alt-del reboots more robust, just like "systemctl +reboot". +--- + src/core/manager.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/manager.c b/src/core/manager.c +index c7f8f20..0508628 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1372,7 +1372,7 @@ static int manager_process_signal_fd(Manager *m) { + + case SIGINT: + if (m->running_as == SYSTEMD_SYSTEM) { +- manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE); ++ manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET, JOB_REPLACE_IRREVERSIBLY); + break; + } + +-- +1.8.2.1 + diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 995049fcf6d..2482f808cac 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { ./0006-Don-t-call-plymouth-quit.patch ./0007-Ignore-IPv6-link-local-addresses.patch ./0008-Don-t-try-to-unmount-nix-or-nix-store.patch + ./0009-Start-ctrl-alt-del.target-irreversibly.patch ] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch; buildInputs =