diff options
author | makefu <github@syntax-fehler.de> | 2020-09-16 21:55:09 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2020-09-16 21:55:09 +0200 |
commit | c64fb07027b49a3825b6f0814ebeb17782b8266a (patch) | |
tree | e1b4681fd93a4d3257b556dd8d579464d653ef77 /tv | |
parent | 1394ae1bd4bc3dcfb77b0daee996e75f8092fc5b (diff) | |
parent | 88a9183d1d36424977b0cd8ed513109433b779b2 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'tv')
-rw-r--r-- | tv/1systems/alnus/config.nix | 13 | ||||
-rw-r--r-- | tv/1systems/au/config.nix | 18 | ||||
-rw-r--r-- | tv/1systems/au/disks.nix | 19 | ||||
-rw-r--r-- | tv/2configs/binary-cache/default.nix | 2 | ||||
-rw-r--r-- | tv/2configs/default.nix | 1 | ||||
-rw-r--r-- | tv/2configs/nets/hkw.nix | 81 | ||||
-rw-r--r-- | tv/2configs/nginx/public_html.nix | 2 |
7 files changed, 128 insertions, 8 deletions
diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix index 66bd52ab2..ed5fb671c 100644 --- a/tv/1systems/alnus/config.nix +++ b/tv/1systems/alnus/config.nix @@ -17,7 +17,6 @@ with import <stockholm/lib>; }; environment.systemPackages = with pkgs; [ - chromium firefoxWrapper networkmanagerapplet (pkgs.pidgin-with-plugins.override { @@ -31,12 +30,12 @@ with import <stockholm/lib>; }; "/" = { device = "/dev/mapper/main-root"; - fsType = "btrfs"; + fsType = "ext4"; options = [ "defaults" "noatime" ]; }; "/home" = { device = "/dev/mapper/main-home"; - fsType = "btrfs"; + fsType = "ext4"; options = [ "defaults" "noatime" ]; }; }; @@ -55,9 +54,11 @@ with import <stockholm/lib>; networking.networkmanager.enable = true; - nixpkgs.config = { - allowUnfree = true; - }; + services.earlyoom.enable = true; + services.earlyoom.freeMemThreshold = 5; + systemd.services.earlyoom.environment.EARLYOOM_ARGS = toString [ + "--prefer '^(Web Content|Privileged Cont)$'" # firefox tabs + ]; services.xserver = { enable = true; diff --git a/tv/1systems/au/config.nix b/tv/1systems/au/config.nix new file mode 100644 index 000000000..fc4b216f5 --- /dev/null +++ b/tv/1systems/au/config.nix @@ -0,0 +1,18 @@ +{ config, ... }: { + imports = [ + ./disks.nix + <stockholm/tv> + <stockholm/tv/2configs/hw/x220.nix> + <stockholm/tv/2configs/retiolum.nix> + ]; + + krebs.build.host = config.krebs.hosts.au; + + networking.wireless.enable = true; + networking.useDHCP = false; + networking.interfaces.enp0s25.useDHCP = true; + networking.interfaces.wlp3s0.useDHCP = true; + networking.interfaces.wwp0s29u1u4i6.useDHCP = true; + + system.stateVersion = "20.03"; +} diff --git a/tv/1systems/au/disks.nix b/tv/1systems/au/disks.nix new file mode 100644 index 000000000..434de1740 --- /dev/null +++ b/tv/1systems/au/disks.nix @@ -0,0 +1,19 @@ +{ + boot.initrd.luks.devices.main.device = "/dev/sda2"; + fileSystems."/" = { + device = "/dev/main/root"; + options = ["defaults" "noatime" "commit=60"]; + }; + fileSystems."/boot" = { + device = "/dev/sda1"; + options = ["defaults" "noatime"]; + }; + fileSystems."/bku" = { + device = "/dev/main/bku"; + options = ["defaults" "noatime"]; + }; + fileSystems."/home" = { + device = "/dev/main/home"; + options = ["defaults" "noatime" "commit=60"]; + }; +} diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix index 866434cb5..f6eaba36f 100644 --- a/tv/2configs/binary-cache/default.nix +++ b/tv/2configs/binary-cache/default.nix @@ -27,7 +27,7 @@ enable = true; virtualHosts.nix-serve = { serverAliases = [ - "cache.${config.krebs.build.host.name}.gg23" + "cache.${config.krebs.build.host.name}.hkw" ]; locations."/".extraConfig = '' proxy_pass http://localhost:${toString config.services.nix-serve.port}; diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 4d27b0eac..9db35184a 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -16,6 +16,7 @@ with import <stockholm/lib>; ./backup.nix ./bash ./htop.nix + ./nets/hkw.nix ./nginx ./pki ./ssh.nix diff --git a/tv/2configs/nets/hkw.nix b/tv/2configs/nets/hkw.nix new file mode 100644 index 000000000..c3acde1fb --- /dev/null +++ b/tv/2configs/nets/hkw.nix @@ -0,0 +1,81 @@ +{ + krebs = { + dns.providers.hkw = "hosts"; + hosts = { + au = { + nets.hkw = { + ip4 = { + addr = "10.23.1.39"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "au.hkw" + ]; + ssh.port = 11423; + }; + }; + nomic = { + nets.hkw = { + ip4 = { + addr = "10.23.1.110"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "nomic.hkw" + ]; + ssh.port = 11423; + }; + }; + ok = { + external = true; + nets.hkw = { + ip4 = { + addr = "10.23.1.1"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "ok.hkw" + ]; + }; + }; + wu = { + nets.hkw = { + ip4 = { + addr = "10.23.1.37"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "wu.hkw" + "cache.wu.hkw" + ]; + ssh.port = 11423; + }; + }; + xu = { + nets.hkw = { + ip4 = { + addr = "10.23.1.38"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "xu.hkw" + "cache.xu.hkw" + ]; + ssh.port = 11423; + }; + }; + zu = { + nets.hkw = { + ip4 = { + addr = "10.23.1.40"; + prefix = "10.23.1.0/24"; + }; + aliases = [ + "zu.hkw" + ]; + ssh.port = 11423; + }; + }; + }; + }; +} diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix index cc7a39891..a37498ba3 100644 --- a/tv/2configs/nginx/public_html.nix +++ b/tv/2configs/nginx/public_html.nix @@ -9,7 +9,7 @@ with import <stockholm/lib>; serverAliases = [ "localhost" "${config.krebs.build.host.name}" - "${config.krebs.build.host.name}.gg23" + "${config.krebs.build.host.name}.hkw" "${config.krebs.build.host.name}.r" ]; locations."~ ^/~(.+?)(/.*)?\$".extraConfig = '' |