diff options
author | Ben Sima <ben@bsima.me> | 2020-04-15 09:54:10 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-04-15 10:06:56 -0700 |
commit | f4b8c0df041b063c0b47d2ec6c818a9c202fd833 (patch) | |
tree | 01ad246a83fda29c079847b3397ca6509a7f6106 /Hero/Prod.nix | |
parent | 6ed475ca94209ce92e75f48764cb9d361029ea26 (diff) |
Re-namespacing
Moving away from the DNS-driven namespacing toward more condensed names,
mostly because I don't like typing so much.
Diffstat (limited to 'Hero/Prod.nix')
-rw-r--r-- | Hero/Prod.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Hero/Prod.nix b/Hero/Prod.nix new file mode 100644 index 0000000..10650ee --- /dev/null +++ b/Hero/Prod.nix @@ -0,0 +1,43 @@ +{ config, pkgs, lib, ... }: +{ + imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ]; + boot.loader.grub.device = "/dev/vda"; + fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; }; + + services.herocomics = { + enable = true; + port = 3000; + server = pkgs.herocomics-server; + client = pkgs.herocomics-client; + }; + + networking = { + firewall.allowedTCPPorts = [ 22 80 443 ]; + nameservers = [ + "67.207.67.2" + "67.207.67.3" + ]; + defaultGateway = "138.68.40.1"; + defaultGateway6 = ""; + dhcpcd.enable = false; + usePredictableInterfaceNames = lib.mkForce true; + interfaces = { + eth0 = { + ipv4.addresses = [ + { address="138.68.40.97"; prefixLength=21; } + { address="10.46.0.5"; prefixLength=16; } + ]; + ipv6.addresses = [ + { address="fe80::b063:c4ff:fee5:d636"; prefixLength=64; } + ]; + ipv4.routes = [ { address = "138.68.40.1"; prefixLength = 32; } ]; + ipv6.routes = [ { address = ""; prefixLength = 32; } ]; + }; + + }; + }; + services.udev.extraRules = '' + ATTR{address}=="b2:63:c4:e5:d6:36", NAME="eth0" + + ''; +} |