Skyler Grey | 2bad969 | 2022-06-06 19:03:16 +0100 | [diff] [blame] | 1 | { pkgs, nurpkgs, lib, modulesPath, config, ... }: |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 2 | let |
Skyler Grey | 2577b19 | 2022-05-19 06:51:08 +0100 | [diff] [blame] | 3 | nixScripts = import ./utils/nixFilesIn.nix lib ./nix/system; |
Skyler Grey | ed68b70 | 2022-05-27 23:00:07 +0100 | [diff] [blame] | 4 | nixApps = import ./utils/nixFilesIn.nix lib ./apps/system; |
Skyler Grey | 2bad969 | 2022-06-06 19:03:16 +0100 | [diff] [blame] | 5 | overlays = import ./utils/nixFilesIn.nix lib ./overlays; |
| 6 | packages = import ./utils/nixFilesIn.nix lib ./packages; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 7 | in { |
Skyler Grey | ed68b70 | 2022-05-27 23:00:07 +0100 | [diff] [blame] | 8 | imports = nixScripts ++ nixApps ++ [ (modulesPath + "/installer/scan/not-detected.nix") ]; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 9 | |
| 10 | |
| 11 | # Prepare nix flakes |
| 12 | nix = { |
| 13 | package = pkgs.nixFlakes; |
| 14 | extraOptions = '' |
| 15 | experimental-features = nix-command flakes |
Skyler Grey | 087b2f6 | 2022-05-23 17:32:12 +0100 | [diff] [blame] | 16 | auto-optimise-store = true |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 17 | ''; |
| 18 | }; |
| 19 | |
| 20 | # Use the systemd-boot EFI boot loader. |
| 21 | boot.loader.systemd-boot.enable = true; |
| 22 | boot.loader.efi.canTouchEfiVariables = true; |
| 23 | boot.loader.grub.useOSProber = true; |
| 24 | |
| 25 | # Enable emulated systems |
| 26 | boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ]; |
| 27 | |
| 28 | boot.resumeDevice = "/dev/nvme0n1p5"; |
| 29 | |
| 30 | # Enable apparmor |
| 31 | security.apparmor.enable = true; |
| 32 | security.apparmor.killUnconfinedConfinables = true; |
| 33 | |
| 34 | # Set your time zone. |
| 35 | time.timeZone = "Europe/London"; |
| 36 | |
| 37 | # Select internationalisation properties. |
| 38 | i18n.defaultLocale = "en_US.UTF-8"; |
| 39 | console = { |
| 40 | font = "Lat2-Terminus16"; |
| 41 | keyMap = "uk"; |
| 42 | }; |
| 43 | |
| 44 | # Enable the X11 windowing system. |
| 45 | services.xserver = { |
| 46 | enable = true; |
| 47 | desktopManager = { |
| 48 | xterm.enable = false; |
| 49 | # xfce.enable = true; |
| 50 | }; |
| 51 | displayManager.startx.enable = true; |
| 52 | # displayManager.sddm.enable = true; |
| 53 | }; |
| 54 | |
| 55 | services.zeronet.enable = true; |
Skyler Grey | f962262 | 2022-05-30 23:43:56 +0100 | [diff] [blame] | 56 | services.zeronet.package = pkgs.zeronet-conservancy; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 57 | |
| 58 | services = { |
| 59 | syncthing = { |
| 60 | enable = true; |
| 61 | user = "minion"; |
| 62 | dataDir = "/home/minion/Documents"; # Default folder for new synced folders |
| 63 | configDir = "/home/minion/.config/syncthing"; # Folder for Syncthing's settings and keys |
| 64 | }; |
| 65 | }; |
| 66 | |
| 67 | # And wayland |
| 68 | /* programs.sway = { |
| 69 | enable = true; |
| 70 | wrapperFeatures.gtk = true; # so that gtk works properly |
| 71 | extraPackages = with pkgs; [ |
| 72 | swaylock |
| 73 | swayidle |
| 74 | wl-clipboard |
| 75 | mako # notification daemon |
| 76 | alacritty # Alacritty is the default terminal in the config |
| 77 | ]; |
| 78 | };*/ |
| 79 | |
Skyler Grey | bf04233 | 2022-05-24 16:39:26 +0100 | [diff] [blame] | 80 | programs.light.enable = true; # Needs udev rules to properly work |
| 81 | |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 82 | programs.qt5ct = { |
| 83 | enable = true; |
| 84 | }; |
| 85 | # programs.waybar.enable = false; # true; |
| 86 | |
| 87 | # Get screensharing to work |
| 88 | xdg = { |
| 89 | portal = { |
| 90 | enable = true; |
Skyler Grey | ffe0fbe | 2022-06-17 13:49:15 +0100 | [diff] [blame] | 91 | extraPortals = with pkgs; [ |
| 92 | xdg-desktop-portal-gtk |
| 93 | xdg-desktop-portal-kde |
| 94 | ]; |
| 95 | gtkUsePortal = true; |
Skyler Grey | d8c63b5 | 2022-05-24 15:23:41 +0100 | [diff] [blame] | 96 | wlr.enable = true; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 97 | }; |
| 98 | }; |
| 99 | |
| 100 | systemd.user.services.xdg-desktop-portal = { |
| 101 | unitConfig = { |
| 102 | After = "graphical-session.target"; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | # Configure keymap in X11 |
| 107 | services.xserver.layout = "gb"; |
| 108 | # services.xserver.xkbOptions = "eurosign:e"; |
| 109 | services.upower.enable = true; |
| 110 | |
| 111 | # Permit and install steam |
| 112 | nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ |
| 113 | "steam" |
| 114 | "steam-original" |
| 115 | "steam-runtime" |
| 116 | "mongodb" |
| 117 | "nvidia-x11" |
| 118 | "nvidia-settings" |
| 119 | ]; |
| 120 | |
| 121 | programs.steam.enable = true; |
| 122 | |
| 123 | |
| 124 | # Enable CUPS to print documents. |
| 125 | services.printing.enable = true; |
| 126 | |
| 127 | # Enable sound. |
| 128 | sound.enable = true; |
| 129 | hardware.pulseaudio.enable = false; |
| 130 | services.pipewire = { |
| 131 | enable = true; |
| 132 | alsa = { |
| 133 | enable = true; |
| 134 | support32Bit = true; |
| 135 | }; |
| 136 | pulse.enable = true; |
| 137 | /*config.pipewire = { |
| 138 | "context.modules" = [ |
| 139 | { |
| 140 | name = "libpipewire-module-filter-chain"; |
| 141 | args = { |
| 142 | "node.name" = "effect_output.virtual-surround-7.1-hesuvi"; |
| 143 | "node.description" = "Virtual Surround Sink"; |
| 144 | "media.name" = "Virtual Surround Sink"; |
| 145 | nodes = [ |
| 146 | # duplicate inputs |
| 147 | { type = "builtin"; label = "copy"; name = "copyFL"; } |
| 148 | { type = "builtin"; label = "copy"; name = "copyFR"; } |
| 149 | { type = "builtin"; label = "copy"; name = "copyFC"; } |
| 150 | { type = "builtin"; label = "copy"; name = "copyRL"; } |
| 151 | { type = "builtin"; label = "copy"; name = "copyRR"; } |
| 152 | { type = "builtin"; label = "copy"; name = "copySL"; } |
| 153 | { type = "builtin"; label = "copy"; name = "copySR"; } |
| 154 | { type = "builtin"; label = "copy"; name = "copyLFE"; } |
| 155 | |
| 156 | # apply hrir - HeSuVi 14-channel WAV (not the *-.wav variants) (note: 44 in HeSuVi are the same, but resampled to 44100) |
| 157 | { type = "builtin"; label = "convolver"; name = "convFL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 0; }; } |
| 158 | { type = "builtin"; label = "convolver"; name = "convFL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 1; }; } |
| 159 | { type = "builtin"; label = "convolver"; name = "convSL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 2; }; } |
| 160 | { type = "builtin"; label = "convolver"; name = "convSL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 3; }; } |
| 161 | { type = "builtin"; label = "convolver"; name = "convRL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 4; }; } |
| 162 | { type = "builtin"; label = "convolver"; name = "convRL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 5; }; } |
| 163 | { type = "builtin"; label = "convolver"; name = "convFC_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 6; }; } |
| 164 | { type = "builtin"; label = "convolver"; name = "convFR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 7; }; } |
| 165 | { type = "builtin"; label = "convolver"; name = "convFR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 8; }; } |
| 166 | { type = "builtin"; label = "convolver"; name = "convSR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 9; }; } |
| 167 | { type = "builtin"; label = "convolver"; name = "convSR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 10; }; } |
| 168 | { type = "builtin"; label = "convolver"; name = "convRR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 11; }; } |
| 169 | { type = "builtin"; label = "convolver"; name = "convRR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 12; }; } |
| 170 | { type = "builtin"; label = "convolver"; name = "convFC_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 13; }; } |
| 171 | |
| 172 | # treat LFE as FC |
| 173 | { type = "builtin"; label = "convolver"; name = "convLFE_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 13; }; } |
| 174 | { type = "builtin"; label = "convolver"; name = "convLFE_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 6; }; } |
| 175 | |
| 176 | # stereo output |
| 177 | { type = "builtin"; label = "mixer"; name = "mixR"; } |
| 178 | { type = "builtin"; label = "mixer"; name = "mixL"; } |
| 179 | ]; |
| 180 | links = [ |
| 181 | # input |
| 182 | { output = "copyFL:Out"; input="convFL_L:In"; } |
| 183 | { output = "copyFL:Out"; input="convFL_R:In"; } |
| 184 | { output = "copySL:Out"; input="convSL_L:In"; } |
| 185 | { output = "copySL:Out"; input="convSL_R:In"; } |
| 186 | { output = "copyRL:Out"; input="convRL_L:In"; } |
| 187 | { output = "copyRL:Out"; input="convRL_R:In"; } |
| 188 | { output = "copyFC:Out"; input="convFC_L:In"; } |
| 189 | { output = "copyFR:Out"; input="convFR_R:In"; } |
| 190 | { output = "copyFR:Out"; input="convFR_L:In"; } |
| 191 | { output = "copySR:Out"; input="convSR_R:In"; } |
| 192 | { output = "copySR:Out"; input="convSR_L:In"; } |
| 193 | { output = "copyRR:Out"; input="convRR_R:In"; } |
| 194 | { output = "copyRR:Out"; input="convRR_L:In"; } |
| 195 | { output = "copyFC:Out"; input="convFC_R:In"; } |
| 196 | { output = "copyLFE:Out"; input="convLFE_L:In"; } |
| 197 | { output = "copyLFE:Out"; input="convLFE_R:In"; } |
| 198 | |
| 199 | # output |
| 200 | { output = "convFL_L:Out"; input="mixL:In 1"; } |
| 201 | { output = "convFL_R:Out"; input="mixR:In 1"; } |
| 202 | { output = "convSL_L:Out"; input="mixL:In 2"; } |
| 203 | { output = "convSL_R:Out"; input="mixR:In 2"; } |
| 204 | { output = "convRL_L:Out"; input="mixL:In 3"; } |
| 205 | { output = "convRL_R:Out"; input="mixR:In 3"; } |
| 206 | { output = "convFC_L:Out"; input="mixL:In 4"; } |
| 207 | { output = "convFC_R:Out"; input="mixR:In 4"; } |
| 208 | { output = "convFR_R:Out"; input="mixR:In 5"; } |
| 209 | { output = "convFR_L:Out"; input="mixL:In 5"; } |
| 210 | { output = "convSR_R:Out"; input="mixR:In 6"; } |
| 211 | { output = "convSR_L:Out"; input="mixL:In 6"; } |
| 212 | { output = "convRR_R:Out"; input="mixR:In 7"; } |
| 213 | { output = "convRR_L:Out"; input="mixL:In 7"; } |
| 214 | { output = "convLFE_R:Out"; input="mixR:In 8"; } |
| 215 | { output = "convLFE_L:Out"; input="mixL:In 8"; } |
| 216 | ]; |
| 217 | inputs = [ "copyFL:In" "copyFR:In" "copyFC:In" "copyLFE:In" "copyRL:In" "copyRR:In" "copySL:In" "copySR:In" ]; |
| 218 | outputs = [ "mixL:Out" "mixR:Out" ]; |
| 219 | }; |
| 220 | "capture.props" = { |
| 221 | "media.class" = "Audio/Sink"; |
| 222 | "audio.channels" = 8; |
| 223 | "audio.position" = [ "FL" "FR" "FC" "LFE" "RL" "RR" "SL" "SR" ]; |
| 224 | }; |
| 225 | "playback.props" = { |
| 226 | "node.passive" = true; |
| 227 | "audio.channels" = 2; |
| 228 | "audio.position" = [ "FL" "FR" ]; |
| 229 | }; |
| 230 | } |
| 231 | ]; |
| 232 | };*/ |
| 233 | }; |
| 234 | environment.etc."pipewire/7.1-surround-sound.conf".source = ./pipewire/7.1-surround-sound.conf; |
| 235 | |
| 236 | hardware.openrazer.enable = true; |
| 237 | hardware.openrazer.users = [ "minion" ]; |
| 238 | |
| 239 | hardware.steam-hardware.enable = true; |
| 240 | |
| 241 | # Enable touchpad support (enabled default in most desktopManager). |
| 242 | services.xserver.libinput.enable = true; |
| 243 | |
| 244 | programs.dconf.enable = true; |
| 245 | |
| 246 | # Define a user account. Don't forget to set a password with ‘passwd’. |
| 247 | users.users.minion = { |
| 248 | isNormalUser = true; |
Skyler Grey | 1ec5461 | 2022-05-22 07:14:17 +0100 | [diff] [blame] | 249 | extraGroups = [ "wheel" "kvm" "docker" "containerd" "dialout" "libvirtd" "video" ]; # Enable ‘sudo’ for the user. |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 250 | shell = pkgs.zsh; |
| 251 | }; |
| 252 | |
| 253 | programs.zsh.enable = true; |
| 254 | |
Skyler Grey | e904906 | 2022-06-15 12:51:57 +0100 | [diff] [blame] | 255 | environment.variables = { |
| 256 | EDITOR = "${pkgs.vim}/bin/vim"; |
| 257 | }; |
| 258 | environment.defaultPackages = [ |
| 259 | pkgs.perl |
| 260 | pkgs.rsync |
| 261 | pkgs.strace |
| 262 | pkgs.vim # I'm installing vim here even though it isn't normally a default package, as I've removed nano |
| 263 | ]; # The basic default packages, although without nano |
| 264 | |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 265 | # List packages installed in system profile. To search, run: |
| 266 | # $ nix search wget |
| 267 | environment.systemPackages = with pkgs; [ |
| 268 | vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. |
Skyler Grey | da28797 | 2022-05-30 23:56:42 +0100 | [diff] [blame] | 269 | ((emacsPackagesFor emacs).emacsWithPackages (epkgs: [ |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 270 | epkgs.vterm |
| 271 | epkgs.emacsql-sqlite |
| 272 | ])) # Emacs + vterm-module (needed for vterm) |
| 273 | wget |
| 274 | firefox |
| 275 | chromium # Install chromium if needed |
| 276 | texlive.combined.scheme-full |
| 277 | keybase-gui |
| 278 | bluez |
| 279 | macchanger |
| 280 | comic-relief |
| 281 | qemu_kvm |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 282 | gtk-engine-murrine |
| 283 | gtk_engines |
| 284 | gsettings-desktop-schemas |
| 285 | lxappearance |
| 286 | libsForQt5.qt5.qtwayland |
| 287 | texworks |
| 288 | wlogout |
| 289 | wob |
| 290 | wlsunset |
Skyler Grey | c9ba9bf | 2022-05-18 22:11:33 +0100 | [diff] [blame] | 291 | cni-plugins |
| 292 | ]; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 293 | |
| 294 | # environment.systemPackages = [ |
| 295 | # import /scripts/jetbrains.rider.nix |
| 296 | # ]; |
| 297 | |
Skyler Grey | 5ac334e | 2022-06-01 00:18:23 +0100 | [diff] [blame] | 298 | nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebUIDarkMode --force-dark-mode --enable-features=WebRTCPipeWireCapturer"; # --enable-gpu"; |
Skyler Grey | 8dd715f | 2022-05-24 21:45:06 +0100 | [diff] [blame] | 299 | |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 300 | |
Skyler Grey | c57308f | 2022-05-20 10:23:54 +0100 | [diff] [blame] | 301 | fonts = { |
| 302 | fonts = with pkgs; [ |
| 303 | nerdfonts |
| 304 | noto-fonts |
| 305 | noto-fonts-cjk |
| 306 | noto-fonts-emoji |
| 307 | liberation_ttf |
| 308 | fira-code |
| 309 | fira-code-symbols |
Skyler Grey | 65f1682 | 2022-05-30 23:45:19 +0100 | [diff] [blame] | 310 | mplus-outline-fonts.githubRelease |
Skyler Grey | c57308f | 2022-05-20 10:23:54 +0100 | [diff] [blame] | 311 | dina-font |
| 312 | proggyfonts |
| 313 | roboto |
| 314 | roboto-mono |
| 315 | roboto-slab |
| 316 | twemoji-color-font |
| 317 | ubuntu_font_family |
| 318 | ]; |
| 319 | |
| 320 | enableDefaultFonts = true; |
Skyler Grey | 6378691 | 2022-05-20 11:31:40 +0100 | [diff] [blame] | 321 | fontDir.enable = true; |
Skyler Grey | c57308f | 2022-05-20 10:23:54 +0100 | [diff] [blame] | 322 | |
| 323 | fontconfig = { |
| 324 | defaultFonts = { |
Skyler Grey | 6378691 | 2022-05-20 11:31:40 +0100 | [diff] [blame] | 325 | serif = [ "Roboto Slab" ]; |
| 326 | sansSerif = [ "Roboto" "Ubuntu" ]; |
| 327 | monospace = [ "Roboto Mono" "Ubuntu Mono" ]; |
| 328 | emoji = [ "Twitter Color Emoji" ]; |
Skyler Grey | c57308f | 2022-05-20 10:23:54 +0100 | [diff] [blame] | 329 | }; |
| 330 | }; |
| 331 | }; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 332 | |
| 333 | # Some programs need SUID wrappers, can be configured further or are |
| 334 | # started in user sessions. |
| 335 | programs.mtr.enable = true; |
| 336 | programs.kdeconnect.enable = true; |
| 337 | programs.gnupg.agent = { |
| 338 | enable = true; |
| 339 | enableSSHSupport = true; |
| 340 | }; |
| 341 | |
| 342 | # List services that you want to enable: |
| 343 | |
| 344 | # Enable the OpenSSH daemon. |
| 345 | services.openssh.enable = true; |
| 346 | services.keybase.enable = true; |
| 347 | services.kbfs.enable = true; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 348 | services.gnome.gnome-keyring.enable = true; |
| 349 | services.i2p.enable = true; |
| 350 | services.tlp.enable = true; |
| 351 | |
| 352 | virtualisation.docker.enable = true; |
| 353 | virtualisation.docker.enableOnBoot = false; |
| 354 | virtualisation.libvirtd.enable = true; |
| 355 | virtualisation.libvirtd.onBoot = "ignore"; |
| 356 | |
| 357 | hardware.bluetooth.enable = true; |
| 358 | |
| 359 | environment.pathsToLink = [ "/share/zsh" "/libexec" ]; |
| 360 | |
| 361 | virtualisation.libvirtd.qemu.package = pkgs.qemu_kvm; |
| 362 | virtualisation.kvmgt.enable = true; |
| 363 | |
| 364 | services.openvpn.servers = { |
Skyler Grey | 5ac334e | 2022-06-01 00:18:23 +0100 | [diff] [blame] | 365 | clicks = { config = '' config /home/minion/Nix/secrets/clicks/client.ovpn ''; autoStart = false; }; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 366 | }; |
| 367 | |
| 368 | environment.etc = { |
| 369 | "pam.d/swaylock" = { |
| 370 | mode = "0644"; |
| 371 | text = '' |
| 372 | auth include login |
| 373 | ''; |
| 374 | }; |
| 375 | }; |
| 376 | |
Skyler Grey | d88fc1e | 2022-05-20 21:06:16 +0100 | [diff] [blame] | 377 | nixpkgs.overlays = [ |
| 378 | (self: super: { |
| 379 | steam = super.steam.override { |
| 380 | extraPkgs = pkgs: with pkgs; [ |
| 381 | cups |
| 382 | ]; |
| 383 | }; |
Skyler Grey | 33b23e3 | 2022-05-19 06:42:03 +0100 | [diff] [blame] | 384 | # polkit = super.polkit.overrideAttrs (oldAttrs: { |
| 385 | # patches = oldAttrs.patches ++ [ |
| 386 | # (super.fetchpatch { |
| 387 | # url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/716a273ce0af467968057f3e107156182bd290b0.patch"; |
| 388 | # sha256 = "sha256-hOJJhUmxXm87W1ZU9Y1NJ8GCyKvPjbIVtCHlhRGlN8k="; |
| 389 | # })]; |
| 390 | # }); |
Skyler Grey | d88fc1e | 2022-05-20 21:06:16 +0100 | [diff] [blame] | 391 | }) |
Skyler Grey | 2bad969 | 2022-06-06 19:03:16 +0100 | [diff] [blame] | 392 | ] ++ map (f: import f) overlays ++ [ |
| 393 | (self: (super: builtins.listToAttrs ( |
| 394 | map (f: { |
| 395 | name = builtins.elemAt (builtins.match "^(.*/)*(.*)\\.nix$" (toString f)) 1; |
| 396 | value = super.lib.callPackageWith (self) (import f) {}; |
| 397 | }) packages |
| 398 | ))) |
| 399 | nurpkgs.overlay |
Skyler Grey | d88fc1e | 2022-05-20 21:06:16 +0100 | [diff] [blame] | 400 | ]; |
Skyler Grey | 4e10d63 | 2022-05-18 21:55:27 +0100 | [diff] [blame] | 401 | |
| 402 | xdg.mime.defaultApplications = { |
| 403 | "text/html" = "chromium-browser.desktop"; |
| 404 | "x-scheme-handler/http" = "chromium-browser.desktop"; |
| 405 | "x-scheme-handler/https" = "chromium-browser.desktop"; |
| 406 | "x-scheme-handler/about" = "chromium-browser.desktop"; |
| 407 | "x-scheme-handler/unknown" = "chromium-browser.desktop"; |
| 408 | }; |
| 409 | |
| 410 | # environment.sessionsVariables.DEFAULT_BROWSER = "${pkgs.chromium}/bin/chromium"; |
| 411 | |
| 412 | |
| 413 | boot.supportedFilesystems = [ "kbfs" ]; |
| 414 | |
| 415 | # This value determines the NixOS release from which the default |
| 416 | # settings for stateful data, like file locations and database versions |
| 417 | # on your system were taken. It‘s perfectly fine and recommended to leave |
| 418 | # this value at the release version of the first install of this system. |
| 419 | # Before changing this value read the documentation for this option |
| 420 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). |
| 421 | system.stateVersion = "21.11"; # Did you read the comment? |
| 422 | |
| 423 | boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; |
| 424 | boot.initrd.kernelModules = [ ]; |
| 425 | boot.kernelModules = [ "kvm-intel" ]; |
| 426 | # boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ]; # Broken in nixpkgs; seems to be mountable and usable anyway |
| 427 | |
| 428 | fileSystems."/" = |
| 429 | { device = "/dev/disk/by-label/nixos"; |
| 430 | fsType = "ext4"; |
| 431 | }; |
| 432 | |
| 433 | fileSystems."/boot" = |
| 434 | { device = "/dev/disk/by-label/boot"; |
| 435 | fsType = "vfat"; |
| 436 | }; |
| 437 | |
| 438 | swapDevices = |
| 439 | [ { device = "/dev/disk/by-label/swap"; } |
| 440 | ]; |
| 441 | |
| 442 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; |
| 443 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; |
| 444 | |
| 445 | # hardware.nvidia.modesetting.enable = true; |
| 446 | # services.xserver.videoDrivers = [ "nvidia" ]; |
| 447 | |
| 448 | # hardware.opentabletdriver.enable = true; |
| 449 | |
| 450 | virtualisation.containerd.enable = true; |
| 451 | |
| 452 | virtualisation.containerd.settings = { |
| 453 | version = 2; |
| 454 | # grpc = { |
| 455 | # uid = 1000; |
| 456 | # }; |
| 457 | }; |
| 458 | |
| 459 | networking.hostName = "python"; |
| 460 | |
| 461 | networking.wireless.iwd.enable = true; |
| 462 | networking.wireless.iwd.settings = { |
| 463 | Settings = { |
| 464 | AutoConnect = true; |
| 465 | AlwaysRandomizeAddress = true; |
| 466 | }; |
| 467 | }; |
| 468 | } |