Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1ea80c2cc378
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 19de59a9bec0
Choose a head ref
  • 14 commits
  • 19 files changed
  • 3 contributors

Commits on Apr 16, 2020

  1. systemd: switch from our own fork to upstream repo + local patches

    After patching, this produces exactly the same source code as in our
    custom fork, but having the actual patches inlined inside nixpkgs makes
    it easier to get rid of them.
    
    In case more complicated rebasing is necessary, maintainers can
    
     - Clone the upstream systemd/systemd[-stable] repo
     - Checkout the current rev mentioned in src
     - Apply the patches from this folder via `git am 00*.patch`
     - Rebase the repo on top of a new version
     - Export the patch series via `git format-patch $newVersion`
     - Update the patches = [ … ] attribute (if necessary)
    flokli committed Apr 16, 2020
    Copy the full SHA
    ba770e5 View commit details
  2. Copy the full SHA
    22bb3a6 View commit details
  3. systemd: drop 0027-Start-getty-on-lxc.patch

    Since quite some time, systemd starts getty on these consoles
    automatically.
    flokli committed Apr 16, 2020
    Copy the full SHA
    1ad4acc View commit details
  4. systemd: drop 001{4,5}-{catalog,hwdb}-don-t-update-on-install.patch

    These patches removed logic in the meson install phase invoking
    `journalctl --update-catalog` and `systemd-hwdb update`, which would
    mutate the running system, and obviously fails in the sandbox.
    
    Upstream also knows this is a bad thing if you're not on the machine you
    want to deploy to, so there's logic in there to not execute it when
    DESTDIR isn't empty. In our case, it is - as we set --prefix instead for
    other reasons, but by just setting DESTIDIR to "/", we can still trigger
    these things to be skipped.
    
    The patches removed some context from
    0018-Install-default-configuration-into-out-share-factory.patch, which
    we need to introduce there to make that patch still apply.
    flokli committed Apr 16, 2020
    Copy the full SHA
    a16ebf8 View commit details
  5. systemd: drop 0017-Fix-mount-option-x-initrd.mount-handling-35268-16.…

    …patch
    
    This was simply undoing a hunk from
    0008-Don-t-try-to-unmount-nix-or-nix-store.patch, so drop that one from
    there and omit
    0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch entirely.
    flokli committed Apr 16, 2020
    Copy the full SHA
    4f346cd View commit details
  6. Copy the full SHA
    a6710ad View commit details
  7. systemd: update paths kmod-static-nodes.service

    The previous patch just removed a `ConditionFileNotEmpty=…` line from
    `kmod-static-nodes.service` referring to a location not existing on
    NixOS. We know better, and can actually replace this Condition to point
    to `run/booted-system/kernel-modules/lib/modules/%v/`, instead of just
    patching it out.
    flokli committed Apr 16, 2020
    Copy the full SHA
    b4cbcba View commit details
  8. systemd: 243.7 -> 244.3

    This required some changes in how we treat DEFAULT_PATH_NORMAL.
    flokli committed Apr 16, 2020
    Copy the full SHA
    9de0ac3 View commit details
  9. systemd: 244.3 -> 245

    flokli committed Apr 16, 2020
    Copy the full SHA
    d2871a7 View commit details
  10. systemd: 245 -> 245.3

    flokli committed Apr 16, 2020
    Copy the full SHA
    b0b7f67 View commit details
  11. systemd: remove myself as maintainer

    Mic92 authored and flokli committed Apr 16, 2020
    Copy the full SHA
    c18ceab View commit details
  12. systemd: explicitly disable homed for now

    We don't currently have tests to ensure it works and keeps working.
    
    So instead of having it accidentially working, and possibly breaking it
    in the future, disable it for now.
    flokli committed Apr 16, 2020
    Copy the full SHA
    ce7c123 View commit details
  13. systemd: explicitly disable portabled for now

    This hasn't worked with 243, let's disable it for now, until we have
    tests and can ensure it works and keeps working.
    flokli committed Apr 16, 2020
    Copy the full SHA
    b3f1410 View commit details

Commits on Apr 19, 2020

  1. Merge pull request #85334 from flokli/systemd-mainline2

    systemd: 243.7 -> 245
    Ma27 authored Apr 19, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    19de59a View commit details
Showing with 1,155 additions and 6 deletions.
  1. +32 −0 pkgs/os-specific/linux/systemd/0001-Start-device-units-for-uninitialised-encrypted-devic.patch
  2. +42 −0 pkgs/os-specific/linux/systemd/0003-Don-t-try-to-unmount-nix-or-nix-store.patch
  3. +34 −0 pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
  4. +25 −0 pkgs/os-specific/linux/systemd/0006-Look-for-fsck-in-the-right-place.patch
  5. +107 −0 pkgs/os-specific/linux/systemd/0007-Add-some-NixOS-specific-unit-directories.patch
  6. +31 −0 pkgs/os-specific/linux/systemd/0009-Get-rid-of-a-useless-message-in-user-sessions.patch
  7. +118 −0 pkgs/os-specific/linux/systemd/0010-hostnamed-localed-timedated-disable-methods-that-cha.patch
  8. +32 −0 pkgs/os-specific/linux/systemd/0011-Fix-hwdb-paths.patch
  9. +132 −0 pkgs/os-specific/linux/systemd/0012-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch
  10. +27 −0 pkgs/os-specific/linux/systemd/0013-localectl-use-etc-X11-xkb-for-list-x11.patch
  11. +26 −0 pkgs/os-specific/linux/systemd/0016-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch
  12. +317 −0 pkgs/os-specific/linux/systemd/0018-Install-default-configuration-into-out-share-factory.patch
  13. +42 −0 pkgs/os-specific/linux/systemd/0019-inherit-systemd-environment-when-calling-generators.patch
  14. +38 −0 pkgs/os-specific/linux/systemd/0021-add-rootprefix-to-lookup-dir-paths.patch
  15. +27 −0 pkgs/os-specific/linux/systemd/0022-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch
  16. +26 −0 pkgs/os-specific/linux/systemd/0023-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch
  17. +27 −0 pkgs/os-specific/linux/systemd/0024-kmod-static-nodes.service-Update-ConditionFileNotEmpty.patch
  18. +33 −0 pkgs/os-specific/linux/systemd/0025-path-util.h-add-placeholder-for-DEFAULT_PATH_NORMAL.patch
  19. +39 −6 pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From a6c9317a905ef478b8e0d3dad263990feb5d11cb Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Tue, 8 Jan 2013 15:46:30 +0100
Subject: [PATCH 01/27] 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
makes more sense to me: the device is ready; it's the filesystem
that's not, but taking care of that is the responsibility of the mount
unit. (However, this ignores the fsck unit, so it's not perfect...)
---
rules.d/99-systemd.rules.in | 4 ----
1 file changed, 4 deletions(-)

diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
index c34b606216..3ab8c1c3fe 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -17,10 +17,6 @@ SUBSYSTEM=="ubi", TAG+="systemd"
SUBSYSTEM=="block", TAG+="systemd"
SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"

-# Ignore encrypted devices with no identified superblock on it, since
-# we are probably still calling mke2fs or mkswap on it.
-SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
-
# add symlink to GPT root disk
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root"
SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks"
--
2.24.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From fd9c882581877eef8ba1b34a9502a1ff546b3833 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 12 Apr 2013 13:16:57 +0200
Subject: [PATCH 03/27] Don't try to unmount /nix or /nix/store

They'll still be remounted read-only.

https://github.com/NixOS/nixos/issues/126
---
src/core/mount.c | 4 +++-
src/shutdown/umount.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/mount.c b/src/core/mount.c
index a0dfa6a1a7..4ca6adcdc6 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -414,6 +414,8 @@ static bool mount_is_extrinsic(Mount *m) {

if (PATH_IN_SET(m->where, /* Don't bother with the OS data itself */
"/", /* (strictly speaking redundant: should already be covered by the perpetual flag check above) */
+ "/nix",
+ "/nix/store",
"/usr",
"/etc"))
return true;
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 2d07d3d6c1..8b112f464e 100644
--- a/src/shutdown/umount.c
+++ b/src/shutdown/umount.c
@@ -373,6 +373,8 @@ static int delete_dm(dev_t devnum) {

static bool nonunmountable_path(const char *path) {
return path_equal(path, "/")
+ || path_equal(path, "/nix")
+ || path_equal(path, "/nix/store")
#if ! HAVE_SPLIT_USR
|| path_equal(path, "/usr")
#endif
--
2.25.1

34 changes: 34 additions & 0 deletions pkgs/os-specific/linux/systemd/0004-Fix-NixOS-containers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 58c4a7b4e9d9c34b92deded6aea814738821059d Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Wed, 16 Apr 2014 10:59:28 +0200
Subject: [PATCH 04/27] Fix NixOS containers

In NixOS containers, the init script is bind-mounted into the
container, so checking early whether it exists will fail.
---
src/nspawn/nspawn.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 5d9290b1cf..26615901c3 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -4924,6 +4924,7 @@ static int run(int argc, char *argv[]) {
goto finish;
}
} else {
+#if 0
const char *p, *q;

if (arg_pivot_root_new)
@@ -4938,6 +4939,7 @@ static int run(int argc, char *argv[]) {
r = -EINVAL;
goto finish;
}
+#endif
}

} else {
--
2.24.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From c841ffab8fb6174b51382b9d4334f78c74018730 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Thu, 1 May 2014 14:10:10 +0200
Subject: [PATCH 06/27] Look for fsck in the right place

---
src/fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 55e6544d31..3626aadda7 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -371,7 +371,7 @@ static int run(int argc, char *argv[]) {
} else
dash_c[0] = 0;

- cmdline[i++] = "/sbin/fsck";
+ cmdline[i++] = "/run/current-system/sw/bin/fsck";
cmdline[i++] = arg_repair;
cmdline[i++] = "-T";

--
2.24.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
From 8c0be07ccbad35d0c1106015057996aa55b9a1f9 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Fri, 19 Dec 2014 14:46:17 +0100
Subject: [PATCH 07/27] Add some NixOS-specific unit directories

Look in /nix/var/nix/profiles/default/lib/systemd for units provided
by packages in the default (system-wide) profile, and in
/etc/systemd-mutable/system for persistent, mutable units (not
recommended).

Also, remove /usr and /lib as these don't exist on NixOS.
---
src/core/systemd.pc.in | 4 ++--
src/shared/path-lookup.c | 18 +++++-------------
2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in
index 5d1ddd7620..21b977d6fc 100644
--- a/src/core/systemd.pc.in
+++ b/src/core/systemd.pc.in
@@ -17,8 +17,8 @@ systemduserunitdir=${prefix}/lib/systemd/user
systemduserpresetdir=${prefix}/lib/systemd/user-preset
systemdsystemconfdir=${sysconfdir}/systemd/system
systemduserconfdir=${sysconfdir}/systemd/user
-systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:${systemdsystemunitdir}:/usr/lib/systemd/system:/lib/systemd/system
-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
+systemdsystemunitpath=${systemdsystemconfdir}:/etc/systemd/system:/etc/systemd-mutable/system:/nix/var/nix/profiles/default/lib/systemd/user:/run/systemd/system:${systemdsystemunitdir}
+systemduserunitpath=${systemduserconfdir}:/etc/systemd/user:/etc/systemd-mutable/user:/nix/var/nix/profiles/default/lib/systemd/system:/run/systemd/user:${systemduserunitdir}
systemdsystemgeneratordir=${rootprefix}/lib/systemd/system-generators
systemdusergeneratordir=${prefix}/lib/systemd/user-generators
systemdsleepdir=${rootprefix}/lib/systemd/system-sleep
diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c
index 6bf0ff0316..2b6324ad8c 100644
--- a/src/shared/path-lookup.c
+++ b/src/shared/path-lookup.c
@@ -99,17 +99,14 @@ int xdg_user_data_dir(char **ret, const char *suffix) {
}

static const char* const user_data_unit_paths[] = {
- "/usr/local/lib/systemd/user",
- "/usr/local/share/systemd/user",
USER_DATA_UNIT_PATH,
- "/usr/lib/systemd/user",
- "/usr/share/systemd/user",
NULL
};

static const char* const user_config_unit_paths[] = {
USER_CONFIG_UNIT_PATH,
"/etc/systemd/user",
+ "/etc/systemd-mutable/user",
NULL
};

@@ -604,15 +601,14 @@ int lookup_paths_init(
persistent_config,
SYSTEM_CONFIG_UNIT_PATH,
"/etc/systemd/system",
+ "/etc/systemd-mutable/system",
+ "/nix/var/nix/profiles/default/lib/systemd/system",
STRV_IFNOTNULL(persistent_attached),
runtime_config,
"/run/systemd/system",
STRV_IFNOTNULL(runtime_attached),
STRV_IFNOTNULL(generator),
- "/usr/local/lib/systemd/system",
SYSTEM_DATA_UNIT_PATH,
- "/usr/lib/systemd/system",
- STRV_IFNOTNULL(flags & LOOKUP_PATHS_SPLIT_USR ? "/lib/systemd/system" : NULL),
STRV_IFNOTNULL(generator_late));
break;

@@ -628,14 +624,12 @@ int lookup_paths_init(
persistent_config,
USER_CONFIG_UNIT_PATH,
"/etc/systemd/user",
+ "/etc/systemd-mutable/user",
+ "/nix/var/nix/profiles/default/lib/systemd/user",
runtime_config,
"/run/systemd/user",
STRV_IFNOTNULL(generator),
- "/usr/local/share/systemd/user",
- "/usr/share/systemd/user",
- "/usr/local/lib/systemd/user",
USER_DATA_UNIT_PATH,
- "/usr/lib/systemd/user",
STRV_IFNOTNULL(generator_late));
break;

@@ -824,14 +818,12 @@ char **generator_binary_paths(UnitFileScope scope) {
case UNIT_FILE_SYSTEM:
return strv_new("/run/systemd/system-generators",
"/etc/systemd/system-generators",
- "/usr/local/lib/systemd/system-generators",
SYSTEM_GENERATOR_PATH);

case UNIT_FILE_GLOBAL:
case UNIT_FILE_USER:
return strv_new("/run/systemd/user-generators",
"/etc/systemd/user-generators",
- "/usr/local/lib/systemd/user-generators",
USER_GENERATOR_PATH);

default:
--
2.24.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 99c86daa5244d45a19f75f6ce92bd4255edef420 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
Date: Mon, 11 May 2015 15:39:38 +0200
Subject: [PATCH 09/27] Get rid of a useless message in user sessions

Namely lots of variants of

Unit nix-var-nix-db.mount is bound to inactive unit dev-disk-by\x2dlabel-nixos.device. Stopping, too.

in containers.
---
src/core/unit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/unit.c b/src/core/unit.c
index a1dc76aa6a..07670af8e2 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2045,7 +2045,8 @@ static void unit_check_binds_to(Unit *u) {
}

assert(other);
- log_unit_info(u, "Unit is bound to inactive unit %s. Stopping, too.", other->id);
+ if (u->type != UNIT_MOUNT || detect_container() <= 0)
+ log_unit_info(u, "Unit is bound to inactive unit %s. Stopping, too.", other->id);

/* A unit we need to run is gone. Sniff. Let's stop this. */
r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, NULL, &error, NULL);
--
2.24.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
From cec1430f72edfedb951fe34e87765ef422ea9843 Mon Sep 17 00:00:00 2001
From: Gabriel Ebner <gebner@gebner.org>
Date: Sun, 6 Dec 2015 14:26:36 +0100
Subject: [PATCH 10/27] hostnamed, localed, timedated: disable methods that
change system settings.

---
src/hostname/hostnamed.c | 9 +++++++++
src/locale/localed.c | 9 +++++++++
src/timedate/timedated.c | 10 ++++++++++
3 files changed, 28 insertions(+)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 9e4f4fb59e..141b8acc08 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -423,6 +423,9 @@ static int method_set_hostname(sd_bus_message *m, void *userdata, sd_bus_error *
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
if (isempty(name))
name = c->data[PROP_STATIC_HOSTNAME];

@@ -479,6 +482,9 @@ static int method_set_static_hostname(sd_bus_message *m, void *userdata, sd_bus_
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
name = empty_to_null(name);

if (streq_ptr(name, c->data[PROP_STATIC_HOSTNAME]))
@@ -536,6 +542,9 @@ static int set_machine_info(Context *c, sd_bus_message *m, int prop, sd_bus_mess
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
name = empty_to_null(name);

if (streq_ptr(name, c->data[prop]))
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 8d0eec96a5..0b1c1d664e 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -276,6 +276,9 @@ static int method_set_locale(sd_bus_message *m, void *userdata, sd_bus_error *er
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
/* If single locale without variable name is provided, then we assume it is LANG=. */
if (strv_length(l) == 1 && !strchr(*l, '=')) {
if (!locale_is_valid(*l))
@@ -411,6 +414,9 @@ static int method_set_vc_keyboard(sd_bus_message *m, void *userdata, sd_bus_erro
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
keymap = empty_to_null(keymap);
keymap_toggle = empty_to_null(keymap_toggle);

@@ -587,6 +593,9 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
layout = empty_to_null(layout);
model = empty_to_null(model);
variant = empty_to_null(variant);
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 6c94b23de4..fa20d22cde 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -653,6 +653,10 @@ static int method_set_timezone(sd_bus_message *m, void *userdata, sd_bus_error *
if (r < 0)
return r;

+ if (getenv("NIXOS_STATIC_TIMEZONE"))
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing timezone via systemd is not supported when it is set in NixOS configuration.");
+
if (!timezone_is_valid(z, LOG_DEBUG))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid or not installed time zone '%s'", z);

@@ -732,6 +736,9 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
if (lrtc == c->local_rtc)
return sd_bus_reply_method_return(m, NULL);

@@ -924,6 +931,9 @@ static int method_set_ntp(sd_bus_message *m, void *userdata, sd_bus_error *error
if (r < 0)
return r;

+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED,
+ "Changing system settings via systemd is not supported on NixOS.");
+
r = context_update_ntp_status(c, bus, m);
if (r < 0)
return r;
--
2.24.1

Loading