Commit 11d150b93af1

Vincent Demeester <vincent@sbr.pm>
2017-02-14 14:07:15
Add a nix-channel update timer 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent fe4b557
Changed files (1)
profiles
profiles/desktop.nix
@@ -125,4 +125,23 @@ ${pkgs.pythonPackages.udiskie}/bin/udiskie -a -t -n -F &
 			font-droid
 		];
 	};
+	# Auto refresh nix-channel each day
+	systemd.user.services.channel-update = {
+		description = "Update nix-channel daily";
+		wantedBy = [ "multi-user.target" ];
+		serviceConfig = {
+			Type = "oneshot";
+			ExecStart = "nix-channel --update";
+			Environment = "PATH=/run/current-system/sw/bin";
+		};
+	};
+	systemd.user.timers.channel-update = {
+		description = "Update nix-channel daily";
+		wantedBy = [ "timers.target" ];
+		timerConfig = {
+			OnCalendar = "daily";
+			Persistent = "true";
+		};
+	};
+	systemd.user.timers.channel-update.enable = true;
 }