Various improvements to ll-latitude-e5591

This commit is contained in:
Lauren Lagarde 2025-06-10 21:45:44 -05:00
parent 4ebb7a41ff
commit 535b8c5230
4 changed files with 53 additions and 4 deletions

View File

@ -16,7 +16,7 @@
esptool
stlink
stlink-gui
(kicad-small.override { addons=[kicadAddons.kikit kicadAddons.kikit-library]; })
(pkgs-unstable.kicad.override { addons=[pkgs-unstable.kicadAddons.kikit pkgs-unstable.kicadAddons.kikit-library]; })
kikit
screen
prusa-slicer

View File

@ -2,16 +2,20 @@
{ config, ... }: {
# Enable OpenGL
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = ["nvidia"];
# Fix stupid UI scaling bug
services.xserver.dpi = 96;
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
powerManagement.enable = true;
powerManagement.enable = false;
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
# Basic Utilities
bc pv killall unzip unrar-wrapper unar units
bc pv killall zip unzip unrar-wrapper unar units
# System Monitoring / TUI QoL Tools
btop iotop tmux byobu

View File

@ -24,12 +24,14 @@
# Dotspace
../secrets/dotspace.nix
../secrets/dotspace_shares.nix
../features/stronghold-binary-cache.nix
# Additional Software
../features/embedded.nix
../features/hardware/rtl-sdr.nix
../features/hardware/printing.nix
../tweaks/aarch64-crosscompile.nix
../features/virtualization/docker.nix
../features/virtualization/libvirt-host.nix
@ -39,12 +41,32 @@
../features/factorio.nix
];
specialisation = {
nvidia.configuration = {
system.nixos.tags = [ "nvidia" ];
imports = [
../features/gpu/nvidia.nix
];
hardware.nvidia.prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
};
hardware.enableRedistributableFirmware = true;
boot.initrd.kernelModules = [ "i915" ]; # Makes external monitors boot better
boot.kernelParams = [
"i915.enable_guc=2"
];
services.autorandr.enable = true;
services.udev.packages = with pkgs; [ autorandr ];
# TODO: Not quite enough for hibernation while zram is still enabled
#swapDevices = [{
# device = "/var/lib/swapfile";
@ -57,7 +79,30 @@
# Tinc Stuff
# TODO: Less hacky
services.tinc.networks.mlaga97space = {
networking.firewall.allowedTCPPorts = [ 655 ];
networking.firewall.allowedUDPPorts = [ 655 ];
networking.interfaces."tinc.dotspace".ipv4 = {
addresses = [{
address = "10.86.84.250";
prefixLength = 32;
}];
routes = [{
address = "10.86.84.0";
prefixLength = 24;
}];
};
# Start the unit for adding addresses if Tinc is started
systemd.services."tinc.dotspace".wants = [ "network-addresses-tinc.dotspace.service" ];
# Stop the unit for adding addresses if Tinc is stopped or restarted
systemd.services."network-addresses-tinc.dotspace".partOf = [ "tinc.dotspace.service" ];
# Start the unit for adding addresses after the Tinc device is added
systemd.services."network-addresses-tinc.dotspace".after = [ "sys-subsystem-net-devices-tinc.dotspace.device" ];
services.tinc.networks.dotspace = {
name = "ll_latitude_e5591";
ed25519PrivateKeyFile = "/root/tinc/mlaga97space_ed25519_key.priv";