My NixOS and Home Manager configurations
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

hades networking fixes and disable orca

quasigod 1b8f1cb9 9b860621

+113 -9
+1
modules/cosmic.nix
··· 21 21 nixos = 22 22 { pkgs, lib, ... }: 23 23 { 24 + services.orca.enable = false; # TODO 24 25 nixpkgs.overlays = [ 25 26 (self: super: { 26 27 cosmic-session = super.cosmic-session.overrideAttrs (
+13 -9
modules/hosts/hades/default.nix
··· 34 34 apps._.radicle 35 35 apps._.zsa 36 36 services._.syncthing._.client 37 + # (pipewire._.lowlatency { 38 + # quantum = 48000; 39 + # rate = 128; 40 + # }) 37 41 ]; 38 42 39 43 nixos = 40 44 { pkgs, ... }: 41 45 { 42 46 facter.reportPath = ./_facter.json; 47 + facter.detected.dhcp.enable = false; 43 48 imports = with inputs; [ 44 49 nixos-hardware.nixosModules.common-cpu-amd 45 50 nixos-hardware.nixosModules.common-gpu-amd 46 51 nixos-hardware.nixosModules.common-pc-ssd 47 - nix-gaming.nixosModules.pipewireLowLatency 52 + # nix-gaming.nixosModules.pipewireLowLatency 48 53 ]; 49 54 50 55 hardware.amdgpu.opencl.enable = true; 51 56 nixpkgs.config.rocmSupport = true; 52 57 environment.sessionVariables.HSA_OVERRIDE_GFX_VERSION = "11.0.1"; 53 58 services = { 54 - # pipewire.lowLatency = { 55 - # enable = true; 56 - # rate = 48000; 57 - # quantum = 256; 58 - # }; 59 59 resolved.fallbackDns = [ ]; 60 60 fwupd.enable = true; 61 61 }; 62 62 63 63 boot.kernelPackages = 64 64 inputs.chaotic.legacyPackages.${pkgs.stdenv.hostPlatform.system}.linuxPackages_cachyos; 65 + 65 66 systemd.network = { 66 67 enable = true; 67 - links."01-ethernet" = { 68 + links."10-ethernet" = { 68 69 matchConfig.Type = "ether"; 69 70 linkConfig.WakeOnLan = "magic"; 71 + linkConfig.Name = "lan"; 70 72 }; 71 - networks."01-ethernet" = { 72 - matchConfig.Name = "enp8s0"; 73 + networks."10-ethernet" = { 74 + matchConfig.Type = "ether"; 73 75 networkConfig.DHCP = "yes"; 74 76 }; 75 77 }; 76 78 77 79 networking = { 80 + useDHCP = false; 78 81 networkmanager.enable = false; 82 + networkmanager.unmanaged = [ "lan" ]; 79 83 hostName = "hades"; 80 84 firewall = { 81 85 allowedUDPPorts = [
+99
modules/pwlowlatency.nix
··· 1 + { 2 + styx.pipewire._.lowlatency = 3 + { 4 + quantum ? 44100, 5 + rate ? 32, 6 + ... 7 + }: 8 + { 9 + nixos = 10 + { pkgs, lib, ... }: 11 + let 12 + qr = "${toString quantum}/${toString rate}"; 13 + inherit (lib.generators) toLua; 14 + in 15 + { 16 + services.pipewire = { 17 + # make sure PipeWire is enabled if the module is imported 18 + # and low latency is enabledd 19 + enable = true; 20 + 21 + # write extra config 22 + extraConfig = { 23 + pipewire."99-lowlatency" = { 24 + "context.properties" = { 25 + "default.clock.min-quantum" = quantum; 26 + }; 27 + 28 + "module.rt.args" = { 29 + "nice.level" = -15; 30 + "rt.prio" = 88; 31 + "rt.time.soft" = 200000; 32 + "rt.time.hard" = 200000; 33 + }; 34 + }; 35 + 36 + pipewire-pulse."99-lowlatency" = { 37 + "pulse.properties" = { 38 + "server.address" = [ "unix:native" ]; 39 + "pulse.min.req" = qr; 40 + "pulse.min.quantum" = qr; 41 + "pulse.min.frag" = qr; 42 + }; 43 + }; 44 + 45 + client."99-lowlatency" = { 46 + "stream.properties" = { 47 + "node.latency" = qr; 48 + "resample.quality" = 1; 49 + }; 50 + }; 51 + }; 52 + 53 + # ensure WirePlumber is enabled explicitly (defaults to true while PW is enabled) 54 + # and write extra config to ship low latency rules for alsa 55 + wireplumber = { 56 + enable = true; 57 + configPackages = 58 + let 59 + # generate "matches" section of the rules 60 + matches = 61 + toLua 62 + { 63 + multiline = false; # looks better while inline 64 + indent = false; 65 + } 66 + [ 67 + [ 68 + [ 69 + "node.name" 70 + "matches" 71 + "alsa_output.*" 72 + ] 73 + ] 74 + ]; # nested lists are to produce `{{{ }}}` in the output 75 + 76 + # generate "apply_properties" section of the rules 77 + apply_properties = toLua { } { 78 + "audio.format" = "S32LE"; 79 + "audio.rate" = rate * 2; 80 + "api.alsa.period-size" = 2; 81 + }; 82 + in 83 + [ 84 + (pkgs.writeTextDir "share/lowlatency.lua.d/99-alsa-lowlatency.lua" '' 85 + -- Generated by nix-gaming 86 + alsa_monitor.rules = { 87 + { 88 + matches = ${matches}; 89 + apply_properties = ${apply_properties}; 90 + } 91 + } 92 + '') 93 + ]; 94 + }; 95 + }; 96 + }; 97 + }; 98 + } 99 +