diff options
| Commit | 2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b (patch) | |
|---|---|---|
| Author | 2024-07-07 11:07:47 +0300 | |
| Committer | 2024-07-07 11:07:47 +0300 | |
| Files | 7a28fdffde253f112159b89e922e7a07a4035bc0 /machines/vesta/hardware-configuration.nix | |
| nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.tar nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.tar.gz nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.zip | ||
| Parent | 78eaa0ccb01720bb91ffe6af1a0db93ab9408317 (diff) | |
[machines] Updated sysidentity and moved stuff from configuration to hardware-configuration
1 files changed, 55 insertions, 5 deletions
| -rw-r--r-- | machines/vesta/hardware-configuration.nix | 60 |
diff --git a/machines/vesta/hardware-configuration.nix b/machines/vesta/hardware-configuration.nix index 39158d6..46faca7 100644 --- a/machines/vesta/hardware-configuration.nix +++ b/machines/vesta/hardware-configuration.nix @@ -1,6 +1,4 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. +# Machine-specific kernel, cpu, gpu and file system settings { config, lib, pkgs, modulesPath, ... }: { @@ -10,7 +8,7 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-intel" "amdgpu" ]; boot.extraModulePackages = [ ]; fileSystems."/" = @@ -28,7 +26,19 @@ fsType = "ext4"; }; - swapDevices = [ ]; + fileSystems."/mnt/Svalbard" = + { device = "/dev/disk/by-uuid/5bd27e26-5b83-4485-ab3f-bcfbbd2b40d5"; + fsType = "ext4"; + options = [ "defaults" "x-gvfs-show" ]; + }; + + fileSystems."/mnt/Norilsk" = + { device = "/dev/disk/by-uuid/689f863a-5026-42ff-aecc-3195e8d8c684"; + fsType = "ext4"; + options = [ "defaults" "x-gvfs-show" ]; + }; + + swapDevices = [ { device = "/home/swapfile"; size = 24 * 1024; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -39,4 +49,44 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # GPU + # There is a potential bug with amdgpu driver (https://bugzilla.mozilla.org/show_bug.cgi?id=1437520#c4) + # Remember to disable VAAPI for this machine in Firefox: media.ffmpeg.vaapi.enabled = false (https://wiki.archlinux.org/title/Firefox#Hardware_video_acceleration) + + #boot.initrd.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + + boot.kernelParams = [ + "radeon.si_support=0" "amdgpu.si_support=1" # for Southern Islands (SI ie. GCN 1) cards + "libata.force=2.00:nodmalog" # Eliminate "qc timeout" 15 second boot delay for /home SSD + ]; + # systemd.tmpfiles.rules = [ + # "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + # ]; + hardware.opengl = { + # Mesa + enable = true; + + extraPackages = with pkgs; [ + # OpenCL + # rocmPackages.clr + # VA-API + libva + # AMDVLK + # amdvlk + ]; + # extraPackages32 = with pkgs; [ + # driversi686Linux.amdvlk + # ]; + + # Vulkan + driSupport = true; + # For 32 bit applications + driSupport32Bit = true; + }; + # system.replaceRuntimeDependencies = [ + # ({ original = pkgs.mesa; replacement = (import /srv/nixpkgs-mesa { }).pkgs.mesa; }) + # ({ original = pkgs.mesa.drivers; replacement = (import /srv/nixpkgs-mesa { }).pkgs.mesa.drivers; }) + # ]; } |
