Trolli Schmittlauch
1e40e5fa9b
only a temporary mitigation, should hopefully land upstream at some point
102 lines
3.7 KiB
Nix
102 lines
3.7 KiB
Nix
{ config, lib, pkgs, system, ...}:
|
|
let
|
|
unstable = config.inputInjection.flake-inputs.nixos-unstable.legacyPackages.${system};
|
|
in
|
|
{
|
|
imports = [
|
|
../../common
|
|
|
|
./hardware-configuration.nix
|
|
./storage.nix
|
|
./swap.nix
|
|
];
|
|
|
|
networking.hostName = "framenix"; # Define your hostname.
|
|
|
|
# use newer linux-firmware from unstable
|
|
hardware.firmware = lib.mkBefore [ unstable.linux-firmware ];
|
|
|
|
# override tmpdir for daemon
|
|
systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp";
|
|
|
|
# try newer kernels
|
|
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_latest.override {
|
|
argsOverride = rec {
|
|
src = pkgs.fetchurl {
|
|
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
|
|
hash = "sha256-LiNkYsgTJby9MctxxLWKUhsH1hNnGRJNDjyv+FwsXXU=";
|
|
};
|
|
version = "6.8-rc2";
|
|
modDirVersion = "6.8.0-rc2";
|
|
};
|
|
});
|
|
# revert some commits that introduced the clourful graphics artefacts flickering,
|
|
# at least that's the current working hypothesis in https://gitlab.freedesktop.org/drm/amd/-/issues/3097
|
|
boot.kernelPatches = [
|
|
{name = "revert 9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
|
patch = (pkgs.fetchpatch {
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
|
hash = "sha256-5Uu8zxRSQuqE8oymjwPMt/ylsItpkQVDhbrOSMj8g3I=";
|
|
revert = true;
|
|
});}
|
|
{name = "revert 2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
|
patch = (pkgs.fetchpatch {
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
|
hash = "sha256-VtsH6bmwaLxPZ+uXvVE6qVWD2/aIKf9GLuMTNKq6d8M=";
|
|
revert = true;
|
|
});}
|
|
{name = "revert 0a1844bf0b532d84324453374ad6845f64066c28";
|
|
patch = (pkgs.fetchpatch {
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=0a1844bf0b532d84324453374ad6845f64066c28";
|
|
hash = "sha256-Zd2pcYiOmuuzcc7THNtJW/YTjPyzO7HmQYKJNzy9YPw=";
|
|
revert = true;
|
|
});
|
|
# alternatively, 8569c3154538 can be reverted as well
|
|
extraStructuredConfig = with lib.kernel; {
|
|
DRM_I915 = no;
|
|
DRM_I915_GVT = lib.mkForce unset;
|
|
DRM_I915_GVT_KVMGT = lib.mkForce unset;
|
|
};
|
|
}
|
|
];
|
|
|
|
# temporary workaround for white flickering graphics artefacts
|
|
boot.kernelParams = [ "amdgpu.sg_display=0" ];
|
|
|
|
boot.loader = {
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
#
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
#
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
# so changing it will NOT upgrade your system.
|
|
#
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
# out of date, out of support, or vulnerable.
|
|
#
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
# and migrated your data accordingly.
|
|
#
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
services.fwupd.enable = true;
|
|
|
|
# I do not need fingerprint reading
|
|
services.fprintd.enable = false;
|
|
|
|
environment.systemPackages = [
|
|
pkgs.radeontop
|
|
pkgs.framework-tool
|
|
];
|
|
}
|
|
|