aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/kataja
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/kataja')
-rw-r--r--hosts/kataja/default.nix141
-rw-r--r--hosts/kataja/hardware-configuration.nix79
2 files changed, 220 insertions, 0 deletions
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";
+}
diff --git a/hosts/kataja/hardware-configuration.nix b/hosts/kataja/hardware-configuration.nix
new file mode 100644
index 0000000..5d1d1b7
--- /dev/null
+++ b/hosts/kataja/hardware-configuration.nix
@@ -0,0 +1,79 @@
+# Do not modify this file! It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations. Please make changes
+# to /etc/nixos/configuration.nix instead.
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
+
+{
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
+
+ boot = {
+ kernelPackages = pkgs.linuxPackages_zen;
+ initrd = {
+ luks.devices."luks-b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc".device =
+ "/dev/disk/by-uuid/b3e9864c-2a40-43d7-b1a0-51f3b2ec42bc";
+ availableKernelModules = [
+ "ahci"
+ "amdgpu"
+ "mt7921e"
+ "nvme"
+ "r8169"
+ "sd_mod"
+ "usb_storage"
+ "usbhid"
+ "xhci_pci"
+ "cdc_acm"
+ ];
+ };
+ kernelParams = [
+ "amdgpu.modeset=1"
+ "default_hugepagesz=2M"
+ "mitigations=off"
+ "nospectre_v2"
+ "transparent_hugepage=always"
+ ];
+ kernelModules = [
+ "k10temp"
+ "kvm-amd"
+ "snd_hda_intel"
+ "tcp_bbr"
+ ];
+ extraModulePackages = [ ];
+ };
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/3e7f6b6b-b656-4f42-b314-f447e2562718";
+ fsType = "ext4";
+ };
+
+ boot.initrd.luks.devices."luks-b9b738dc-8554-41d9-82f9-042663b52e79".device =
+ "/dev/disk/by-uuid/b9b738dc-8554-41d9-82f9-042663b52e79";
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/4121-BEC3";
+ fsType = "vfat";
+ options = [
+ "fmask=0077"
+ "dmask=0077"
+ ];
+ };
+
+ swapDevices = [ { device = "/dev/disk/by-uuid/97641877-607c-46cd-853d-e431c8a90dc2"; } ];
+
+ # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+ # (the default) this is the recommended approach. When using systemd-networkd it's
+ # still possible to use this option, but it's recommended to use it in conjunction
+ # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+ # networking.useDHCP = lib.mkDefault true;
+ # networking.interfaces.eno1.useDHCP = lib.mkDefault true;
+ # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
+ # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}