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