git.iko.soy/typeable/nixpkgs
on master help sign in
systemd: read units from /etc/systemd-mutable

This allows for persistent units managed outside of configuration.nix

commite3825b47ec76b2178321bb9da362f7308076b902 authorShea Levy <shea@shealevy.com> dateThu 18 Dec 2014, 17:08 (12 years ago) parentefb2b27
2 files changed+44
pkgs/os-specific/linux/systemd/default.nix+3 pkgs/os-specific/linux/systemd/etc-systemd-mutable.patch+41
pkgs/os-specific/linux/systemd/default.nix+3
@@ -25,6 +25,9 @@ stdenv.mkDerivation rec {
2525 # Fixes systemd-journald so that it does not get killed
2626 # by systemd-journal-flush starting too quickly
2727 ./systemd-journald-type-notify.patch
28+ # Enables /etc/systemd-mutable/{system,user} for persistent mutable
29+ # units
30+ ./etc-systemd-mutable.patch
2831 ];
2932
3033 buildInputs =
pkgs/os-specific/linux/systemd/etc-systemd-mutable.patchnew file+41
@@ -0,0 +1,41 @@
1+diff -Naur systemd-217-orig/src/core/systemd.pc.in systemd-217/src/core/systemd.pc.in
2+--- systemd-217-orig/src/core/systemd.pc.in 2014-06-30 17:19:00.693878016 -0400
3++++ systemd-217/src/core/systemd.pc.in 2014-12-18 12:32:04.978371150 -0500
4+@@ -14,8 +14,8 @@
5+ systemduserpresetdir=@userpresetdir@
6+ systemdsystemconfdir=@pkgsysconfdir@/system
7+ systemduserconfdir=@pkgsysconfdir@/user
8+-systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemdsystemunitdir}:/usr/lib/systemd/system:/lib/systemd/system
9+-systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemduserunitdir}:/usr/lib/systemd/user:/usr/share/systemd/user
10++systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/etc/systemd-mutable/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemdsystemunitdir}:/usr/lib/systemd/system:/lib/systemd/system
11++systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/etc/systemd-mutable/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:${systemduserunitdir}:/usr/lib/systemd/user:/usr/share/systemd/user
12+ systemdsystemgeneratordir=@systemgeneratordir@
13+ systemdusergeneratordir=@usergeneratordir@
14+ systemdsleepdir=@systemsleepdir@
15+diff -Naur systemd-217-orig/src/shared/path-lookup.c systemd-217/src/shared/path-lookup.c
16+--- systemd-217-orig/src/shared/path-lookup.c 2014-10-07 09:59:01.480569950 -0400
17++++ systemd-217/src/shared/path-lookup.c 2014-12-18 12:29:36.276567200 -0500
18+@@ -86,6 +86,7 @@
19+ const char * const config_unit_paths[] = {
20+ USER_CONFIG_UNIT_PATH,
21+ "/etc/systemd/user",
22++ "/etc/systemd-mutable/user",
23+ NULL
24+ };
25+
26+@@ -260,6 +261,7 @@
27+ STRV_IFNOTNULL(generator_early),
28+ USER_CONFIG_UNIT_PATH,
29+ "/etc/systemd/user",
30++ "/etc/systemd-mutable/user",
31+ "/run/systemd/user",
32+ STRV_IFNOTNULL(generator),
33+ "/usr/local/lib/systemd/user",
34+@@ -276,6 +278,7 @@
35+ STRV_IFNOTNULL(generator_early),
36+ SYSTEM_CONFIG_UNIT_PATH,
37+ "/etc/systemd/system",
38++ "/etc/systemd-mutable/system",
39+ "/run/systemd/system",
40+ STRV_IFNOTNULL(generator),
41+ "/usr/local/lib/systemd/system",