-
-
Save disassembler/97d26d5f2ce45bc88b2c861ca759b649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { secrets }: | |
| { config, pkgs, ... }: | |
| let | |
| externalInterface = "enp1s0"; | |
| internalInterfaces = [ | |
| "br0" | |
| "enp3s0.3" | |
| "enp3s0.9" | |
| "enp3s0.12" | |
| "enp3s0.40" | |
| ]; | |
| in { | |
| imports = | |
| [ | |
| ./hardware.nix | |
| ]; | |
| # Use the GRUB 2 boot loader. | |
| boot.loader.grub.enable = true; | |
| boot.loader.grub.version = 2; | |
| boot.loader.grub.device = "/dev/sda"; | |
| boot.kernelParams = [ "console=ttyS0,115200n8" ]; | |
| boot.kernel.sysctl = { | |
| "net.ipv6.conf.all.forwarding" = true; | |
| }; | |
| networking = { | |
| hostName = "portal"; | |
| hostId = "fa4b7394"; | |
| vlans = { | |
| lan_port = { | |
| interface = "enp3s0"; | |
| id = 33; | |
| }; | |
| voip = { | |
| interface = "enp3s0"; | |
| id = 40; | |
| }; | |
| }; | |
| bridges = { | |
| br0.interfaces = [ "lan_port" "enp2s0" ]; | |
| }; | |
| interfaces = { | |
| ${externalInterface} = { | |
| useDHCP = true; | |
| }; | |
| br0 = { | |
| ipAddress = "10.40.33.1"; | |
| prefixLength = 24; | |
| }; | |
| voip = { | |
| ipAddress = "10.40.40.1"; | |
| prefixLength = 24; | |
| }; | |
| }; | |
| nat = { | |
| enable = true; | |
| externalInterface = "${externalInterface}"; | |
| internalIPs = [ "10.40.33.0/24" "10.40.40.0/24" ]; | |
| internalInterfaces = [ "voip" "br0" ]; | |
| }; | |
| firewall = { | |
| enable = true; | |
| allowPing = true; | |
| allowedTCPPorts = [ 53 5353 ]; | |
| allowedUDPPorts = [ 5353 53 67 ]; | |
| }; | |
| }; | |
| i18n = { | |
| consoleFont = "Lat2-Terminus16"; | |
| consoleKeyMap = "us"; | |
| defaultLocale = "en_US.UTF-8"; | |
| }; | |
| time.timeZone = "America/New_York"; | |
| environment.systemPackages = with pkgs; [ | |
| wget | |
| vim | |
| tmux | |
| git | |
| ]; | |
| services.openssh.enable = true; | |
| users.extraUsers.sam = { | |
| isNormalUser = true; | |
| description = "Sam Leathers"; | |
| uid = 1000; | |
| extraGroups = [ "wheel" ]; | |
| openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5PPVdfBhmWxWYjSosuyjMdIYNjYC/ekz+Whv27wrFNHqxeGgKbXslUTwZX0r+zu/nlJnX9nj3zdVV9LosBB8JF9tfJGui9aBfPuxoIq9SMFSdcpZ8aOh4ZITv7zbsRHMECE8q7D5/a+7UZyTy8pv9g5SuCerHh3m//NIbo08OS9rt8SjqVio+B+rseLF960U3U3wTCtOA+VauTuE4kZfSfmQlEYUjaN3qwp4s5jpO7pgnGxshuqayRyuwJfRa/RYWB5ouSjyxTuo33K42EqT4XFoURkj7evJB5SRR7pm4vJCx4VkclIVmpLIcBiyWje+60zyKhAZEQVqKXedkuQ9748wZl07C6Czs4QiloGAjXv/tRm9YSdoeG5JhskEA8z2SCEQARJGquPH+f5vBltHeVC5K5LW94gSP9bfVBitcCgONVxUguCu0PmJUYKcVVjRi3KtJJzDSTDCjjN3e/mszrZY921yvVEkb7mFATBiHeSdrt55gKcG1vfTToLALIJJFQpGCwAMYUjKEcgq4PZa1UdCY/ynvynLds3mge4Y/X3EnLFsJaepfgNyPnnPg67kEda8uRSDYT8LaoqJpDzc7RQeY4BOfJfAxa8qMDHmp4W+dxHqrMphbH66fwUJAx1MWV8AoPFW0TGrDb3AnHBgoRt/5Fnz2ymy92Wb1KAIt3w== sam@maestro.local" ]; | |
| }; | |
| system.stateVersion = "17.09"; # Did you read the comment? | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment