summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-08 19:15:49 -0800
committerBen Sima <ben@bsima.me>2019-11-08 19:15:49 -0800
commitc41113fdcb92deeb6115c1d70c3bf92a2ea34a29 (patch)
tree05bb18024315a87c054ef4cc78518eca380a23af
parent963a3f5dc7cfc1494cfe38572ab88830b238514b (diff)
add runserval config
-rw-r--r--Com/RunServal/hardware.nix6
-rw-r--r--Com/RunServal/networking.nix31
-rw-r--r--default.nix10
3 files changed, 47 insertions, 0 deletions
diff --git a/Com/RunServal/hardware.nix b/Com/RunServal/hardware.nix
new file mode 100644
index 0000000..8c88cb7
--- /dev/null
+++ b/Com/RunServal/hardware.nix
@@ -0,0 +1,6 @@
+{ ... }:
+{
+ imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ];
+ boot.loader.grub.device = "/dev/vda";
+ fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
+}
diff --git a/Com/RunServal/networking.nix b/Com/RunServal/networking.nix
new file mode 100644
index 0000000..4e0b78e
--- /dev/null
+++ b/Com/RunServal/networking.nix
@@ -0,0 +1,31 @@
+{ lib, ... }: {
+ # This file was populated at runtime with the networking
+ # details gathered from the active system.
+ networking = {
+ nameservers = [
+ "127.0.0.53"
+ ];
+ defaultGateway = "157.245.160.1";
+ defaultGateway6 = "";
+ dhcpcd.enable = false;
+ usePredictableInterfaceNames = lib.mkForce true;
+ interfaces = {
+ eth0 = {
+ ipv4.addresses = [
+ { address="157.245.171.183"; prefixLength=20; }
+ { address="10.46.0.8"; prefixLength=16; }
+ ];
+ ipv6.addresses = [
+ { address="fe80::f811:39ff:feea:ab32"; prefixLength=64; }
+ ];
+ ipv4.routes = [ { address = "157.245.160.1"; prefixLength = 32; } ];
+ ipv6.routes = [ { address = ""; prefixLength = 32; } ];
+ };
+
+ };
+ };
+ services.udev.extraRules = ''
+ ATTR{address}=="fa:11:39:ea:ab:32", NAME="eth0"
+
+ '';
+}
diff --git a/default.nix b/default.nix
index 3d3250c..eb08fa7 100644
--- a/default.nix
+++ b/default.nix
@@ -51,6 +51,16 @@ in {
};
};
};
+ Com.RunServal = buildOS {
+ configuration = {
+ imports = [
+ ./Com/Simatime/packages.nix
+ ./Com/RunServal/hardware.nix
+ ./Com/RunServal/networking.nix
+ ];
+ networking.hostName = "serval";
+ };
+ };
Com.InfluencedByBooks = buildOS {
configuration = {
imports = [