git.delta.rocks / fleet / refs/commits / 78bc9187eaae

difftreelog

feat non-interactive run0

rwtspuopYaroslav Bolyukin2026-06-15parent: #210037f.patch.diff

7 files changed

modifiedCargo.lockdiffbeforeafterboth
before · Cargo.lock
576 packageslockfile v4
after · Cargo.lock
576 packageslockfile v4
modifiedcmds/fleet/src/cmds/rollback.rsdiffbeforeafterboth
--- a/cmds/fleet/src/cmds/rollback.rs
+++ b/cmds/fleet/src/cmds/rollback.rs
@@ -62,7 +62,6 @@
 			warn!("failed to list generations available locally: {e}");
 		})
 		.unwrap_or_default();
-	dbg!(&stored_locally);
 	stored_locally.retain(|g| !on_machine_store_paths.contains(&g.store_path));
 	for ele in stored_locally.iter_mut() {
 		ele.current = false;
modifiedcrates/fleet-base/src/host.rsdiffbeforeafterboth
--- a/crates/fleet-base/src/host.rs
+++ b/crates/fleet-base/src/host.rs
@@ -250,7 +250,7 @@
 		}
 		let bundle = agent_bundle()?;
 		let conn = if self.local {
-			Remowt::connect_local(&bundle)
+			Remowt::connect_local(&bundle, "remowt-fleet".to_owned())
 				.await
 				.context("starting local remowt agent")?
 		} else {
@@ -259,7 +259,7 @@
 				.get()
 				.cloned()
 				.unwrap_or_else(|| self.name.clone());
-			Remowt::connect(&dest, &bundle)
+			Remowt::connect(&dest, &bundle, "remowt-fleet".to_owned())
 				.await
 				.map_err(|e| anyhow!("remowt error while connecting to {}: {e:#?}", self.name))?
 		};
modifiedcrates/nix-eval/src/drv.rsdiffbeforeafterboth
--- a/crates/nix-eval/src/drv.rs
+++ b/crates/nix-eval/src/drv.rs
@@ -104,6 +104,12 @@
 				.into_iter()
 				.map(|(k, v)| (sd.join(&k), v.outputs))
 				.collect();
+			let input_srcs: Vec<Utf8PathBuf> = parsed
+				.inputs
+				.srcs
+				.into_iter()
+				.map(|k| sd.join(&k))
+				.collect();
 
 			for dep_path in input_drvs.keys() {
 				if visited.insert(dep_path.clone()) {
@@ -122,7 +128,7 @@
 				DrvNode {
 					name: extract_drv_name(&path),
 					input_drvs,
-					input_srcs: parsed.inputs.srcs,
+					input_srcs,
 					outputs,
 				},
 			);
modifiedflake.lockdiffbeforeafterboth
--- a/flake.lock
+++ b/flake.lock
@@ -188,9 +188,9 @@
         ]
       },
       "locked": {
-        "lastModified": 1781471358,
-        "rev": "c69dddc33f8e2081ef685ae20a7278f92cfcd32e",
-        "revCount": 37,
+        "lastModified": 1781491431,
+        "rev": "c8dca760c1f13e8b65677bac7b21abb487d745c0",
+        "revCount": 40,
         "type": "git",
         "url": "file:/home/lach/build/remowt-agents"
       },
modifiedmodules/nixos/module-list.nixdiffbeforeafterboth
--- a/modules/nixos/module-list.nix
+++ b/modules/nixos/module-list.nix
@@ -4,5 +4,6 @@
   ./rollback.nix
   ./nix-sign.nix
   ./online.nix
+  ./polkit.nix
   ./top-level.nix
 ]
addedmodules/nixos/polkit.nixdiffbeforeafterboth
--- /dev/null
+++ b/modules/nixos/polkit.nix
@@ -0,0 +1,15 @@
+{ ... }:
+{
+  users.groups.fleet-pusher = { };
+
+  security.polkit.extraConfig = ''
+    polkit.addRule(function(action, subject) {
+      if (action.id == "org.freedesktop.systemd1.manage-units" && subject.isInGroup("fleet-pusher")) {
+        const unit = action.lookup("unit");
+        if (unit && unit.indexOf("remowt-fleet-") == 0) {
+          return polkit.Result.YES;
+        }
+      }
+    });
+  '';
+}