blob: ac743fbf5aca9a924d2bbeff637eed8b1b333f21 [file] [log] [blame]
Skyler Grey53aad5e2022-07-24 20:19:08 +01001{ pkgs, pkgs-unstable, nurpkgs, registry, lib, modulesPath, config, ... }:
Skyler Grey4e10d632022-05-18 21:55:27 +01002let
Skyler Grey2577b192022-05-19 06:51:08 +01003 nixScripts = import ./utils/nixFilesIn.nix lib ./nix/system;
Skyler Greyed68b702022-05-27 23:00:07 +01004 nixApps = import ./utils/nixFilesIn.nix lib ./apps/system;
Skyler Grey2bad9692022-06-06 19:03:16 +01005 overlays = import ./utils/nixFilesIn.nix lib ./overlays;
6 packages = import ./utils/nixFilesIn.nix lib ./packages;
Skyler Grey4e10d632022-05-18 21:55:27 +01007in {
Skyler Greyed68b702022-05-27 23:00:07 +01008 imports = nixScripts ++ nixApps ++ [ (modulesPath + "/installer/scan/not-detected.nix") ];
Skyler Grey4e10d632022-05-18 21:55:27 +01009
10
11 # Prepare nix flakes
12 nix = {
Skyler Grey82e00702022-08-19 15:59:30 +010013 package = pkgs-unstable.nixFlakes;
14 settings = {
15 experimental-features = [ "nix-command" "flakes" ];
16 auto-optimise-store = true;
17 keep-outputs = true;
18 flake-registry = "${registry}/flake-registry.json";
19 extra-sandbox-paths = [ "/homeless-shelter/.ccache" ];
20 };
21 gc.automatic = true;
22 gc.options = "--delete-older-than 7d";
Skyler Grey4e10d632022-05-18 21:55:27 +010023 };
24
Skyler Grey4ce5c242022-07-26 08:24:45 +010025 programs.ccache = {
Skyler Grey82e00702022-08-19 15:59:30 +010026 enable = true;
Skyler Grey4ce5c242022-07-26 08:24:45 +010027# packageNames = [ "nix" ];
Skyler Grey82e00702022-08-19 15:59:30 +010028cacheDir = "/homeless-shelter/.ccache";
Skyler Grey4ce5c242022-07-26 08:24:45 +010029 };
Skyler Greydbd6c492022-07-25 08:09:09 +010030
Skyler Grey4e10d632022-05-18 21:55:27 +010031 # Use the systemd-boot EFI boot loader.
32 boot.loader.systemd-boot.enable = true;
33 boot.loader.efi.canTouchEfiVariables = true;
34 boot.loader.grub.useOSProber = true;
35
36 # Enable emulated systems
37 boot.binfmt.emulatedSystems = [ "aarch64-linux" "armv6l-linux" ];
38
39 boot.resumeDevice = "/dev/nvme0n1p5";
40
41 # Enable apparmor
42 security.apparmor.enable = true;
43 security.apparmor.killUnconfinedConfinables = true;
44
45 # Set your time zone.
46 time.timeZone = "Europe/London";
47
48 # Select internationalisation properties.
49 i18n.defaultLocale = "en_US.UTF-8";
50 console = {
Skyler Grey82e00702022-08-19 15:59:30 +010051 font = "Lat2-Terminus16";
52 keyMap = "uk";
Skyler Grey4e10d632022-05-18 21:55:27 +010053 };
54
55 # Enable the X11 windowing system.
56 services.xserver = {
Skyler Grey82e00702022-08-19 15:59:30 +010057 enable = true;
58 desktopManager = {
59 xterm.enable = false;
Skyler Grey4e10d632022-05-18 21:55:27 +010060 # xfce.enable = true;
Skyler Grey4e10d632022-05-18 21:55:27 +010061 };
Skyler Grey82e00702022-08-19 15:59:30 +010062 displayManager.startx.enable = true;
63 # displayManager.sddm.enable = true;
64};
Skyler Grey4e10d632022-05-18 21:55:27 +010065
Skyler Grey82e00702022-08-19 15:59:30 +010066services.zeronet.enable = true;
67services.zeronet.package = pkgs.zeronet-conservancy;
Skyler Grey4e10d632022-05-18 21:55:27 +010068
Skyler Grey82e00702022-08-19 15:59:30 +010069services.arbtt = {
Skyler Greyf11bbb62022-07-29 08:55:08 +010070 enable = true;
71 sampleRate = 30;
Skyler Grey82e00702022-08-19 15:59:30 +010072};
Skyler Greyf11bbb62022-07-29 08:55:08 +010073
Skyler Grey82e00702022-08-19 15:59:30 +010074services = {
Skyler Grey4e10d632022-05-18 21:55:27 +010075 syncthing = {
76 enable = true;
77 user = "minion";
78 dataDir = "/home/minion/Documents"; # Default folder for new synced folders
79 configDir = "/home/minion/.config/syncthing"; # Folder for Syncthing's settings and keys
80 };
Skyler Grey82e00702022-08-19 15:59:30 +010081};
Skyler Grey4e10d632022-05-18 21:55:27 +010082
83 # And wayland
Skyler Grey82e00702022-08-19 15:59:30 +010084 /* programs.sway = {
85 enable = true;
86 wrapperFeatures.gtk = true; # so that gtk works properly
87 extraPackages = with pkgs; [
88 swaylock
89 swayidle
90 wl-clipboard
91 mako # notification daemon
92 alacritty # Alacritty is the default terminal in the config
93 ];
Skyler Grey4e10d632022-05-18 21:55:27 +010094 };*/
95
Skyler Greybf042332022-05-24 16:39:26 +010096 programs.light.enable = true; # Needs udev rules to properly work
97
Skyler Grey4e10d632022-05-18 21:55:27 +010098 programs.qt5ct = {
Skyler Grey82e00702022-08-19 15:59:30 +010099 enable = true;
Skyler Grey4e10d632022-05-18 21:55:27 +0100100 };
101# programs.waybar.enable = false; # true;
102
103 # Get screensharing to work
104 xdg = {
Skyler Grey82e00702022-08-19 15:59:30 +0100105 portal = {
106 enable = true;
107 wlr.enable = true;
108 };
Skyler Grey4e10d632022-05-18 21:55:27 +0100109 };
110
111 systemd.user.services.xdg-desktop-portal = {
Skyler Grey82e00702022-08-19 15:59:30 +0100112 unitConfig = {
113 After = "graphical-session.target";
114 };
Skyler Grey4e10d632022-05-18 21:55:27 +0100115 };
116
117 # Configure keymap in X11
118 services.xserver.layout = "gb";
119 # services.xserver.xkbOptions = "eurosign:e";
120 services.upower.enable = true;
121
122 # Permit and install steam
123 nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
Skyler Grey82e00702022-08-19 15:59:30 +0100124 "steam"
125 "steam-original"
126 "steam-runtime"
127 "mongodb"
128 "nvidia-x11"
129 "nvidia-settings"
Skyler Grey4e10d632022-05-18 21:55:27 +0100130 ];
131
132 programs.steam.enable = true;
133
134
135 # Enable CUPS to print documents.
136 services.printing.enable = true;
137
138 # Enable sound.
139 sound.enable = true;
140 hardware.pulseaudio.enable = false;
141 services.pipewire = {
Skyler Grey4e10d632022-05-18 21:55:27 +0100142 enable = true;
Skyler Grey82e00702022-08-19 15:59:30 +0100143 alsa = {
144 enable = true;
145 support32Bit = true;
146 };
147 pulse.enable = true;
148 /*config.pipewire = {
149 "context.modules" = [
150 {
151 name = "libpipewire-module-filter-chain";
152 args = {
153 "node.name" = "effect_output.virtual-surround-7.1-hesuvi";
154 "node.description" = "Virtual Surround Sink";
155 "media.name" = "Virtual Surround Sink";
156 nodes = [
Skyler Grey4e10d632022-05-18 21:55:27 +0100157 # duplicate inputs
158 { type = "builtin"; label = "copy"; name = "copyFL"; }
159 { type = "builtin"; label = "copy"; name = "copyFR"; }
160 { type = "builtin"; label = "copy"; name = "copyFC"; }
161 { type = "builtin"; label = "copy"; name = "copyRL"; }
162 { type = "builtin"; label = "copy"; name = "copyRR"; }
163 { type = "builtin"; label = "copy"; name = "copySL"; }
164 { type = "builtin"; label = "copy"; name = "copySR"; }
165 { type = "builtin"; label = "copy"; name = "copyLFE"; }
166
167 # apply hrir - HeSuVi 14-channel WAV (not the *-.wav variants) (note: 44 in HeSuVi are the same, but resampled to 44100)
168 { type = "builtin"; label = "convolver"; name = "convFL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 0; }; }
169 { type = "builtin"; label = "convolver"; name = "convFL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 1; }; }
170 { type = "builtin"; label = "convolver"; name = "convSL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 2; }; }
171 { type = "builtin"; label = "convolver"; name = "convSL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 3; }; }
172 { type = "builtin"; label = "convolver"; name = "convRL_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 4; }; }
173 { type = "builtin"; label = "convolver"; name = "convRL_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 5; }; }
174 { type = "builtin"; label = "convolver"; name = "convFC_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 6; }; }
175 { type = "builtin"; label = "convolver"; name = "convFR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 7; }; }
176 { type = "builtin"; label = "convolver"; name = "convFR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 8; }; }
177 { type = "builtin"; label = "convolver"; name = "convSR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 9; }; }
178 { type = "builtin"; label = "convolver"; name = "convSR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 10; }; }
179 { type = "builtin"; label = "convolver"; name = "convRR_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 11; }; }
180 { type = "builtin"; label = "convolver"; name = "convRR_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 12; }; }
181 { type = "builtin"; label = "convolver"; name = "convFC_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 13; }; }
182
183 # treat LFE as FC
184 { type = "builtin"; label = "convolver"; name = "convLFE_R"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 13; }; }
185 { type = "builtin"; label = "convolver"; name = "convLFE_L"; config = { filename = "hrir_hesuvi/hrir.wav"; channel = 6; }; }
186
187 # stereo output
188 { type = "builtin"; label = "mixer"; name = "mixR"; }
189 { type = "builtin"; label = "mixer"; name = "mixL"; }
Skyler Grey82e00702022-08-19 15:59:30 +0100190 ];
191 links = [
Skyler Grey4e10d632022-05-18 21:55:27 +0100192 # input
193 { output = "copyFL:Out"; input="convFL_L:In"; }
194 { output = "copyFL:Out"; input="convFL_R:In"; }
195 { output = "copySL:Out"; input="convSL_L:In"; }
196 { output = "copySL:Out"; input="convSL_R:In"; }
197 { output = "copyRL:Out"; input="convRL_L:In"; }
198 { output = "copyRL:Out"; input="convRL_R:In"; }
199 { output = "copyFC:Out"; input="convFC_L:In"; }
200 { output = "copyFR:Out"; input="convFR_R:In"; }
201 { output = "copyFR:Out"; input="convFR_L:In"; }
202 { output = "copySR:Out"; input="convSR_R:In"; }
203 { output = "copySR:Out"; input="convSR_L:In"; }
204 { output = "copyRR:Out"; input="convRR_R:In"; }
205 { output = "copyRR:Out"; input="convRR_L:In"; }
206 { output = "copyFC:Out"; input="convFC_R:In"; }
207 { output = "copyLFE:Out"; input="convLFE_L:In"; }
208 { output = "copyLFE:Out"; input="convLFE_R:In"; }
209
210 # output
211 { output = "convFL_L:Out"; input="mixL:In 1"; }
212 { output = "convFL_R:Out"; input="mixR:In 1"; }
213 { output = "convSL_L:Out"; input="mixL:In 2"; }
214 { output = "convSL_R:Out"; input="mixR:In 2"; }
215 { output = "convRL_L:Out"; input="mixL:In 3"; }
216 { output = "convRL_R:Out"; input="mixR:In 3"; }
217 { output = "convFC_L:Out"; input="mixL:In 4"; }
218 { output = "convFC_R:Out"; input="mixR:In 4"; }
219 { output = "convFR_R:Out"; input="mixR:In 5"; }
220 { output = "convFR_L:Out"; input="mixL:In 5"; }
221 { output = "convSR_R:Out"; input="mixR:In 6"; }
222 { output = "convSR_L:Out"; input="mixL:In 6"; }
223 { output = "convRR_R:Out"; input="mixR:In 7"; }
224 { output = "convRR_L:Out"; input="mixL:In 7"; }
225 { output = "convLFE_R:Out"; input="mixR:In 8"; }
226 { output = "convLFE_L:Out"; input="mixL:In 8"; }
Skyler Grey82e00702022-08-19 15:59:30 +0100227 ];
228 inputs = [ "copyFL:In" "copyFR:In" "copyFC:In" "copyLFE:In" "copyRL:In" "copyRR:In" "copySL:In" "copySR:In" ];
229 outputs = [ "mixL:Out" "mixR:Out" ];
230 };
231 "capture.props" = {
232 "media.class" = "Audio/Sink";
233 "audio.channels" = 8;
234 "audio.position" = [ "FL" "FR" "FC" "LFE" "RL" "RR" "SL" "SR" ];
235 };
236 "playback.props" = {
237 "node.passive" = true;
238 "audio.channels" = 2;
239 "audio.position" = [ "FL" "FR" ];
240 };
241 }
Skyler Grey4e10d632022-05-18 21:55:27 +0100242 ];
Skyler Grey82e00702022-08-19 15:59:30 +0100243 };*/
Skyler Grey4e10d632022-05-18 21:55:27 +0100244 };
245 environment.etc."pipewire/7.1-surround-sound.conf".source = ./pipewire/7.1-surround-sound.conf;
246
247 hardware.openrazer.enable = true;
248 hardware.openrazer.users = [ "minion" ];
249
250 hardware.steam-hardware.enable = true;
251
252 # Enable touchpad support (enabled default in most desktopManager).
253 services.xserver.libinput.enable = true;
254
255 programs.dconf.enable = true;
256
257 # Define a user account. Don't forget to set a password with ‘passwd’.
258 users.users.minion = {
Skyler Grey82e00702022-08-19 15:59:30 +0100259 isNormalUser = true;
260 extraGroups = [ "wheel" "kvm" "docker" "containerd" "dialout" "libvirtd" "video" config.users.groups.keys.name ]; # Enable ‘sudo’ for the user.
261 shell = pkgs.zsh;
Skyler Grey4e10d632022-05-18 21:55:27 +0100262 };
263
264 programs.zsh.enable = true;
265
Skyler Greye9049062022-06-15 12:51:57 +0100266 environment.variables = {
Skyler Grey82e00702022-08-19 15:59:30 +0100267 EDITOR = "${pkgs.vim}/bin/vim";
Skyler Greye9049062022-06-15 12:51:57 +0100268 };
269 environment.defaultPackages = [
Skyler Grey82e00702022-08-19 15:59:30 +0100270 pkgs.perl
271 pkgs.rsync
272 pkgs.strace
273 pkgs.vim # I'm installing vim here even though it isn't normally a default package, as I've removed nano
Skyler Greye9049062022-06-15 12:51:57 +0100274 ]; # The basic default packages, although without nano
275
Skyler Grey4e10d632022-05-18 21:55:27 +0100276 # List packages installed in system profile. To search, run:
277 # $ nix search wget
278 environment.systemPackages = with pkgs; [
Skyler Grey82e00702022-08-19 15:59:30 +0100279 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
280 ((emacsPackagesFor emacs).emacsWithPackages (epkgs: [
281 epkgs.vterm
282 epkgs.emacsql-sqlite
283 ])) # Emacs + vterm-module (needed for vterm)
284 wget
285 firefox
286 chromium # Install chromium if needed
287 texlive.combined.scheme-full
288 keybase-gui
289 bluez
290 macchanger
291 comic-relief
292 qemu_kvm
293 gtk-engine-murrine
294 gtk_engines
295 gsettings-desktop-schemas
296 lxappearance
297 libsForQt5.qt5.qtwayland
298 qt6.qtwayland
299 texworks
300 wlogout
301 wob
302 wlsunset
303 cni-plugins
304 ccache
305 sops
Skyler Greyc9ba9bf2022-05-18 22:11:33 +0100306 ];
Skyler Grey4e10d632022-05-18 21:55:27 +0100307
308# environment.systemPackages = [
309# import /scripts/jetbrains.rider.nix
310# ];
311
Skyler Grey82e00702022-08-19 15:59:30 +0100312nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WebUIDarkMode --force-dark-mode --enable-features=WebRTCPipeWireCapturer"; # --enable-gpu";
Skyler Grey8dd715f2022-05-24 21:45:06 +0100313
Skyler Grey4e10d632022-05-18 21:55:27 +0100314
Skyler Grey82e00702022-08-19 15:59:30 +0100315fonts = {
Skyler Greyc57308f2022-05-20 10:23:54 +0100316 fonts = with pkgs; [
Skyler Grey82e00702022-08-19 15:59:30 +0100317 font-awesome
318 line-awesome
319 material-design-icons
320 weather-icons
321 emacs-all-the-icons-fonts
322 powerline-symbols
323 noto-fonts
324 noto-fonts-cjk
325 noto-fonts-emoji
326 liberation_ttf
327 fira-code
328 fira-code-symbols
329 mplus-outline-fonts.githubRelease
330 dina-font
331 proggyfonts
332 roboto
333 roboto-mono
334 roboto-slab
335 twitter-color-emoji
336 twemoji-color-font
337 ubuntu_font_family
Skyler Greyc57308f2022-05-20 10:23:54 +0100338 ];
339
340 enableDefaultFonts = true;
Skyler Grey63786912022-05-20 11:31:40 +0100341 fontDir.enable = true;
Skyler Greyc57308f2022-05-20 10:23:54 +0100342
343 fontconfig = {
Skyler Grey82e00702022-08-19 15:59:30 +0100344 defaultFonts = {
345 serif = [ "Roboto Slab" ];
346 sansSerif = [ "Roboto" "Ubuntu" ];
347 monospace = [ "Roboto Mono" "Ubuntu Mono" ];
348 emoji = [ "Twitter Color Emoji" ];
349 };
Skyler Greyc57308f2022-05-20 10:23:54 +0100350 };
Skyler Grey82e00702022-08-19 15:59:30 +0100351};
Skyler Grey4e10d632022-05-18 21:55:27 +0100352
353 # Some programs need SUID wrappers, can be configured further or are
354 # started in user sessions.
355 programs.mtr.enable = true;
356 programs.kdeconnect.enable = true;
357 programs.gnupg.agent = {
Skyler Grey82e00702022-08-19 15:59:30 +0100358 enable = true;
359 enableSSHSupport = true;
Skyler Grey4e10d632022-05-18 21:55:27 +0100360 };
361
362 # List services that you want to enable:
363
364 # Enable the OpenSSH daemon.
365 services.openssh.enable = true;
366 services.keybase.enable = true;
367 services.kbfs.enable = true;
Skyler Grey4e10d632022-05-18 21:55:27 +0100368 services.gnome.gnome-keyring.enable = true;
369 services.i2p.enable = true;
370 services.tlp.enable = true;
371
372 virtualisation.docker.enable = true;
373 virtualisation.docker.enableOnBoot = false;
374 virtualisation.libvirtd.enable = true;
375 virtualisation.libvirtd.onBoot = "ignore";
376
377 hardware.bluetooth.enable = true;
378
379 environment.pathsToLink = [ "/share/zsh" "/libexec" ];
380
381 virtualisation.libvirtd.qemu.package = pkgs.qemu_kvm;
382 virtualisation.kvmgt.enable = true;
383
384 services.openvpn.servers = {
Skyler Grey82e00702022-08-19 15:59:30 +0100385 clicks = { config = '' config /home/minion/Nix/secrets/clicks/client.ovpn ''; autoStart = false; };
Skyler Grey4e10d632022-05-18 21:55:27 +0100386 };
387
388 environment.etc = {
Skyler Grey82e00702022-08-19 15:59:30 +0100389 "pam.d/swaylock" = {
390 mode = "0644";
391 text = ''
392 auth include login
393 '';
394 };
Skyler Grey4e10d632022-05-18 21:55:27 +0100395 };
396
Skyler Greyd88fc1e2022-05-20 21:06:16 +0100397 nixpkgs.overlays = [
Skyler Grey82e00702022-08-19 15:59:30 +0100398 (self: super: {
399 steam = super.steam.override {
400 extraPkgs = pkgs: with pkgs; [
401 cups
402 libxml2
403 ];
404 };
Skyler Grey33b23e32022-05-19 06:42:03 +0100405# polkit = super.polkit.overrideAttrs (oldAttrs: {
406# patches = oldAttrs.patches ++ [
407# (super.fetchpatch {
408# url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/716a273ce0af467968057f3e107156182bd290b0.patch";
409# sha256 = "sha256-hOJJhUmxXm87W1ZU9Y1NJ8GCyKvPjbIVtCHlhRGlN8k=";
410# })];
411# });
Skyler Greyd88fc1e2022-05-20 21:06:16 +0100412 })
Skyler Grey82e00702022-08-19 15:59:30 +0100413] ++ map (f: import f) overlays ++ [
Skyler Grey2bad9692022-06-06 19:03:16 +0100414 (self: (super: builtins.listToAttrs (
Skyler Grey82e00702022-08-19 15:59:30 +0100415 map (f: {
416 name = builtins.elemAt (builtins.match "^(.*/)*(.*)\\.nix$" (toString f)) 1;
417 value = super.lib.callPackageWith (self) (import f) {};
418 }) packages
419 )))
420 nurpkgs.overlay
421 ];
Skyler Grey4e10d632022-05-18 21:55:27 +0100422
Skyler Grey82e00702022-08-19 15:59:30 +0100423 xdg.mime.defaultApplications = {
424 "text/html" = "chromium-browser.desktop";
425 "x-scheme-handler/http" = "chromium-browser.desktop";
426 "x-scheme-handler/https" = "chromium-browser.desktop";
427 "x-scheme-handler/about" = "chromium-browser.desktop";
428 "x-scheme-handler/unknown" = "chromium-browser.desktop";
429 };
Skyler Grey4e10d632022-05-18 21:55:27 +0100430
431 # environment.sessionsVariables.DEFAULT_BROWSER = "${pkgs.chromium}/bin/chromium";
432
433
434 boot.supportedFilesystems = [ "kbfs" ];
435
436 # This value determines the NixOS release from which the default
437 # settings for stateful data, like file locations and database versions
438 # on your system were taken. It‘s perfectly fine and recommended to leave
439 # this value at the release version of the first install of this system.
440 # Before changing this value read the documentation for this option
441 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
442 system.stateVersion = "21.11"; # Did you read the comment?
443
Skyler Grey82e00702022-08-19 15:59:30 +0100444 boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
Skyler Grey4e10d632022-05-18 21:55:27 +0100445 boot.initrd.kernelModules = [ ];
Skyler Greya40f5cd2022-08-05 08:30:47 +0100446 boot.kernelModules = [ "kvm-intel" "usbcore" ];
Skyler Grey4e10d632022-05-18 21:55:27 +0100447# boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ]; # Broken in nixpkgs; seems to be mountable and usable anyway
Skyler Grey82e00702022-08-19 15:59:30 +0100448boot.extraModprobeConfig = ''
449options usbcore use_both_schemes=y
450'';
Skyler Grey4e10d632022-05-18 21:55:27 +0100451
Skyler Grey82e00702022-08-19 15:59:30 +0100452fileSystems."/" =
Skyler Grey4e10d632022-05-18 21:55:27 +0100453 { device = "/dev/disk/by-label/nixos";
Skyler Grey82e00702022-08-19 15:59:30 +0100454 fsType = "ext4";
455};
Skyler Grey4e10d632022-05-18 21:55:27 +0100456
Skyler Grey82e00702022-08-19 15:59:30 +0100457fileSystems."/boot" =
Skyler Grey4e10d632022-05-18 21:55:27 +0100458 { device = "/dev/disk/by-label/boot";
Skyler Grey82e00702022-08-19 15:59:30 +0100459 fsType = "vfat";
460};
Skyler Grey4e10d632022-05-18 21:55:27 +0100461
Skyler Grey82e00702022-08-19 15:59:30 +0100462swapDevices =
Skyler Grey4e10d632022-05-18 21:55:27 +0100463 [ { device = "/dev/disk/by-label/swap"; }
Skyler Grey82e00702022-08-19 15:59:30 +0100464];
Skyler Grey4e10d632022-05-18 21:55:27 +0100465
Skyler Grey82e00702022-08-19 15:59:30 +0100466powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
467hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
Skyler Grey4e10d632022-05-18 21:55:27 +0100468
469# hardware.nvidia.modesetting.enable = true;
470# services.xserver.videoDrivers = [ "nvidia" ];
471
472# hardware.opentabletdriver.enable = true;
473
Skyler Grey82e00702022-08-19 15:59:30 +0100474virtualisation.containerd.enable = true;
Skyler Grey4e10d632022-05-18 21:55:27 +0100475
Skyler Grey82e00702022-08-19 15:59:30 +0100476virtualisation.containerd.settings = {
Skyler Grey4e10d632022-05-18 21:55:27 +0100477 version = 2;
478# grpc = {
479# uid = 1000;
480# };
481 };
482
Skyler Grey82e00702022-08-19 15:59:30 +0100483 sops.defaultSopsFile = ../secrets/secrets.json;
484
485 sops.secrets = {
486 collabora-password = {
487 mode = "0400";
488 owner = config.users.users.minion.name;
489 group = config.users.users.nobody.group;
490 };
491 };
492
Skyler Grey4e10d632022-05-18 21:55:27 +0100493 networking.hostName = "python";
494
495 networking.wireless.iwd.enable = true;
496 networking.wireless.iwd.settings = {
Skyler Grey82e00702022-08-19 15:59:30 +0100497 Settings = {
498 AutoConnect = true;
499 AlwaysRandomizeAddress = true;
500 };
Skyler Grey4e10d632022-05-18 21:55:27 +0100501 };
Skyler Greye9fbc9e2022-07-29 09:35:14 +0100502 networking.search = [
Skyler Grey82e00702022-08-19 15:59:30 +0100503 "python.local"
Skyler Greye9fbc9e2022-07-29 09:35:14 +0100504 ];
Skyler Grey4e10d632022-05-18 21:55:27 +0100505}