mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 11:10:42 +00:00
Run alejandra
This commit is contained in:
parent
286920def4
commit
c00134da1c
152 changed files with 827 additions and 721 deletions
|
@ -12,7 +12,7 @@ in {
|
|||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluez5-experimental;
|
||||
powerOnBoot = cfg.powerOnBoot;
|
||||
powerOnBoot = cfg.powerOnBoot;
|
||||
#hsphfpd.enable = true;
|
||||
disabledPlugins = ["sap"];
|
||||
settings = {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
dev = config.myOptions.device;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
dev = config.myOptions.device;
|
||||
in {
|
||||
config = lib.mkIf (dev.cpu.type == "amd") {
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
dev = config.myOptions.device;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
dev = config.myOptions.device;
|
||||
in {
|
||||
config = lib.mkIf (dev.cpu.type == "intel") {
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
};
|
||||
|
|
|
@ -6,4 +6,3 @@
|
|||
# Without this, it defaults to `config.hardware.enableAllFirmware`.
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
# WARNING: This file is currently untested
|
||||
# WARNING: This file is currently untested
|
||||
# (I didn't yet run this NixOS config on any AMD GPU systems)
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
dev = config.myOptions.device;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
dev = config.myOptions.device;
|
||||
in {
|
||||
config = lib.mkIf (dev.gpu.type == "amd") {
|
||||
services.xserver.videoDrivers = lib.mkDefault ["modesetting" "amdgpu"];
|
||||
|
||||
boot = {
|
||||
initrd.kernelModules = ["amdgpu"]; # load amdgpu kernel module as early as initrd
|
||||
initrd.kernelModules = ["amdgpu"]; # load amdgpu kernel module as early as initrd
|
||||
kernelModules = ["amdgpu"]; # if loading somehow fails during initrd but the boot continues, try again later
|
||||
};
|
||||
|
||||
|
@ -26,7 +29,7 @@ in
|
|||
graphics = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
extraPackages = with pkgs; [
|
||||
# Enable AMDVLK (AMD's open-source Vulkan driver)
|
||||
amdvlk
|
||||
|
||||
|
@ -35,14 +38,14 @@ in
|
|||
rocmPackages.clr.icd
|
||||
];
|
||||
# AMDVLK for 32-bit applications
|
||||
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
|
||||
extraPackages32 = with pkgs; [driversi686Linux.amdvlk];
|
||||
};
|
||||
};
|
||||
|
||||
# HIP (SDK that allows running CUDA code on AMD GPUs)
|
||||
# Most software has the paths hard-coded
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,4 +4,3 @@ _: {
|
|||
./nvidia.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
dev = config.myOptions.device;
|
||||
isWayland = config.myOptions.home-manager.wms.isWayland;
|
||||
|
||||
inherit (lib) mkIf mkDefault mkMerge;
|
||||
in
|
||||
{
|
||||
in {
|
||||
config = mkIf (builtins.elem dev.gpu.type ["nvidia" "hybrid-nvidia"]) {
|
||||
# Nvidia drivers are unfree software
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
@ -35,9 +38,9 @@ in
|
|||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# supported GPUs is at: https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
#
|
||||
# Enable this by default, hosts may override this option if their gpu is not
|
||||
# Enable this by default, hosts may override this option if their gpu is not
|
||||
# supported by the open source drivers
|
||||
open = mkDefault true;
|
||||
|
||||
|
@ -88,7 +91,7 @@ in
|
|||
];
|
||||
|
||||
sessionVariables = mkMerge [
|
||||
{ LIBVA_DRIVER_NAME = "nvidia"; }
|
||||
{LIBVA_DRIVER_NAME = "nvidia";}
|
||||
|
||||
(mkIf isWayland {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkDefault;
|
||||
|
||||
enabled = config.myOptions.device.hasTPM;
|
||||
|
@ -21,6 +26,6 @@ in {
|
|||
pkcs11.enable = mkDefault false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ tpm2-tss tpm2-tools ];
|
||||
environment.systemPackages = with pkgs; [tpm2-tss tpm2-tools];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue