Add second hypervisor
This commit is contained in:
parent
eab1652615
commit
5496ce5300
4 changed files with 312 additions and 6 deletions
67
flake.nix
67
flake.nix
|
@ -14,25 +14,24 @@
|
|||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, microvm, ... }:
|
||||
let
|
||||
hostName = "nixmox-perseverance";
|
||||
system = "x86_64-linux";
|
||||
username = "tbarnouin";
|
||||
proxy_host = "192.168.1.40";
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
${hostName} = nixpkgs.lib.nixosSystem {
|
||||
nixmox-perseverance = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/${hostName}/configuration.nix
|
||||
./hosts/nixmox-perseverance/configuration.nix
|
||||
{
|
||||
networking.hostName = hostName;
|
||||
networking.hostName = nixmox-perseverance;
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username} = import ./hosts/${hostName}/home.nix;
|
||||
home-manager.users.${username} = import ./hosts/nixmox-perseverance/home.nix;
|
||||
}
|
||||
microvm.nixosModules.host
|
||||
{
|
||||
|
@ -68,7 +67,42 @@
|
|||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit username;
|
||||
inherit hostName;
|
||||
inherit proxy_host;
|
||||
inherit system;
|
||||
};
|
||||
};
|
||||
nixmox-curiosity = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/nixmox-curiosity/configuration.nix
|
||||
{
|
||||
networking.hostName = nixmox-curiosity;
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${username} = import ./hosts/nixmox-curiosity/home.nix;
|
||||
}
|
||||
microvm.nixosModules.host
|
||||
{
|
||||
microvm = {
|
||||
autostart = [
|
||||
"jellyfin"
|
||||
];
|
||||
vms = {
|
||||
jellyfin = {
|
||||
flake = self;
|
||||
updateFlake = "git+file:///etc/nixos";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit username;
|
||||
inherit proxy_host;
|
||||
inherit system;
|
||||
};
|
||||
|
@ -92,6 +126,27 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
jellyfin = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
microvm.nixosModules.microvm
|
||||
"${inputs.self}/systems"
|
||||
"${inputs.self}/services"
|
||||
{
|
||||
services.vm_jellyfin = {
|
||||
enable = true;
|
||||
};
|
||||
services.vm = {
|
||||
enable = true;
|
||||
hostname = "jellyfin";
|
||||
vm_ip = "192.168.1.42";
|
||||
vm_cpu = 4;
|
||||
vm_mem = 8192;
|
||||
macAddr = "02:00:00:00:00:42";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
redis = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue