added vm package.
This commit is contained in:
		
							parent
							
								
									7d1ae316bb
								
							
						
					
					
						commit
						fada583de6
					
				
					 4 changed files with 69 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -71,7 +71,7 @@
 | 
			
		|||
          RPROMPT=""
 | 
			
		||||
 | 
			
		||||
          #on the top line, show a whole bunch of info. botton line should be as minimal as possilbe (just a single char to  input next to...)
 | 
			
		||||
          PROMPT=$'%F{cyan}[%n@%m]%f%F{red}├────┤%f$${vcs_info_msg_0_} %F{white}[%D %T]%f\n»'
 | 
			
		||||
          PROMPT=$'%F{cyan}[%n@%m]%f%F{red}├────┤%f$vcs_info_msg_0_ %F{white}[%D %T]%f\n»'
 | 
			
		||||
        '')
 | 
			
		||||
      ];
 | 
			
		||||
      autocd = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -108,7 +108,10 @@
 | 
			
		|||
      "gabe@gv-ubuntu" = import ./hosts/home-workstation.nix {inherit inputs outputs configLib;};
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    packages.x86_64-linux.proxmox = import ./packages/proxmox.nix {inherit inputs outputs configLib;};
 | 
			
		||||
    packages.x86_64-linux = {
 | 
			
		||||
      proxmox = import ./packages/proxmox.nix {inherit inputs outputs configLib;};
 | 
			
		||||
      vm = import ./packages/vm.nix {inherit inputs outputs configLib;};
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    templates = import ./templates {inherit inputs outputs;};
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,6 +23,7 @@ inputs.nixos-generators.nixosGenerate {
 | 
			
		|||
      proxmoxLXC.manageHostName = false;
 | 
			
		||||
      host.user = "gabe";
 | 
			
		||||
 | 
			
		||||
      users.users.root.password="nixos";
 | 
			
		||||
      programs.zsh.enable = true;
 | 
			
		||||
      environment.shells = with pkgs; [zsh];
 | 
			
		||||
      users.users.${config.host.user} = {
 | 
			
		||||
| 
						 | 
				
			
			@ -30,6 +31,7 @@ inputs.nixos-generators.nixosGenerate {
 | 
			
		|||
        description = "Gabe Venberg";
 | 
			
		||||
        shell = pkgs.zsh;
 | 
			
		||||
        extraGroups = ["wheel"];
 | 
			
		||||
        password="nixos";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      home-manager.users.${config.host.user} = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										62
									
								
								packages/vm.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								packages/vm.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,62 @@
 | 
			
		|||
{
 | 
			
		||||
  inputs,
 | 
			
		||||
  outputs,
 | 
			
		||||
  configLib,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
inputs.nixos-generators.nixosGenerate {
 | 
			
		||||
  system = "x86_64-linux";
 | 
			
		||||
  specialArgs = {inherit inputs outputs configLib;};
 | 
			
		||||
  format = "qcow";
 | 
			
		||||
  modules = [
 | 
			
		||||
    inputs.home-manager.nixosModules.home-manager
 | 
			
		||||
    ../configs/nixos/sshd.nix
 | 
			
		||||
    ../configs/nixos/common.nix
 | 
			
		||||
    ../roles/nixos/vm.nix
 | 
			
		||||
    ({
 | 
			
		||||
      config,
 | 
			
		||||
      pkgs,
 | 
			
		||||
      configLib,
 | 
			
		||||
      modulesPath,
 | 
			
		||||
      ...
 | 
			
		||||
    }: {
 | 
			
		||||
      imports = [(modulesPath + "/profiles/qemu-guest.nix")];
 | 
			
		||||
      host.user = "gabe";
 | 
			
		||||
 | 
			
		||||
      users.users.root.password="nixos";
 | 
			
		||||
      programs.zsh.enable = true;
 | 
			
		||||
      environment.shells = with pkgs; [zsh];
 | 
			
		||||
      users.users.${config.host.user} = {
 | 
			
		||||
        isNormalUser = true;
 | 
			
		||||
        description = "Gabe Venberg";
 | 
			
		||||
        shell = pkgs.zsh;
 | 
			
		||||
        extraGroups = ["wheel"];
 | 
			
		||||
        password="nixos";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      home-manager.users.${config.host.user} = {
 | 
			
		||||
        inputs,
 | 
			
		||||
        osConfig,
 | 
			
		||||
        ...
 | 
			
		||||
      }: {
 | 
			
		||||
        host = osConfig.host;
 | 
			
		||||
        user = {
 | 
			
		||||
          git = {
 | 
			
		||||
            profile = {
 | 
			
		||||
              name = "Gabe Venberg";
 | 
			
		||||
              email = "gabevenberg@gmail.com";
 | 
			
		||||
            };
 | 
			
		||||
            workProfile.enable = false;
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
        imports = [
 | 
			
		||||
          ../roles/home-manager/minimal-terminal.nix
 | 
			
		||||
          ../configs/home-manager/common.nix
 | 
			
		||||
          inputs.nixvim.homeManagerModules.nixvim
 | 
			
		||||
        ];
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      system.stateVersion = "24.05";
 | 
			
		||||
    })
 | 
			
		||||
  ];
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue