diff options
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/base-server.nix | 1 | ||||
-rwxr-xr-x | modules/base.nix | 29 | ||||
-rw-r--r-- | modules/monitoring/synapse.nix | 4 | ||||
-rw-r--r-- | modules/packages/overlays/openvpn-iomanip.patch | 13 | ||||
-rw-r--r-- | modules/packages/overlays/openvpn.nix | 12 | ||||
-rw-r--r-- | modules/packages/xdg-desktop-portal-gtk.nix | 4 | ||||
-rw-r--r-- | modules/software-templates/profilers.nix | 2 | ||||
-rwxr-xr-x | modules/users/chris.nix | 2 |
8 files changed, 52 insertions, 15 deletions
diff --git a/modules/base-server.nix b/modules/base-server.nix index 7473513..1fc72f3 100755 --- a/modules/base-server.nix +++ b/modules/base-server.nix @@ -70,7 +70,6 @@ "8.8.8.8" "8.4.4.8" ]; - resolvconf.enable = true; defaultGateway = "192.168.1.1"; }; diff --git a/modules/base.nix b/modules/base.nix index 4cf2aff..2f565e4 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, ... }: +{ + pkgs, + lib, + config, + ... +}: { imports = [ @@ -6,6 +11,8 @@ ./users/Rory.nix ./extra-substituters.nix ./monitoring/module.nix + + ./packages/overlays/openvpn.nix # Temporary: Fix a build failure ]; boot = { @@ -60,19 +67,25 @@ # allowedTCPPorts = [ ... ]; # allowedUDPPorts = [ ... ]; }; - nameservers = [ + nameservers = lib.mkDefault [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ]; }; - environment.etc."resolv.conf".text = '' - nameserver 8.8.8.8 - nameserver 8.4.4.8 - nameserver 1.1.1.1 - nameserver 1.0.0.1 - ''; + + environment.etc."resolv.conf" = lib.mkDefault { + text = lib.concatStringsSep "\n" ( + lib.optionals (config.networking ? nameservers) (map (nameserver: "nameserver ${nameserver}") (config.networking.nameservers)) + ++ lib.optionals (config.networking ? enableIPv6 && !config.networking.enableIPv6) [ "options no-aaaa" ] + ++ lib.optionals (config.networking ? enableIPv6 && config.networking.enableIPv6) [ + "options single-request" + "options single-request-reopen" + "options inet6" + ] + ); + }; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix index a000698..55d123e 100644 --- a/modules/monitoring/synapse.nix +++ b/modules/monitoring/synapse.nix @@ -42,7 +42,7 @@ in [ { job_name = "synapse-main"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:9200" ]; @@ -55,7 +55,7 @@ in ++ lib.flatten ( lib.imap (index: workerName: { job_name = "synapse-${workerName}"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:${toString (9200 + index + 1)}" ]; diff --git a/modules/packages/overlays/openvpn-iomanip.patch b/modules/packages/overlays/openvpn-iomanip.patch new file mode 100644 index 0000000..f334a34 --- /dev/null +++ b/modules/packages/overlays/openvpn-iomanip.patch @@ -0,0 +1,13 @@ +diff --git a/src/tests/unit/machine-id.cpp b/src/tests/unit/machine-id.cpp +index 8131947..a875743 100644 +--- a/src/tests/unit/machine-id.cpp ++++ b/src/tests/unit/machine-id.cpp +@@ -15,6 +15,7 @@ + #include "build-config.h" + + #include <iostream> ++#include <iomanip> + #include <fstream> + #include <string> + #include <vector> + diff --git a/modules/packages/overlays/openvpn.nix b/modules/packages/overlays/openvpn.nix new file mode 100644 index 0000000..f927f80 --- /dev/null +++ b/modules/packages/overlays/openvpn.nix @@ -0,0 +1,12 @@ +{...}: +{ + nixpkgs.overlays = [ + (final: prev: { + openvpn3 = prev.openvpn3.overrideAttrs (old: { + patches = (old.patches or []) ++ [ + ./openvpn-iomanip.patch + ]; + }); + }) + ]; +} diff --git a/modules/packages/xdg-desktop-portal-gtk.nix b/modules/packages/xdg-desktop-portal-gtk.nix index cfe48d4..c849b17 100644 --- a/modules/packages/xdg-desktop-portal-gtk.nix +++ b/modules/packages/xdg-desktop-portal-gtk.nix @@ -7,7 +7,7 @@ pkg-config, xdg-desktop-portal, gtk3, - gnome, + gnome-settings-daemon, gnome-desktop, glib, wrapGAppsHook, @@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals buildPortalsInGnome [ gsettings-desktop-schemas # settings exposed by settings portal gnome-desktop - gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings) + gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings) ]; mesonFlags = lib.optionals (!buildPortalsInGnome) [ diff --git a/modules/software-templates/profilers.nix b/modules/software-templates/profilers.nix index 4381193..0df43f7 100644 --- a/modules/software-templates/profilers.nix +++ b/modules/software-templates/profilers.nix @@ -3,7 +3,7 @@ { environment.systemPackages = with pkgs; [ kcachegrind - linuxKernel.packages.linux_5_15.perf + linuxKernel.packages.linux_6_11.perf hotspot valgrind ]; diff --git a/modules/users/chris.nix b/modules/users/chris.nix index 9df69a8..3ae92fd 100755 --- a/modules/users/chris.nix +++ b/modules/users/chris.nix @@ -4,7 +4,7 @@ users.users.chris = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = [ "wheel" "dialout" ]; packages = with pkgs; [ nano #nodejs-slim |