Implement git clone approach for nixos-rebuild
Replace direct directory access with git clone/pull approach: - Add git configuration options (url, branch, working_dir) to NixOS module - Update SystemConfig and AgentCommand to use git parameters - Implement ensure_git_repository() method for clone/pull operations - Agent clones nixosbox to /var/lib/cm-dashboard/nixos-config - Maintains security while solving permission denied issues The agent now manages its own copy of the configuration without needing access to /home/cm directory.
This commit is contained in:
@@ -106,7 +106,9 @@ pub enum AgentCommand {
|
||||
},
|
||||
/// Rebuild NixOS system
|
||||
SystemRebuild {
|
||||
nixos_path: String, // Path to nixosbox directory
|
||||
git_url: String,
|
||||
git_branch: String,
|
||||
working_dir: String,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user