Compare commits
No commits in common. "2ecaae07b3b2cd0431cfbefa0df13e3d27a2534f" and "328cc16c7c49b4e7c08a44f30dec2004d3129ffb" have entirely different histories.
2ecaae07b3
...
328cc16c7c
3 changed files with 89 additions and 21 deletions
16
flake.nix
16
flake.nix
|
|
@ -4,8 +4,6 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
||||
|
||||
proxmox-nixos.url = "github:SaumonNet/proxmox-nixos";
|
||||
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -85,20 +83,8 @@
|
|||
./hosts/valefar
|
||||
lix-module.nixosModules.default
|
||||
vscode-server.nixosModules.default
|
||||
microvm.nixosModules.host
|
||||
|
||||
proxmox-nixos.nixosModules.proxmox-ve
|
||||
|
||||
({ pkgs, lib, ... }: {
|
||||
services.proxmox-ve = {
|
||||
enable = true;
|
||||
ipAddress = "10.0.0.30";
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
proxmox-nixos.overlays.x86_64-linux
|
||||
];
|
||||
})
|
||||
|
||||
{ imports = builtins.attrValues nixosModules; }
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,17 +5,21 @@
|
|||
# IMPORTS
|
||||
# =============================================================================
|
||||
imports = [
|
||||
# Host-specific hardware
|
||||
./hardware.nix
|
||||
./secrets.nix
|
||||
../../common/nvidia.nix
|
||||
|
||||
# Common secrets
|
||||
../../host-secrets.nix
|
||||
|
||||
# Common modules shared across hosts
|
||||
../../common/system.nix
|
||||
../../common/users.nix
|
||||
../../common/services.nix
|
||||
../../common/efi.nix
|
||||
|
||||
# Hardware-specific (commented out)
|
||||
../../common/nvidia.nix
|
||||
];
|
||||
|
||||
|
|
@ -55,23 +59,21 @@
|
|||
networking.hostId = "2a07da90";
|
||||
networking.firewall.enable = false;
|
||||
|
||||
services.proxmox-ve.bridges = [ "vmbr0" ];
|
||||
|
||||
systemd.network.networks."10-lan" = {
|
||||
matchConfig.Name = ["enp6s0"];
|
||||
matchConfig.Name = ["enp6s0" "vm-*"];
|
||||
networkConfig = {
|
||||
Bridge = "vmbr0";
|
||||
Bridge = "br0";
|
||||
};
|
||||
};
|
||||
systemd.network.netdevs."br0" = {
|
||||
netdevConfig = {
|
||||
Name = "vmbr0";
|
||||
Name = "br0";
|
||||
Kind = "bridge";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.networks."10-lan-bridge" = {
|
||||
matchConfig.Name = "vmbr0";
|
||||
matchConfig.Name = "br0";
|
||||
networkConfig = {
|
||||
Address = ["10.0.0.30/24" "2601:5c2:8400:26c0::30/64"];
|
||||
Gateway = "10.0.0.1";
|
||||
|
|
|
|||
80
hosts/valefar/gamevm.nix
Executable file
80
hosts/valefar/gamevm.nix
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
{ config, lib, pkgs, modulesPath, microvm, inputs, ... }:
|
||||
|
||||
{
|
||||
# =============================================================================
|
||||
# IMPORTS
|
||||
# =============================================================================
|
||||
imports = [
|
||||
# Common modules shared across hosts
|
||||
../../common/system.nix
|
||||
../../common/users.nix
|
||||
../../common/services.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
networking.hostName = "gameservers";
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableOnBoot = true;
|
||||
};
|
||||
|
||||
systemd.network.networks."20-lan" = {
|
||||
matchConfig.Type = "ether";
|
||||
networkConfig = {
|
||||
Address = [
|
||||
"10.0.0.31/24"
|
||||
"2601:5c2:8400:26c0::31/64"
|
||||
];
|
||||
Gateway = "10.0.0.1";
|
||||
DNS = [
|
||||
"10.0.0.210"
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
];
|
||||
IPv6AcceptRA = true;
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.networks."19-docker" = {
|
||||
matchConfig.Name = "veth*";
|
||||
linkConfig = {
|
||||
Unmanaged = true;
|
||||
};
|
||||
};
|
||||
|
||||
microvm = {
|
||||
interfaces = [
|
||||
{
|
||||
type = "tap";
|
||||
id = "vm-test1";
|
||||
mac = "02:00:00:00:00:01";
|
||||
}
|
||||
];
|
||||
|
||||
shares = [
|
||||
{
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
tag = "ro-store";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
{
|
||||
source = "/etc/ssh";
|
||||
mountPoint = "/etc/ssh";
|
||||
tag = "ssh";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
{
|
||||
source = "/home/regent/gamedata";
|
||||
mountPoint = "/root/gamedata";
|
||||
tag = "gamedata";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
];
|
||||
|
||||
vcpu = 4;
|
||||
mem = 8192;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue