From 5e81e4814d6da25ce8531baf0bc2d23da7fc26b3 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 5 Jan 2023 04:22:04 +0300 Subject: 2023-01-05 --- nixosConfigurations/default.nix | 1 + nixosConfigurations/eonwe/default.nix | 49 +++++++++++++++++++++++++-------- nixosConfigurations/iso/default.nix | 3 +- nixosConfigurations/manwe/default.nix | 4 --- nixosConfigurations/melian/default.nix | 34 +++++++++-------------- nixosConfigurations/varda/default.nix | 4 --- nixosConfigurations/yavanna/default.nix | 16 ++++++++--- 7 files changed, 64 insertions(+), 47 deletions(-) (limited to 'nixosConfigurations') diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix index 1ca634a..fe998cd 100644 --- a/nixosConfigurations/default.nix +++ b/nixosConfigurations/default.nix @@ -69,6 +69,7 @@ in # A beefy desktop: 7950x/rx6750xt/128GB. eonwe.modules = with inputs; [ nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd nixpkgs.nixosModules.notDetected diff --git a/nixosConfigurations/eonwe/default.nix b/nixosConfigurations/eonwe/default.nix index a867837..f07aad3 100644 --- a/nixosConfigurations/eonwe/default.nix +++ b/nixosConfigurations/eonwe/default.nix @@ -15,6 +15,7 @@ with lib; { games = { lutris.enable = true; + minecraft.client.enable = true; steam.enable = true; }; android.enable = true; @@ -25,8 +26,12 @@ with lib; { }; hm.programs = { - firefox.profiles.default.settings."media.ffmpeg.vaapi.enabled" = true; + # NOTE This produces very poor performance even though RX 6750 XT should + # handle VA-API hardware decoding for all major formats (including AV1) just + # fine. + firefox.profiles.default.settings."media.ffmpeg.vaapi.enabled" = false; + # Mostly just placebo. :^) mpv.config = { hwdec = "vdpau"; vo = "gpu"; @@ -34,6 +39,15 @@ with lib; { }; }; + # Usually stuff that is going to be compiled on this machine is going to have + # parallelisation support enabled, so we will make sure that all cores are + # utilised and limit the job queue to one. + nix.extraOptions = '' + keep-going = true + max-jobs = 1 + cores = 32 + ''; + boot = { # Silence benign MCE errors: # ``` @@ -43,16 +57,26 @@ with lib; { # ``` kernelParams = ["mce=nobootlog"]; - initrd.availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; + # The boot drive is Samsung SSD 980 PRO 2TB. + initrd.kernelModules = ["nvme"]; }; + # TODO Immutable `/' shire on ZFS datasets and snapshots. + # + # Opt-in: + # - /etc/NetworkManager + # - /etc/ssh + # - /home + # - /var/lib/bluetooth + # - /var/lib/iwd + # - /var/lib/log + # + # Investigate: + # - /var/lib/NetworkManager + # - /var/lib/cni + # - /var/lib/containers + # - /var/lib/qemu + fileSystems = { "/boot" = { device = "/dev/disk/by-uuid/FF1E-9CFD"; @@ -66,7 +90,8 @@ with lib; { }; }; - # No swap space is declared here because the system already has 128Gb of RAM. - # I didn't manage to even hit 100Gb mark even when running large - # computations/compiling something big. + # No swap space is declared here because the system already has 128Gb of RAM. :^) + # I've only manage to hit around 100Gb mark when running large + # computations/compiling something big. Pretty sure that a hefty chunk of it + # was just residual cache and it wouldn't make me get to OOM situations. } diff --git a/nixosConfigurations/iso/default.nix b/nixosConfigurations/iso/default.nix index e435d0b..914fea9 100644 --- a/nixosConfigurations/iso/default.nix +++ b/nixosConfigurations/iso/default.nix @@ -7,6 +7,7 @@ with lib; { secrets = mkForce {}; nixfiles.modules = { + common.networking.onlyDefault = true; git.client.enable = true; openssh = { client.enable = true; @@ -21,7 +22,5 @@ with lib; { services.getty.autologinUser = mkForce my.username; - environment.noXlibs = false; - nixpkgs.config.allowBroken = true; } diff --git a/nixosConfigurations/manwe/default.nix b/nixosConfigurations/manwe/default.nix index b8dd324..a079579 100644 --- a/nixosConfigurations/manwe/default.nix +++ b/nixosConfigurations/manwe/default.nix @@ -52,10 +52,6 @@ with lib; { }; initrd.availableKernelModules = [ - "ata_piix" - "sd_mod" - "sr_mod" - "uhci_hcd" "virtio_pci" "virtio_scsi" ]; diff --git a/nixosConfigurations/melian/default.nix b/nixosConfigurations/melian/default.nix index 3ba854c..d7563d7 100644 --- a/nixosConfigurations/melian/default.nix +++ b/nixosConfigurations/melian/default.nix @@ -13,6 +13,8 @@ with lib; { bluetooth.enable = true; throttled.enable = true; + + android.enable = true; }; hardware.trackpoint = { @@ -26,13 +28,17 @@ with lib; { in { enable = true; - # This fixes an issue with not being able to suspend or wake up from suspend - # due to a kernel bug[1]. + # This fixes an issue with not being able to suspend or wake up from + # suspend due to a kernel bug[1] which is still not fixed. + # + # I guess this can also be fixed differently[2], which does look a lot nicer + # but I just can't bother. # # [1]: https://bbs.archlinux.org/viewtopic.php?id=270964 # [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998 # [1]: https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/562484/comments/3 # [1]: https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048 + # [2]: https://linrunner.de/tlp/settings/runtimepm.html powerDownCommands = "${modprobe} -r xhci_pci"; powerUpCommands = "${modprobe} xhci_pci"; }; @@ -40,7 +46,6 @@ with lib; { services = { thinkfan = { enable = true; - settings = { sensors = [ { @@ -52,7 +57,7 @@ with lib; { fans = [{tpacpi = "/proc/acpi/ibm/fan";}]; levels = [ ["level auto" 0 50] - ["level disengaged" 50 32767] + ["level disengaged" 50 32767] # This could annoy some people but IDGAF. ]; }; }; @@ -60,23 +65,10 @@ with lib; { fwupd.enable = true; }; - boot = { - initrd = { - availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; - - luks.devices."root" = { - device = "/dev/disk/by-uuid/c1b46f24-eec0-47d2-a142-75ddfd7bb218"; - allowDiscards = true; - bypassWorkqueues = true; - }; - }; + boot.initrd.luks.devices."root" = { + device = "/dev/disk/by-uuid/c1b46f24-eec0-47d2-a142-75ddfd7bb218"; + allowDiscards = true; + bypassWorkqueues = true; }; fileSystems = { diff --git a/nixosConfigurations/varda/default.nix b/nixosConfigurations/varda/default.nix index 5e0914e..f08194e 100644 --- a/nixosConfigurations/varda/default.nix +++ b/nixosConfigurations/varda/default.nix @@ -26,10 +26,6 @@ with lib; { }; initrd.availableKernelModules = [ - "ata_piix" - "sd_mod" - "sr_mod" - "uhci_hcd" "virtio_pci" "virtio_scsi" ]; diff --git a/nixosConfigurations/yavanna/default.nix b/nixosConfigurations/yavanna/default.nix index e3172a6..d347c61 100644 --- a/nixosConfigurations/yavanna/default.nix +++ b/nixosConfigurations/yavanna/default.nix @@ -20,10 +20,18 @@ with lib; { device = "/dev/sda"; }; - initrd = { - availableKernelModules = ["uhci_hcd" "ahci"]; - kernelModules = ["nvme"]; - }; + # NOTE This is probably not required, but I cannot test this out without + # risking "bricking" my VPS because Kimsufi/OVH doesn't provide a console + # access. This configuration was generated via nixos-infect[1] and at the + # time I didn't bother to test for loaded kernel modules and just left the + # automatically (IIRC) generated `hardware-configuration.nix' as is. + # + # There's, however, no indication that any NVME drives are being used and, + # as the matter of fact, the VPS itself is KVM-shire, so... I'm still not + # going to risk it. + # + # [1]: https://github.com/elitak/nixos-infect + initrd.availableKernelModules = ["nvme"]; }; fileSystems."/" = { -- cgit 1.4.1