✨ Added Thinkpad and pi4 configs
This commit is contained in:
33
hosts/thinkpad/modules/hardware/audio.nix
Normal file
33
hosts/thinkpad/modules/hardware/audio.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
|
||||
wireplumber
|
||||
playerctl # Interaction with audioplayers and browsers
|
||||
pavucontrol # GUI
|
||||
spotify
|
||||
];
|
||||
|
||||
hardware.pulseaudio.enable = false; # Will be moved to services in 25.05
|
||||
|
||||
security.rtkit.enable = true; # Enable RealtimeKit for audio purposes
|
||||
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
# Uncomment the following line if you want to use JACK applications
|
||||
# jack.enable = true;
|
||||
};
|
||||
# pulseaudio.enable = false; # TODO uncommenct at 25.05
|
||||
};
|
||||
}
|
8
hosts/thinkpad/modules/hardware/default.nix
Normal file
8
hosts/thinkpad/modules/hardware/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./graphics
|
||||
./hardware-configuration.nix
|
||||
./keyboard.nix
|
||||
];
|
||||
}
|
6
hosts/thinkpad/modules/hardware/graphics/default.nix
Normal file
6
hosts/thinkpad/modules/hardware/graphics/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics.enable = true;
|
||||
}
|
57
hosts/thinkpad/modules/hardware/hardware-configuration.nix
Normal file
57
hosts/thinkpad/modules/hardware/hardware-configuration.nix
Normal file
@ -0,0 +1,57 @@
|
||||
# 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.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5ac9c425-35ae-47d5-a683-68ee0dbfc2bc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-99b73f22-3fa1-42b5-ad48-54b0ccff72cc".device =
|
||||
"/dev/disk/by-uuid/99b73f22-3fa1-42b5-ad48-54b0ccff72cc";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3CFB-D12A";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
11
hosts/thinkpad/modules/hardware/keyboard.nix
Normal file
11
hosts/thinkpad/modules/hardware/keyboard.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
via
|
||||
];
|
||||
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
|
||||
services.udev.packages = with pkgs; [ via ];
|
||||
}
|
Reference in New Issue
Block a user