All my system configs and packages in one repo
1
fork

Configure Feed

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

treewide: fix and reorganize configs

+91 -86
+33 -6
systems/common.nix
··· 7 7 ... 8 8 }: 9 9 { 10 + imports = [ 11 + ../users 12 + ]; 13 + 10 14 system.stateVersion = "25.05"; 11 15 12 16 nix = { ··· 31 35 "configurable-impure-env" 32 36 ]; 33 37 trusted-users = [ "@wheel" ]; 34 - impure-env = [ "all_proxy=http://127.0.0.1:2080" ]; 35 38 }; 36 39 }; 37 40 ··· 43 46 overlays = [ inputs.self.overlays.default ]; 44 47 }; 45 48 49 + # Enable building and testing aarch64 packages for Nixpkgs dev 50 + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 51 + nix.settings.extra-platforms = [ "aarch64-linux" ]; 52 + 46 53 boot = { 47 54 loader = { 48 55 limine = { ··· 76 83 77 84 # Use native Wayland when possible 78 85 environment.variables = { 86 + # This *should* be enough for most Electron apps 87 + ELECTRON_OZONE_PLATFORM_HINT = "auto"; 88 + 89 + # Apply Nixpkgs-specific flags too 79 90 NIXOS_OZONE_WL = "1"; 80 91 81 92 # Some SDL 2 apps are very naughty and don't work nicely under Wayland ··· 86 97 }; 87 98 88 99 services = { 100 + # Use dbus-broker for higher D-Bus performance 89 101 dbus.implementation = "broker"; 102 + 103 + # Some things sadly don't like being in Nixpkgs 90 104 flatpak.enable = true; 105 + 106 + # Makes sure auto-mounting disks still work when not using a 107 + # traditional desktop environment like GNOME or KDE 91 108 udisks2.enable = true; 109 + 110 + # Dynamically adjust performance settings based on load 111 + # instead of power-profile-daemon's rigid profiles 92 112 tlp.enable = true; 93 113 114 + # Nobody likes PulseAudio in this household 94 115 pulseaudio.enable = false; 116 + 95 117 pipewire = { 96 118 enable = true; 97 - wireplumber.enable = true; 119 + pulse.enable = true; 120 + 121 + # Some weird apps still talk to ALSA directly 98 122 alsa.enable = true; 123 + 124 + # JACK should only be necessary for some professional audio 125 + # software (e.g. DAWs like Ardour or video editing software 126 + # like DaVinci Resolve), but we enable it no matter what 99 127 jack.enable = true; 100 - pulse.enable = true; 101 128 }; 102 129 }; 103 130 131 + # Real-time audio software like DAWs are 132 + # *crippled* without rtkit 104 133 security.rtkit.enable = true; 105 134 106 135 zramSwap = { ··· 108 137 algorithm = "zstd"; 109 138 }; 110 139 111 - networking.networkmanager = { 112 - enable = true; 113 - }; 140 + networking.networkmanager.enable = true; 114 141 115 142 system = { 116 143 # Thank @luishfonseca for this
+4 -34
systems/fettuccine/default.nix
··· 1 1 { 2 2 config, 3 - pkgs, 4 3 lib, 5 4 inputs, 6 5 ... ··· 9 8 imports = with inputs.nixos-hardware.nixosModules; [ 10 9 ../common.nix 11 10 ./hardware-configuration.nix 12 - ../../users/leah 13 - 14 - common-hidpi 15 11 asus-zephyrus-gu603h 16 12 ]; 17 13 18 14 networking.hostName = "fettuccine"; 19 15 20 - boot = { 21 - # Disable Nvidia's HDMI audio 22 - blacklistedKernelModules = [ "snd_hda_codec_hdmi" ]; 16 + users.users.leah.enable = true; 23 17 24 - # FIXME: switch back to latest xanmod after 6.15.5 25 - kernelPackages = pkgs.linuxPackages_latest; 26 - }; 18 + # Disable Nvidia's HDMI audio 19 + boot.blacklistedKernelModules = [ "snd_hda_codec_hdmi" ]; 27 20 28 - # Enable building and testing aarch64 packages for Nixpkgs dev 29 - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 30 - nix.settings.extra-platforms = [ "aarch64-linux" ]; 31 - 21 + # Allow CUDA 32 22 nixpkgs.config.cudaSupport = true; 33 23 34 24 hardware = { ··· 50 40 51 41 # This is an ASUS computer after all 52 42 services.asusd.enable = true; 53 - 54 - networking.firewall = { 55 - enable = true; 56 - 57 - # Allow previewing local Vite builds on other devices via LAN 58 - allowedTCPPorts = [ 5173 ]; 59 - }; 60 - 61 - specialisation.china.configuration = { 62 - # cache.nixos.org is *unbearably* slow when accessed from Mainland China. 63 - # Fortunately, mirror sites exist... Hooray(?) 64 - nix.settings.substituters = map (url: "${url}/nix-channels/store") [ 65 - "https://mirrors.ustc.edu.cn" 66 - "https://mirrors6.tuna.tsinghua.edu.cn" 67 - "https://mirrors.tuna.tsinghua.edu.cn" 68 - # "https://mirror.sjtu.edu.cn" # FIXME: buggy? 69 - ]; 70 - 71 - environment.sessionVariables.all_proxy = "http://127.0.0.1:2080"; 72 - }; 73 43 }
+37
systems/laptop.nix
··· 1 + # Laptop configuration for when I'm on the move 2 + { 3 + pkgs, 4 + ... 5 + }: 6 + { 7 + imports = [ 8 + ./common.nix 9 + ]; 10 + 11 + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; 12 + 13 + # Update the system timezone according to physical location 14 + systemd.services.automatic-timezoned.enable = true; 15 + 16 + specialisation.china.configuration = { 17 + # cache.nixos.org is *unbearably* slow when accessed from Mainland China. 18 + # Fortunately, mirror sites exist... Hooray(?) 19 + nix.settings.substituters = map (url: "${url}/nix-channels/store") [ 20 + "https://mirrors.ustc.edu.cn" 21 + "https://mirrors6.tuna.tsinghua.edu.cn" 22 + "https://mirrors.tuna.tsinghua.edu.cn" 23 + # "https://mirror.sjtu.edu.cn" # FIXME: buggy? 24 + ]; 25 + 26 + # Redirect all traffic through proxy 27 + networking.proxy.allProxy = "http://127.0.0.1:2080"; 28 + nix.settings.impure-env = [ "all_proxy=http://127.0.0.1:2080" ]; 29 + 30 + # Make the auto upgrade mechanism upgrade to the correct specialization 31 + # so that proxies don't just randomly break the next day 32 + system.autoUpgrade.flags = [ 33 + "--specialisation" 34 + "china" 35 + ]; 36 + }; 37 + }
+2 -34
systems/pappardelle/default.nix
··· 1 1 { 2 - pkgs, 3 2 inputs, 4 3 ... 5 4 }: 6 5 { 7 6 imports = with inputs.nixos-hardware.nixosModules; [ 8 - ../common.nix 7 + ../laptop.nix 9 8 ./hardware-configuration.nix 10 - ../../users/leah 11 - 12 9 lenovo-ideapad-14iah10 13 10 ]; 14 11 15 12 hardware.bluetooth.enable = true; 16 - 17 13 networking.hostName = "pappardelle"; 18 - 19 - boot = { 20 - # FIXME: switch back to latest xanmod after 6.15.5 21 - kernelPackages = pkgs.linuxPackages_latest; 22 - }; 23 - 24 - # Enable building and testing aarch64 packages for Nixpkgs dev 25 - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; 26 - nix.settings.extra-platforms = [ "aarch64-linux" ]; 27 - 28 - networking.firewall = { 29 - enable = true; 30 - 31 - # Allow previewing local Vite builds on other devices via LAN 32 - allowedTCPPorts = [ 5173 ]; 33 - }; 34 - 35 - specialisation.china.configuration = { 36 - # cache.nixos.org is *unbearably* slow when accessed from Mainland China. 37 - # Fortunately, mirror sites exist... Hooray(?) 38 - nix.settings.substituters = map (url: "${url}/nix-channels/store") [ 39 - "https://mirrors.ustc.edu.cn" 40 - "https://mirrors6.tuna.tsinghua.edu.cn" 41 - "https://mirrors.tuna.tsinghua.edu.cn" 42 - # "https://mirror.sjtu.edu.cn" # FIXME: buggy? 43 - ]; 44 - 45 - networking.proxy.allProxy = "http://127.0.0.1:2080"; 46 - }; 14 + users.users.leah.enable = true; 47 15 }
+5
users/default.nix
··· 1 + { 2 + imports = [ 3 + ./leah 4 + ]; 5 + }
+6 -7
users/leah/default.nix
··· 1 - { inputs, config, ... }: 1 + { 2 + config, 3 + lib, 4 + ... 5 + }: 2 6 { 3 7 imports = [ 4 8 ../common.nix ··· 6 10 # ./presets/plasma 7 11 ./presets/niri 8 12 ./programs 9 - 10 - inputs.hjem.nixosModules.hjem 11 13 ]; 12 14 13 15 users.users.leah = { 16 + enable = lib.mkDefault false; # Machines must manually enable the user 14 17 isNormalUser = true; 15 18 description = "Leah C"; 16 19 extraGroups = [ 17 20 "wheel" # 1984 powers 18 21 "rtkit" # Some apps may need to adjust audio priority at runtime 19 22 "networkmanager" # Manage networks 20 - 21 - "qemu-libvirtd" 22 - "libvirtd" 23 23 ]; 24 24 home = "/home/leah"; 25 25 ··· 39 39 ]; 40 40 extraLocaleSettings.LC_TIME = "de_DE.UTF-8"; 41 41 }; 42 - 43 42 }
+4 -5
users/leah/presets/niri/config.kdl
··· 166 166 } 167 167 168 168 window-rule { 169 - match app-id=r#"^org\.gnome\.World\.Secrets$"# 170 169 match app-id="1Password" 171 170 172 171 block-out-from "screen-capture" ··· 176 175 Mod+Shift+Slash { show-hotkey-overlay; } 177 176 178 177 // Suggested binds for running programs: terminal, app launcher, screen locker. 179 - Mod+T repeat=false { spawn "gdbus call --session --dest com.mitchellh.ghostty --object-path /com/mitchellh/ghostty --method org.gtk.Actions.Activate new-window [] []"; } 178 + Mod+T repeat=false { spawn "gdbus" "call" "--session" "--dest" "com.mitchellh.ghostty" "--object-path" "/com/mitchellh/ghostty" "--method" "org.gtk.Actions.Activate new-window" "[]" "[]"; } 180 179 Super+D repeat=false { spawn "bash" "-c" "pkill fuzzel || fuzzel"; } 181 180 Super+Alt+L { spawn "swaylock"; } 182 181 ··· 352 351 spawn-at-startup "swaybg" 353 352 354 353 // TODO: I do not know why 1Pass doesn't work on Wayland 355 - spawn-at-startup "1password --ozone-platform-hint=x11" 356 - spawn-at-startup "ghostty --launched-from=desktop" 354 + spawn-at-startup "env" "ELECTRON_OZONE_PLATFORM_HINT=x11" "1password" 355 + spawn-at-startup "ghostty" "--launched-from=desktop" 357 356 spawn-at-startup "firefox" 358 - spawn-at-startup "vesktop" 357 + spawn-at-startup "vesktop" "--wayland-text-input-version=3" 359 358 spawn-at-startup "steam" 360 359 361 360 window-rule {