main #2

Merged
Lithospherical merged 42 commits from jan-leila/nix-config:main into main 2025-06-05 04:13:47 +00:00
3 changed files with 19 additions and 26 deletions
Showing only changes of commit 5484f9ba04 - Show all commits

View file

@ -10,6 +10,14 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
boot.initrd.availableKernelModules = ["usb_storage"];
boot.kernelModules = ["sg"];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
sops.secrets = { sops.secrets = {
"vpn-keys/tailscale-authkey/twilight" = { "vpn-keys/tailscale-authkey/twilight" = {
sopsFile = "${inputs.secrets}/vpn-keys.yaml"; sopsFile = "${inputs.secrets}/vpn-keys.yaml";

View file

@ -4,7 +4,6 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: { }: {
@ -12,20 +11,10 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot = { boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
initrd = { boot.initrd.kernelModules = [];
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; boot.kernelModules = ["kvm-amd"];
kernelModules = []; boot.extraModulePackages = [];
};
kernelModules = ["kvm-amd" "sg"];
extraModulePackages = [];
# Bootloader.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = { fileSystems = {
"/" = { "/" = {
@ -49,4 +38,5 @@
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,12 +1,9 @@
{ {config, ...}: {
lib, services = {
config, xserver = {
...
}: {
services.xserver = {
# Load nvidia driver for Xorg and Wayland # Load nvidia driver for Xorg and Wayland
videoDrivers = ["nvidia"]; videoDrivers = ["nvidia"];
};
# Use X instead of wayland for gaming reasons # Use X instead of wayland for gaming reasons
displayManager.gdm.wayland = false; displayManager.gdm.wayland = false;
}; };
@ -46,7 +43,5 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU. # Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.production; package = config.boot.kernelPackages.nvidiaPackages.production;
}; };
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}; };
} }