Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

commit todos ๐Ÿ™

+4 -1
+4 -1
cli/src/sower.rs
··· 28 28 } 29 29 30 30 pub fn activate(&self, mode: Option<ActivationMode>) -> Result<&Self, String> { 31 + // TODO compare new activation to existing profile 31 32 match &self.seed_type { 32 33 SeedType::HomeManager => self.activate_generic(), 33 34 SeedType::NixDarwin => self.activate_generic(), ··· 179 180 } 180 181 181 182 fn reboot_needed() -> std::io::Result<bool> { 183 + // TODO handle missing paths 182 184 let profile_paths = &["initrd", "kernel", "kernel-modules"]; 183 185 let result = profile_paths.iter().any(|&path| { 184 - let current_path = format!("/nix/var/nix/profiles/system/{}", path); 186 + let current_path = format!("/nix/var/nix/profiles/system/{}", path); // fails if 187 + // missing 185 188 let booted_path = format!("/run/booted-system/{}", path); 186 189 let current = fs::read_link(current_path).expect("unstable to read current link"); 187 190 let booted = fs::read_link(booted_path).expect("unable to read booted link");