feat: rearrange nix modules
This commit is contained in:
parent
572d1d43c0
commit
89f6ab94b4
17 changed files with 28 additions and 28 deletions
42
hardware/base.nix
Normal file
42
hardware/base.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./planck.nix
|
||||
];
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-partlabel/nixos";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.smartd.enable = true;
|
||||
services.smartd.notifications.x11.enable = true;
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.config = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
|
||||
# Sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
# USB devices
|
||||
hardware.u2f.enable = true;
|
||||
}
|
||||
|
15
hardware/gpu-bumblebee.nix
Normal file
15
hardware/gpu-bumblebee.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
hardware.bumblebee.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
17
hardware/gpu-nvidia.nix
Normal file
17
hardware/gpu-nvidia.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.screenSection = ''
|
||||
Option "metamodes" "1920x1080_144 +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
|
||||
'';
|
||||
|
||||
hardware.opengl = {
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
}
|
9
hardware/gpu-optimus.nix
Normal file
9
hardware/gpu-optimus.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Graphics drivers
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.optimus_prime.enable = true;
|
||||
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:2:0:0";
|
||||
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
|
||||
}
|
9
hardware/ledger.nix
Normal file
9
hardware/ledger.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.ledger.enable = true;
|
||||
services.udev.extraRules = ''
|
||||
# Nano S
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
}
|
10
hardware/planck.nix
Normal file
10
hardware/planck.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
# STM32 rules for the Planck EZ Standard / Glow
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", \
|
||||
MODE:="0666", \
|
||||
SYMLINK+="stm32_dfu"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue