nix/systems/nixos-desk/default.nix

88 lines
2 KiB
Nix
Raw Normal View History

{ config
, lib
, pkgs
, modulesPath
, system
, inputs
, ...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
2024-05-03 17:39:43 +02:00
inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
inputs.nixos-hardware.nixosModules.common-gpu-amd
inputs.nixos-hardware.nixosModules.common-pc
inputs.nixos-hardware.nixosModules.common-pc-ssd
../../os-mods/amdgpu
../../os-mods/cachix
../../os-mods/common
../../os-mods/desktop
2023-12-10 05:19:43 +01:00
../../os-mods/desktop/audio.nix
../../os-mods/desktop/gaming.nix
../../os-mods/desktop/printing.nix
../../os-mods/netdata
../../os-mods/network
../../os-mods/virt
../../users
./disko.nix
];
2023-12-10 05:19:43 +01:00
config = {
system.stateVersion = "23.05";
nix.settings.system-features = [
"benchmark"
"big-parallel"
"kvm"
"nixos-test"
"gccarch-x86-64-v3"
"gccarch-znver3"
];
boot = {
kernelPackages = pkgs.pkgsx86_64_v3.linuxPackages_cachyos;
loader = {
systemd-boot = {
2024-08-16 10:01:10 +02:00
enable = lib.mkForce false; #lanzaboote
2024-04-29 12:26:24 +02:00
configurationLimit = 16;
2023-12-10 05:19:43 +01:00
};
2024-08-16 10:01:10 +02:00
2023-12-10 05:19:43 +01:00
efi.canTouchEfiVariables = true;
};
2024-08-16 10:01:10 +02:00
# TODO Extract secureboot module
lanzaboote = {
enable = true;
configurationLimit = 16;
pkiBundle = "/etc/secureboot";
};
2023-12-10 05:19:43 +01:00
initrd = {
availableKernelModules = [ "ahci" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ ];
systemd.enable = true;
};
2023-12-10 05:19:43 +01:00
extraModulePackages = [ ];
};
2024-08-16 10:01:10 +02:00
environment.systemPackages = with pkgs; [
lm_sensors
coreutils-full
cpu-x
sbctl # secureboot debugging/config/mgmt
];
2023-12-10 05:19:43 +01:00
services.btrfs.autoScrub.enable = true;
2023-12-10 05:19:43 +01:00
networking = {
hostName = "nixos-desk";
useDHCP = lib.mkDefault true;
};
hardware = {
2024-05-03 17:39:43 +02:00
enableRedistributableFirmware = true;
2023-12-10 05:19:43 +01:00
};
2023-12-10 05:19:43 +01:00
zramSwap.enable = true;
};
}