1
0
Fork 0

Update hardware configs

This commit is contained in:
Aires 2024-06-24 13:08:18 -04:00
parent e158bfd27d
commit 44af742046
8 changed files with 12 additions and 127 deletions

View file

@ -1,47 +0,0 @@
{ pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
system.stateVersion = "24.05";
aux.system = {
role = "workstation";
apps = {
development.enable = true;
media.enable = true;
office.enable = true;
writing.enable = true;
};
ui = {
flatpak.enable = true;
gnome.enable = true;
};
users = {
aires = {
enable = true;
autologin = true;
services = {
syncthing = {
enable = true;
autostart = true;
enableTray = false;
};
};
};
};
};
aux.system.services.autoUpgrade = {
enable = true;
configDir = config.secrets.nixConfigFolder;
onCalendar = "daily";
user = config.users.users.aires.name;
push = false;
};
# Configure the virtual machine created by nixos-rebuild build-vm
virtualisation.vmVariant.virtualisation = {
memorySize = 2048;
cores = 2;
};
}

View file

@ -1,62 +0,0 @@
# Surface Laptop Go 1st gen
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
kernelModules = [ ];
luks.devices."luks-5a91100b-8ed9-4090-b1d8-d8291000fe38".device = "/dev/disk/by-uuid/5a91100b-8ed9-4090-b1d8-d8291000fe38";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/76d67291-5aed-4f2a-b71f-1c2871cefe24";
fsType = "btrfs";
options = [ "subvol=@,compress=zstd,discard" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/0C53-A645";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/swapfile";
size = 4096;
}
];
networking = {
# 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`.
useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
# Set the hostname.
hostName = "Dimaga";
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -24,6 +24,7 @@ in
aux.system = { aux.system = {
apps.tmux.enable = true; apps.tmux.enable = true;
gpu.amd.enable = true;
packages = [ start-haven ]; packages = [ start-haven ];
services = { services = {
acme = { acme = {

View file

@ -11,9 +11,6 @@
boot = { boot = {
initrd = { initrd = {
# Enable systemd for TPM auto-unlocking
systemd.enable = true;
availableKernelModules = [ availableKernelModules = [
"surface_aggregator" "surface_aggregator"
"surface_aggregator_registry" "surface_aggregator_registry"
@ -23,7 +20,6 @@
"8250_dw" "8250_dw"
"intel_lpss" "intel_lpss"
"intel_lpss_pci" "intel_lpss_pci"
"tpm_crb"
"xhci_pci" "xhci_pci"
"thunderbolt" "thunderbolt"
"nvme" "nvme"
@ -33,7 +29,6 @@
"pinctrl_tigerlake" "pinctrl_tigerlake"
]; ];
kernelModules = [ kernelModules = [
"tpm_crb"
"surface_aggregator" "surface_aggregator"
"surface_aggregator_registry" "surface_aggregator_registry"
"surface_aggregator_hub" "surface_aggregator_hub"
@ -60,7 +55,6 @@
kernelModules = [ kernelModules = [
"kvm-intel" "kvm-intel"
"tpm_crb"
"surface_aggregator" "surface_aggregator"
"surface_aggregator_registry" "surface_aggregator_registry"
"surface_aggregator_hub" "surface_aggregator_hub"
@ -73,7 +67,6 @@
"surface_kbd" "surface_kbd"
"pinctrl_tigerlake" "pinctrl_tigerlake"
]; ];
extraModulePackages = [ ];
}; };
fileSystems = { fileSystems = {
@ -113,5 +106,5 @@
environment.systemPackages = with pkgs; [ libwacom-surface ]; environment.systemPackages = with pkgs; [ libwacom-surface ];
# NOTE: Use a default kernel to skip full kernel rebuilds # NOTE: Use a default kernel to skip full kernel rebuilds
# boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
} }

View file

@ -42,6 +42,7 @@ in
languagetool.enable = true; languagetool.enable = true;
}; };
}; };
gpu.amd.enable = true;
packages = with pkgs; [ boinc ]; packages = with pkgs; [ boinc ];
services.autoUpgrade = { services.autoUpgrade = {
enable = true; enable = true;

View file

@ -29,11 +29,6 @@
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
"rtsx_pci_sdmmc" "rtsx_pci_sdmmc"
"tpm_crb"
];
kernelModules = [
"amdgpu"
"tpm_crb"
]; ];
luks.devices."luks-bcf67e34-339e-40b9-8ffd-bec8f7f55248" = { luks.devices."luks-bcf67e34-339e-40b9-8ffd-bec8f7f55248" = {
device = "/dev/disk/by-uuid/bcf67e34-339e-40b9-8ffd-bec8f7f55248"; device = "/dev/disk/by-uuid/bcf67e34-339e-40b9-8ffd-bec8f7f55248";

View file

@ -45,6 +45,13 @@ in
# Set up TPM if enabled. See https://nixos.wiki/wiki/TPM # Set up TPM if enabled. See https://nixos.wiki/wiki/TPM
(lib.mkIf (cfg.tpm2.enable) { (lib.mkIf (cfg.tpm2.enable) {
boot.initrd = {
# Enable systemd for TPM auto-unlocking
systemd.enable = true;
availableKernelModules = [ "tpm_crb" ];
kernelModules = [ "tpm_crb" ];
};
# After installing and rebooting, set it up via https://wiki.archlinux.org/title/Systemd-cryptenroll#Trusted_Platform_Module # After installing and rebooting, set it up via https://wiki.archlinux.org/title/Systemd-cryptenroll#Trusted_Platform_Module
environment.systemPackages = with pkgs; [ tpm2-tss ]; environment.systemPackages = with pkgs; [ tpm2-tss ];
security.tpm2 = { security.tpm2 = {

View file

@ -15,10 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver = { services.xserver.videoDrivers = [ "amdgpu" ];
enable = true;
videoDrivers = [ "amdgpu" ];
};
hardware.graphics = { hardware.graphics = {
extraPackages = [ pkgs.amdvlk ]; extraPackages = [ pkgs.amdvlk ];