From 33f7afd87d1e3643c8b2cb0ee77c2cdd18dd9681 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Fri, 15 Nov 2024 21:09:57 +0100 Subject: [PATCH] feat: Add systemd-sysext --- modules/profiles/server.nix | 1 + modules/profiles/sysext.nix | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 modules/profiles/sysext.nix diff --git a/modules/profiles/server.nix b/modules/profiles/server.nix index 7a828f3..c7890b8 100644 --- a/modules/profiles/server.nix +++ b/modules/profiles/server.nix @@ -7,6 +7,7 @@ imports = [ (modulesPath + "/profiles/minimal.nix") ./network.nix + ./sysext.nix ]; boot.kernel.sysctl = { diff --git a/modules/profiles/sysext.nix b/modules/profiles/sysext.nix new file mode 100644 index 0000000..abd6ffc --- /dev/null +++ b/modules/profiles/sysext.nix @@ -0,0 +1,23 @@ +{ ... }: +{ + system.activationScripts.sysext = '' + mkdir -p /var/lib/confexts + mkdir -p /var/lib/extensions + mkdir -p /etc/systemd/extensions + ''; + + systemd.additionalUpstreamSystemUnits = [ + "systemd-confext.service" + "systemd-sysext.service" + ]; + + systemd.services."systemd-confext" = { + enable = true; + wantedBy = [ "multi-user.target" ]; + }; + + systemd.services."systemd-sysext.service" = { + enable = true; + wantedBy = [ "multi-user.target" ]; + }; +}