From 7ac2cd01ae5bf01e12e4517f38a89cb753c6bd6f Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 31 Aug 2023 11:28:44 +0000 Subject: [PATCH] tmpfiles: use only `xdg.configFile` This is a small refactor, and minimises the impact of home-manager#4398. --- modules/misc/tmpfiles.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/modules/misc/tmpfiles.nix b/modules/misc/tmpfiles.nix index c5f4a9756..9fa072b89 100644 --- a/modules/misc/tmpfiles.nix +++ b/modules/misc/tmpfiles.nix @@ -27,8 +27,8 @@ in { platforms.linux) ]; - xdg = { - dataFile."user-tmpfiles.d/home-manager.conf" = { + xdg.configFile = { + "user-tmpfiles.d/home-manager.conf" = { text = '' # This file is created automatically and should not be modified. # Please change the option ‘systemd.user.tmpfiles.rules’ instead. @@ -36,16 +36,14 @@ in { ''; onChange = "${pkgs.systemd}/bin/systemd-tmpfiles --user --create"; }; - configFile = { - "systemd/user/basic.target.wants/systemd-tmpfiles-setup.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; - "systemd/user/systemd-tmpfiles-setup.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; - "systemd/user/timers.target.wants/systemd-tmpfiles-clean.timer".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.timer"; - "systemd/user/systemd-tmpfiles-clean.service".source = - "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.service"; - }; + "systemd/user/basic.target.wants/systemd-tmpfiles-setup.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; + "systemd/user/systemd-tmpfiles-setup.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service"; + "systemd/user/timers.target.wants/systemd-tmpfiles-clean.timer".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.timer"; + "systemd/user/systemd-tmpfiles-clean.service".source = + "${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-clean.service"; }; }; }