justfile defaults to building current machines config.
I think just is still a good fit for this. Much more and a nushell script might be more appropriate.
This commit is contained in:
		
							parent
							
								
									c5ffac15d3
								
							
						
					
					
						commit
						380b92d50b
					
				
					 3 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -77,12 +77,12 @@
 | 
				
			||||||
          nixvim.homeManagerModules.nixvim
 | 
					          nixvim.homeManagerModules.nixvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      "gabe@workstation" = home-manager.lib.homeManagerConfiguration {
 | 
					      "gabe@gv-workstation" = home-manager.lib.homeManagerConfiguration {
 | 
				
			||||||
        pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
 | 
					        pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
 | 
				
			||||||
        extraSpecialArgs = {inherit inputs outputs;};
 | 
					        extraSpecialArgs = {inherit inputs outputs;};
 | 
				
			||||||
        # > Our main home-manager configuration file <
 | 
					        # > Our main home-manager configuration file <
 | 
				
			||||||
        modules = [
 | 
					        modules = [
 | 
				
			||||||
          ./hosts/gabe-workstation.nix
 | 
					          ./hosts/gabe-gv-workstation.nix
 | 
				
			||||||
          nixvim.homeManagerModules.nixvim
 | 
					          nixvim.homeManagerModules.nixvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										8
									
								
								justfile
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								justfile
									
										
									
									
									
								
							| 
						 | 
					@ -1,16 +1,16 @@
 | 
				
			||||||
default:
 | 
					default:
 | 
				
			||||||
    just --list
 | 
					    just --list
 | 
				
			||||||
 | 
					
 | 
				
			||||||
nixos target:
 | 
					nixos target=`hostname`:
 | 
				
			||||||
    sudo nixos-rebuild --flake .#{{target}} switch
 | 
					    sudo nixos-rebuild --flake .#{{target}} switch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
home-manager target:
 | 
					home-manager target=(`whoami`+"@"+`hostname`):
 | 
				
			||||||
    home-manager --flake .#{{target}} switch
 | 
					    home-manager --flake .#{{target}} switch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
check-home-manager target:
 | 
					check-home-manager target=(`whoami`+"@"+`hostname`):
 | 
				
			||||||
    home-manager build --no-out-link --flake .#{{target}}
 | 
					    home-manager build --no-out-link --flake .#{{target}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bootstrap-home-manager target:
 | 
					bootstrap-home-manager target=(`whoami`+"@"+`hostname`):
 | 
				
			||||||
    nix run --extra-experimental-features "nix-command flakes" --no-write-lock-file github:nix-community/home-manager/ -- --extra-experimental-features "nix-command flakes" --flake .#{{target}} switch
 | 
					    nix run --extra-experimental-features "nix-command flakes" --no-write-lock-file github:nix-community/home-manager/ -- --extra-experimental-features "nix-command flakes" --flake .#{{target}} switch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
format:
 | 
					format:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue