nix: Merge host modules

This commit is contained in:
Donovan Glover 2023-06-05 12:34:23 -04:00
parent 757902868f
commit 5fb6b65d24
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 62 additions and 65 deletions

View File

@ -47,6 +47,7 @@
slade
typespeed
osu-lazer-bin
mullvad-vpn
# dev
marksman
@ -165,4 +166,65 @@
# dev
programs.npm.enable = true;
# networking
networking = {
hostName = "nixos";
networkmanager = {
enable = true;
dns = "none";
wifi.macAddress = "random";
ethernet.macAddress = "random";
};
useHostResolvConf = true;
};
services.resolved.llmnr = "false";
systemd.services.NetworkManager-wait-online.enable = false;
# virtualization
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 4;
restrictNetwork = true;
};
virtualisation.qemu.options =
[ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" ];
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
};
};
# mullvad-vpn
services.mullvad-vpn = {
enable = true;
enableExcludeWrapper = false;
};
networking.firewall.allowedTCPPorts = [ 11918 ];
networking = {
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wg-mullvad";
forwardPorts = [
{
destination = "192.168.100.11:80";
sourcePort = 11918;
}
];
};
networkmanager = {
unmanaged = [ "interface-name:ve-*" ];
};
};
}

View File

@ -1,31 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.mullvad-vpn ];
services.mullvad-vpn = {
enable = true;
enableExcludeWrapper = false;
};
networking.firewall.allowedTCPPorts = [ 11918 ];
networking = {
nat = {
enable = true;
internalInterfaces = [ "ve-+" ];
externalInterface = "wg-mullvad";
forwardPorts = [
{
destination = "192.168.100.11:80";
sourcePort = 11918;
}
];
};
networkmanager = {
unmanaged = [ "interface-name:ve-*" ];
};
};
}

View File

@ -1,18 +0,0 @@
{
networking = {
hostName = "nixos";
networkmanager = {
enable = true;
dns = "none";
wifi.macAddress = "random";
ethernet.macAddress = "random";
};
useHostResolvConf = true;
};
services.resolved.llmnr = "false";
systemd.services.NetworkManager-wait-online.enable = false;
}

View File

@ -1,16 +0,0 @@
{
virtualisation.vmVariant = {
virtualisation = {
memorySize = 8192;
cores = 4;
restrictNetwork = true;
};
virtualisation.qemu.options =
[ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" ];
environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
};
};
}