🧹 Moved almost all files to /modules. Moved some code to separate files

This commit is contained in:
2025-01-05 19:14:37 +01:00
parent f0ac3a7705
commit b30376cdcf
101 changed files with 133 additions and 102 deletions

View File

@ -0,0 +1,37 @@
{
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
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;
};
}

View File

@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./audio.nix
./graphics
./hardware-configuration.nix
./keyboard.nix
];
}

View File

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
imports = [
./nvidia.nix
];
# For hardware acceleration
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
# Enable OpenGL
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
# Used for hardware-acceleration
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
];
};
}

View File

@ -0,0 +1,15 @@
{ ... }:
{
hardware.nvidia = {
# Required
modesetting.enable = true;
# Use closed-source drivers
open = false;
# Enable the Nvidia settings menu
nvidiaSettings = true;
};
# Load Nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = [ "nvidia" ];
}

View File

@ -0,0 +1,58 @@
# 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 = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/5e3f0f97-4bb4-4a53-ace2-9ed19ff9e8ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D188-48A9";
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.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s20f0u8.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
via
];
hardware.keyboard.qmk.enable = true;
services.udev.packages = with pkgs; [ via ];
}