Make mm hosea again
This commit is contained in:
+5
-166
@@ -6,7 +6,7 @@
|
||||
let
|
||||
wanInterface = "enp2s0";
|
||||
lanInterface = "enp1s0";
|
||||
lanIpAddress = "10.177.1.1";
|
||||
lanIpAddress = "10.42.1.7";
|
||||
in
|
||||
|
||||
{
|
||||
@@ -16,26 +16,13 @@ in
|
||||
];
|
||||
|
||||
|
||||
greg.home = false;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
users.users.gamemaster = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
shell = pkgs.bash;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDH960DgfJIyTKKke7mtQu73Byr8gp/BZSfkpAWAMDB8zBIgggJkbo6/C5jtCb9kXp3ULFi56bQYDHR7WOSTZ07G3nE5iKo++JXgOOGXAQKW4TQ4LP/Q7wJpDktBIlZwVdB46eQBMrML9YtV0l1q8R18y55su2ZB6VUEGUNiyDa4rM7iBNchizOgdYRbTeokvrYfxEZr18AjwNIerS6vRHTTzQsLZx64QxuTc7uM+aPOKAvzcD5mwqj+CzEzHQV7KhcbwN0mQS4QD0QBaIBLuB1ADmividLxOulj4zaVDF06JRIoT/o7l9Kz/CIohsDHMgDIG3upcFcCKLtuOLQd3wx3ZNC8uY+i5OskM8NOepq9St/c6aeMeLNyiUBvJNenbm5+nbqSXCHfOJW+SC4oaYOJZbV/pQgHotmjPQ0+oKCwMNoE0v4lRA0l3quySvIZAQxkLNPIo9bnk5oXnlAGzQaHcyojANnjDtbz19Fk4bRUKts6mL3CArUrHWEmftt1Ls= gamemaster@raspberrypi"
|
||||
];
|
||||
};
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/";
|
||||
|
||||
networking = {
|
||||
hostName = "mm";
|
||||
domain = "mindmazeroom.lan";
|
||||
#nameservers = [ "127.0.0.53" ];
|
||||
hostName = "hosea";
|
||||
interfaces = {
|
||||
"${wanInterface}".useDHCP = true;
|
||||
"${lanInterface}" = {
|
||||
@@ -46,166 +33,18 @@ in
|
||||
}];
|
||||
};
|
||||
};
|
||||
firewall = { # Might not strictly be necessary?
|
||||
allowedTCPPorts = [ 53 80 443 8123 ]; # 8091 8123
|
||||
allowedUDPPorts = [ 53 67 ];
|
||||
};
|
||||
extraHosts = (builtins.concatStringsSep "\n" [
|
||||
"${lanIpAddress} store.mindmazeroom.com"
|
||||
"10.177.1.249 ms.mindmazeroom.com"
|
||||
"10.177.1.248 saloon.mindmazeroom.com"
|
||||
"10.177.1.247 jail.mindmazeroom.com"
|
||||
"10.177.1.246 mspi.mindmazeroom.com"
|
||||
]);
|
||||
};
|
||||
|
||||
# Serves as the router, DHCP, and DNS for the site
|
||||
greg = {
|
||||
router = {
|
||||
enable = true;
|
||||
wan = [ wanInterface "tailscale0" ];
|
||||
lan = [ lanInterface ];
|
||||
};
|
||||
tailscale.enable = true;
|
||||
proxies = {
|
||||
"mm.shire-zebra.ts.net".target = "http://127.0.0.1:8123";
|
||||
"store.mindmazeroom.com".target = "http://127.0.0.1:8123";
|
||||
};
|
||||
home = true;
|
||||
};
|
||||
services = {
|
||||
dnsmasq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
domain = "mindmazeroom.lan";
|
||||
server = [
|
||||
"1.1.1.1"
|
||||
"100.100.100.100"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
};
|
||||
create_ap = {
|
||||
enable = false;
|
||||
settings = {
|
||||
INTERNET_IFACE = "";
|
||||
WIFI_IFACE = "wlan0";
|
||||
SSID = "MM_Test";
|
||||
PASSPHRASE = "MindMaze2023";
|
||||
};
|
||||
};
|
||||
home-assistant = {
|
||||
enable = false;
|
||||
configDir = "/var/lib/hass";
|
||||
package = (pkgs.home-assistant.override {
|
||||
extraComponents = [
|
||||
"accuweather"
|
||||
"calendar"
|
||||
"cast"
|
||||
"lovelace"
|
||||
];
|
||||
}).overrideAttrs (oldAttrs: {
|
||||
doInstallCheck = false;
|
||||
});
|
||||
config = {
|
||||
logger.default = "info";
|
||||
default_config = {};
|
||||
esphome = {}; # Get these things loaded, even if not configured
|
||||
met = {};
|
||||
my = {};
|
||||
tts = [ { platform = "google_translate"; } ];
|
||||
http = {
|
||||
use_x_forwarded_for = true;
|
||||
trusted_proxies = [ "127.0.0.1" "::1" ];
|
||||
server_host = "127.0.0.1";
|
||||
};
|
||||
"automation manual" = [];
|
||||
"automation ui" = "!include automations.yaml";
|
||||
"script manual" = [];
|
||||
"script ui" = "!include scripts.yaml";
|
||||
"scene manual" = [];
|
||||
"scene ui" = "!include scenes.yaml";
|
||||
};
|
||||
};
|
||||
kea.dhcp4 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
interfaces-config = {
|
||||
interfaces = [ lanInterface ];
|
||||
};
|
||||
lease-database = {
|
||||
name = "/var/lib/kea/dhcp4.leases";
|
||||
persist = true;
|
||||
type = "memfile";
|
||||
};
|
||||
renew-timer = 1000;
|
||||
rebind-timer = 2000;
|
||||
valid-lifetime = 4000;
|
||||
option-data = [{
|
||||
name = "domain-name-servers";
|
||||
data = "${lanIpAddress}";
|
||||
} {
|
||||
name = "routers";
|
||||
data = "10.177.1.1";
|
||||
}];
|
||||
subnet4 = [{
|
||||
subnet = "10.177.1.0/24";
|
||||
pools = [{
|
||||
pool = "10.177.1.10-10.177.1.250";
|
||||
}];
|
||||
reservations = [{
|
||||
hw-address = "9c:8e:cd:3f:3f:8c";
|
||||
hostname = "madscientist";
|
||||
ip-address = "10.177.1.249";
|
||||
} {
|
||||
hw-address = "9c:8e:cd:3f:40:a4";
|
||||
hostname = "saloon";
|
||||
ip-address = "10.177.1.248";
|
||||
} {
|
||||
hw-address = "9c:8e:cd:3f:40:d3";
|
||||
hostname = "jail";
|
||||
ip-address = "10.177.1.247";
|
||||
} {
|
||||
hw-address = "dc:a6:32:62:e6:a8";
|
||||
hostname = "madscientistpi";
|
||||
ip-address = "10.177.1.246";
|
||||
}];
|
||||
}];
|
||||
};
|
||||
};
|
||||
minidlna = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
inotify = "yes";
|
||||
media_dir = [
|
||||
"/mm-video"
|
||||
];
|
||||
};
|
||||
};
|
||||
# Configure keymap in X11
|
||||
# Configure keymap
|
||||
xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.greg = {
|
||||
isNormalUser = true;
|
||||
description = "Greg Hellings";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
];
|
||||
system.stateVersion = "22.05";
|
||||
}
|
||||
|
||||
@@ -8,34 +8,33 @@
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d4781ccb-4fe9-4407-9ae2-b8bc6811d7dd";
|
||||
{ device = "/dev/disk/by-uuid/d4ac74f7-62bb-421a-aad8-566277c9d8ba";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/A41B-5963";
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1F51-B638";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/834f6f86-39fe-48f9-af6c-c40c4157be01"; }
|
||||
];
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s20f0u4u4u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user