diff --git a/flake.nix b/flake.nix index 35eb80c..429ff87 100644 --- a/flake.nix +++ b/flake.nix @@ -140,6 +140,7 @@ # ./modules/patagia-agent.nix ./modules/partitions.nix ./modules/system_overrides.nix + ./modules/sysext.nix ./modules/sysupdate.nix ./modules/utils.nix ]; diff --git a/modules/patagia-agent.nix b/modules/patagia-agent.nix index 81b328c..17d7a62 100644 --- a/modules/patagia-agent.nix +++ b/modules/patagia-agent.nix @@ -6,11 +6,6 @@ { - system.activationScripts.patagia-agent = '' - mkdir -p /var/lib/extensions - mkdir -p /etc/systemd/extensions - ''; - environment.etc."sysupdate.patagia-agent.d".source = let format = pkgs.formats.ini { listToValue = toString; }; diff --git a/modules/sysext.nix b/modules/sysext.nix new file mode 100644 index 0000000..ce0e181 --- /dev/null +++ b/modules/sysext.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +{ + 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" ]; + }; +} diff --git a/modules/sysupdate.nix b/modules/sysupdate.nix index 75a0a74..8d05b14 100644 --- a/modules/sysupdate.nix +++ b/modules/sysupdate.nix @@ -27,12 +27,6 @@ in { environment.etc."systemd/import-pubring.gpg".source = "${gpgKeyring}/import-pubring.gpg"; - systemd.additionalUpstreamSystemUnits = [ - "systemd-sysext.service" - ]; - - systemd.services."systemd-sysext.service".enable = true; - systemd.sysupdate = { enable = true;