mlaga97-nix/systems/ll-latitude-e5591/configuration.nix
2025-08-12 22:53:14 -05:00

131 lines
3.8 KiB
Nix

{ inputs, config, pkgs, ... }: {
# System Info:
# - Model: Dell Latitude 5591
# - CPU: Intel Core i7-8850H (6C/12T, Passmark: 2369/10147)
# - RAM: 32GB
# - Storage:
# - Toshiba KXG60ZNV512G 512GB NVMe SSD
networking.hostName = "ll-latitude-e5591";
networking.hostId = "f55542ee";
system.stateVersion = "24.11";
time.timeZone = "America/Chicago";
sops.defaultSopsFile = ../../secrets.yaml;
imports = [
inputs.waveforms.nixosModule
inputs.disko.nixosModules.default
inputs.sops-nix.nixosModules.sops
inputs.lix-module.nixosModules.default
inputs.home-manager.nixosModules.home-manager
# Core Features
../../nixos/features/base.nix
../../nixos/features/tui-apps.nix
../../nixos/features/openssh-server.nix
# Core Tweaks
../../nixos/tweaks/zram.nix
../../nixos/tweaks/enable_flakes.nix
../../nixos/tweaks/disable_nixos_user.nix
../../nixos/tweaks/systemd-resolved_nonsense.nix
# Lauren Base
../../users/lauren_lagarde/lauren_lagarde.nix
# i3wm
../../nixos/features/i3wm.nix
../../nixos/features/hardware/yubikey.nix
../../nixos/tweaks/bluetooth.nix
../../nixos/tweaks/intel_igpu_screen_tearing.nix
# Dotspace
../../secrets/dotspace.nix
../../secrets/dotspace_shares.nix
../../nixos/features/stronghold-binary-cache.nix
# Additional Software
../../nixos/features/embedded.nix
../../nixos/features/hardware/rtl-sdr.nix
../../nixos/features/hardware/printing.nix
../../nixos/tweaks/aarch64-crosscompile.nix
../../nixos/features/virtualization/docker.nix
../../nixos/features/virtualization/libvirt-host.nix
# ll-latitude-e5591
../../nixos/features/gpu/intel.nix
../../nixos/features/systemd-boot.nix
../../nixos/features/factorio.nix
../../nixos/disko/nvme/uefi-luks-lvm-ext4.nix
];
specialisation = {
nvidia.configuration = {
system.nixos.tags = [ "nvidia" ];
imports = [
../../nixos/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";
# size = 48 * 1024;
#}];
##############################################################################
##############################################################################
##############################################################################
# Tinc Stuff
# TODO: Less hacky
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";
chroot = false;
settings.ConnectTo = [ "fortress" "citadel" ];
};
}