added vm package.

This commit is contained in:
Gabe Venberg 2024-06-05 12:28:10 -05:00
parent 7d1ae316bb
commit fada583de6
4 changed files with 69 additions and 2 deletions

View file

@ -71,7 +71,7 @@
RPROMPT="" 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...) #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; autocd = true;

View file

@ -108,7 +108,10 @@
"gabe@gv-ubuntu" = import ./hosts/home-workstation.nix {inherit inputs outputs configLib;}; "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;}; templates = import ./templates {inherit inputs outputs;};
}; };

View file

@ -23,6 +23,7 @@ inputs.nixos-generators.nixosGenerate {
proxmoxLXC.manageHostName = false; proxmoxLXC.manageHostName = false;
host.user = "gabe"; host.user = "gabe";
users.users.root.password="nixos";
programs.zsh.enable = true; programs.zsh.enable = true;
environment.shells = with pkgs; [zsh]; environment.shells = with pkgs; [zsh];
users.users.${config.host.user} = { users.users.${config.host.user} = {
@ -30,6 +31,7 @@ inputs.nixos-generators.nixosGenerate {
description = "Gabe Venberg"; description = "Gabe Venberg";
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = ["wheel"]; extraGroups = ["wheel"];
password="nixos";
}; };
home-manager.users.${config.host.user} = { home-manager.users.${config.host.user} = {

62
packages/vm.nix Normal file
View 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";
})
];
}