From 08297376a85a1719518507e54fca9de954d2376a Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Thu, 23 May 2024 13:56:00 +0300 Subject: Agenix configuration --- hosts/kataja/default.nix | 141 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 hosts/kataja/default.nix (limited to 'hosts/kataja/default.nix') diff --git a/hosts/kataja/default.nix b/hosts/kataja/default.nix new file mode 100644 index 0000000..f664cab --- /dev/null +++ b/hosts/kataja/default.nix @@ -0,0 +1,141 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ + inputs, + outputs, + lib, + config, + pkgs, + vars, + ... +}: + +{ + imports = [ ./hardware-configuration.nix ]; + networking = { + hostName = "kataja"; + interfaces.eno1.wakeOnLan.enable = true; + }; + + systemd = { + network = { + enable = true; + wait-online.enable = false; + config = { + networkConfig = { + SpeedMeter = true; + }; + }; + networks = { + "10-wlan" = { + matchConfig = { + MACAddress = "10:6f:d9:28:3f:b3"; + }; + linkConfig = { + Multicast = true; + }; + networkConfig = { + DHCP = true; + IPv6AcceptRA = true; + MulticastDNS = true; + UseDomains = true; + }; + dhcpV4Config = { + RouteMetric = 600; + UseMTU = true; + }; + ipv6AcceptRAConfig = { + RouteMetric = 600; + UseMTU = true; + }; + linkConfig.RequiredForOnline = "no"; + }; + "11-lan" = { + matchConfig = { + MACAddress = "70:70:fc:00:29:25"; + }; + linkConfig = { + Multicast = true; + }; + networkConfig = { + DHCP = true; + IPv6AcceptRA = true; + MulticastDNS = true; + UseDomains = true; + }; + dhcpV4Config = { + RouteMetric = 100; + UseMTU = true; + }; + ipv6AcceptRAConfig = { + RouteMetric = 100; + UseMTU = true; + }; + linkConfig.RequiredForOnline = "no"; + }; + "12-lan" = { + matchConfig = { + MACAddress = "70:70:fc:00:29:26"; + }; + networkConfig = { + DHCP = true; + IPv6AcceptRA = true; + UseDomains = true; + }; + ipv6AcceptRAConfig = { + UseMTU = true; + }; + linkConfig.RequiredForOnline = "no"; + }; + }; + }; + sleep.extraConfig = "HibernateDelaySec=90m"; + }; + + environment = { + sessionVariables = { + LIBVA_DRIVER_NAME = "radeonsi"; + }; + }; + + services = { + godns = { + enable = true; + settings = { + domains = [ + { + domain_name = "www.duckdns.org"; + sub_domains = [ "kataja" ]; + } + ]; + ip_interface = "eno1"; + interval = 300; + ip_type = "IPv6"; + login_token_file = config.age.secrets.duckdns.path; + provider = "DuckDNS"; + }; + }; + xserver = { + deviceSection = '' + Option "DRI" "3" + Option "VariableRefresh" "True" + Option "TearFree" "False" + ''; + }; + }; + + hardware = { + graphics = { + extraPackages = with pkgs; [ + amdvlk + rocmPackages.clr.icd + ]; + }; + + bluetooth.settings.General.Name = "kataja"; + }; + + system.stateVersion = "24.05"; +} -- cgit v1.2.3-70-g09d2