website/content/posts/2023-03-24-managing-mutable-files-in-nixos/assets/patches/0003-fetch-mutable-files-add-initial-systemd-service.patch

31 lines
941 B
Diff

diff --git a/modules/home-manager/fetch-mutable-files.nix b/modules/home-manager/fetch-mutable-files.nix
index aa00cac..3d75414 100644
--- a/modules/home-manager/fetch-mutable-files.nix
+++ b/modules/home-manager/fetch-mutable-files.nix
@@ -63,6 +63,25 @@ in
config = {
systemd.user.services.fetch-mutable-files = {
+ Unit = {
+ Description = "Fetch mutable files from home-manager";
+ After = [ "default.target" "network-online.target" ];
+ Wants = [ "network-online.target" ];
+ };
+
+ Service = {
+ # We'll assume this service will download lots of files. We want the
+ # temporary files to only last along with the service.
+ PrivateUsers = true;
+ PrivateTmp = true;
+
+ Type = "oneshot";
+ RemainAfterExit = true;
+ # TODO: Complete this
+ ExecStart = "";
+ };
+
+ Install.WantedBy = [ "default.target" ];
};
};
}