Deployment and lifecycle management for Nix
0
fork

Configure Feed

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

add devshell darwin support, info for tree

+40 -21
+11 -3
cli/src/main.rs
··· 72 72 subcommand_help_heading = "Tree commands" 73 73 )] 74 74 enum TreeCommands { 75 + Info {}, 76 + 75 77 Reboot { 76 78 #[arg(long, short, default_value_t = false)] 77 79 yes: bool, ··· 164 166 let tree = Tree::new(&config).await?; 165 167 let seed = &tree.seed; 166 168 167 - dbg!(&tree); 168 - 169 169 match &cli.action { 170 170 Actions::Seed { action } => match action { 171 171 SeedCommands::Activate { mode, .. } => { ··· 179 179 }, 180 180 181 181 Actions::Tree { action } => match action { 182 + TreeCommands::Info {} => tree.info(), 183 + 184 + TreeCommands::Reboot { yes } => { 185 + tree.info(); 186 + tree.reboot(yes.clone()) 187 + } 188 + 182 189 TreeCommands::Upgrade { mode, reboot, yes } => { 190 + tree.info(); 191 + 183 192 let mode = mode.clone().or(config.mode); 184 193 seed.realize() 185 194 .expect("failed to realize") ··· 198 207 tree.reboot(confirm); 199 208 } 200 209 } 201 - TreeCommands::Reboot { yes } => tree.reboot(yes.clone()), 202 210 }, 203 211 } 204 212
+5
cli/src/sower.rs
··· 152 152 }) 153 153 } 154 154 155 + pub fn info(&self) -> () { 156 + dbg!(self); 157 + () 158 + } 159 + 155 160 pub fn reboot(&self, confirm: bool) { 156 161 if self.seed_type != SeedType::Nixos { 157 162 println!("Non-NixOS Trees aren't rebootable");
+24 -18
flake.nix
··· 51 51 in 52 52 { 53 53 devShells.default = pkgs.mkShell { 54 - packages = [ 55 - elixir 56 - beamPackages.elixir-ls 57 - next-ls 54 + packages = 55 + [ 56 + elixir 57 + beamPackages.elixir-ls 58 + next-ls 58 59 59 - inputs'.attic.packages.attic 60 - self'.packages.seed-ci 60 + inputs'.attic.packages.attic 61 + self'.packages.seed-ci 61 62 62 - pkgs.docker 63 - pkgs.just 64 - pkgs.mix2nix 65 - pkgs.nvfetcher 66 - pkgs.process-compose 67 - pkgs.sqlite 63 + pkgs.docker 64 + pkgs.just 65 + pkgs.mix2nix 66 + pkgs.nvfetcher 67 + pkgs.process-compose 68 + pkgs.sqlite 68 69 69 - pkgs.cargo 70 - pkgs.rustc 71 - pkgs.clippy 72 - pkgs.rust-analyzer 73 - pkgs.rustfmt 74 - ] ++ (lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools ]); 70 + pkgs.cargo 71 + pkgs.rustc 72 + pkgs.clippy 73 + pkgs.rust-analyzer 74 + pkgs.rustfmt 75 + ] 76 + ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.inotify-tools ] 77 + ++ lib.optionals pkgs.stdenv.isDarwin [ 78 + pkgs.libiconv 79 + pkgs.darwin.apple_sdk.frameworks.SystemConfiguration 80 + ]; 75 81 76 82 nativeBuildInputs = [ 77 83 pkgs.fmt