Merge hardware.nix
This commit is contained in:
parent
7ff397a7c0
commit
95c39f896c
6 changed files with 36 additions and 55 deletions
|
|
@ -11,3 +11,9 @@ sudo nixos-install --root /mnt --flake .#hermes
|
|||
```bash
|
||||
nix run nix-darwin/release-* -- switch --flake .#mercure
|
||||
```
|
||||
|
||||
# TODO
|
||||
1. Create a configuration path for the directory `config`
|
||||
2. Create `mkSystem` that:
|
||||
1. Inject `options.machine`
|
||||
2. Auto-import the related configurations
|
||||
|
|
@ -9,18 +9,24 @@
|
|||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./persephone/hardware.nix
|
||||
./persephone/networking.nix
|
||||
../profiles/minimal.linux.nix
|
||||
../profiles/desktop.linux.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
blacklistedKernelModules = [
|
||||
"spd5118"
|
||||
];
|
||||
extraModulePackages = [ ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelModules = [
|
||||
"i2c-dev"
|
||||
"kvm-intel"
|
||||
];
|
||||
kernelPackages = pkgs.linuxPackages_6_17;
|
||||
kernelParams = [ "i915.enable_guc=3" ];
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
|
|
@ -48,6 +54,8 @@
|
|||
];
|
||||
};
|
||||
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
open = true;
|
||||
|
|
@ -109,6 +117,11 @@
|
|||
VDPAU_DRIVER = "va_gl";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
i2c-tools
|
||||
lm_sensors
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://cache.nixos-cuda.org" ];
|
||||
trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ];
|
||||
|
|
@ -125,7 +138,13 @@
|
|||
|
||||
programs._1password.enable = true;
|
||||
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
startupProfile = "off";
|
||||
};
|
||||
|
||||
services.pipewire.enable = true;
|
||||
services.udev.packages = [ pkgs.openrgb ];
|
||||
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# I2C
|
||||
environment.systemPackages = with pkgs; [
|
||||
i2c-tools
|
||||
lm_sensors
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "i2c-dev" ];
|
||||
boot.blacklistedKernelModules = [
|
||||
# The spd5118 driver is in conflict with openrgb by holding onto I2C adresses when using Kingston Fury DRAM.
|
||||
# On boot, I need to access those i2c regions in other to poweroff the RGB lighting.
|
||||
# Then, I manually enable the kernel module in any script.
|
||||
# It's possible to let this module disabled, but I lose the ability to get temperature values for the DIMMs.
|
||||
# https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/2557
|
||||
"spd5118"
|
||||
];
|
||||
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
# OpenRGB
|
||||
services.udev.packages = [ pkgs.openrgb ];
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
startupProfile = "off";
|
||||
};
|
||||
|
||||
system.activationScripts.openrgbOff = ''
|
||||
mkdir -p /var/lib/OpenRGB
|
||||
cp ${./off.orp} /var/lib/OpenRGB/off.orp
|
||||
chmod 0644 /var/lib/OpenRGB/off.orp
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
diff --git a/OpenRGB.pro b/OpenRGB.pro
|
||||
index df7082b6..0022e5fa 100644
|
||||
--- a/OpenRGB.pro
|
||||
+++ b/OpenRGB.pro
|
||||
@@ -588,9 +588,9 @@ contains(QMAKE_PLATFORM, linux) {
|
||||
icon.files+=qt/org.openrgb.OpenRGB.png
|
||||
metainfo.path=$$PREFIX/share/metainfo/
|
||||
metainfo.files+=qt/org.openrgb.OpenRGB.metainfo.xml
|
||||
- systemd_service.path=/etc/systemd/system
|
||||
- systemd_service.files+=qt/openrgb.service
|
||||
- INSTALLS += target desktop icon metainfo udev_rules systemd_service
|
||||
+ # systemd_service.path=/etc/systemd/system
|
||||
+ # systemd_service.files+=qt/openrgb.service
|
||||
+ INSTALLS += target desktop icon metainfo udev_rules # systemd_service
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------------------------#
|
||||
|
|
@ -101,4 +101,11 @@ in
|
|||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
system.activationScripts.openrgbOff =
|
||||
mkIf (config.services.hardware.openrgb.startupProfile == "off") ''
|
||||
mkdir -p /var/lib/OpenRGB
|
||||
cp ${../config/openrgb/off.orp} /var/lib/OpenRGB/off.orp
|
||||
chmod 0644 /var/lib/OpenRGB/off.orp
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue