{ config, inputs, lib, pkgs, ... }: { imports = [ ../../lib inputs.disko.nixosModules.disko (import ./format.nix { device = "/dev/disk/by-id/usb-SanDisk_Ultra_Trek_0501990ddf7236633373ea7dd2e6715f954e2dbb35cadae343333f0562cda6aa7ec80000000000000000000042c100baff1e08109f5581078ea6d9c3-0:0"; }) ../common/system/configs/bluetooth ../common/system/configs/boot ../common/system/configs/brightnessctl ../common/system/configs/btop ../common/system/configs/btrfs ../common/system/configs/cpu ../common/system/configs/docker ../common/system/configs/fastfetch ../common/system/configs/getty ../common/system/configs/git ../common/system/configs/gpg-agent ../common/system/configs/impermanence ../common/system/configs/lsof ../common/system/configs/ncdu ../common/system/configs/neovim ../common/system/configs/networking ../common/system/configs/nix ../common/system/configs/nix-cleanup ../common/system/configs/nix-ld ../common/system/configs/nixpkgs ../common/system/configs/ntp ../common/system/configs/pipewire ../common/system/configs/plymouth ../common/system/configs/powertop ../common/system/configs/printing ../common/system/configs/ranger ../common/system/configs/sops ../common/system/configs/ssh ../common/system/configs/system ../common/system/configs/timezone ../common/system/configs/tlp ../common/system/configs/tmux ../common/system/configs/tree ../common/system/configs/users ../common/system/configs/wget ../common/system/configs/zsh ./users/nikara ]; networking.hostName = "elara"; i18n.defaultLocale = "en_US.UTF-8"; sops.defaultSopsFile = ./secrets/secrets.yaml; # https://github.com/NixOS/nixos-hardware/tree/master/lenovo/legion/16achg6 hardware = { enableAllFirmware = true; cpu = { cores = 8; threads = 16; amd.updateMicrocode = true; }; nvidia = { modesetting.enable = true; powerManagement.enable = true; open = false; prime = { offload = { enable = true; enableOffloadCmd = true; }; nvidiaBusId = "PCI:1:0:0"; amdgpuBusId = "PCI:6:0:0"; }; }; graphics = { enable32Bit = true; extraPackages = with pkgs; [ amdvlk driversi686Linux.amdvlk rocmPackages.clr rocmPackages.clr.icd ]; }; }; boot = { kernelParams = [ "amd_pstate=active" "video=eDP-1:2560x1600@165" ]; kernelModules = [ "kvm-amd" ]; initrd.kernelModules = [ "nvme" "ahci" "usbhid" "amdgpu" "xhci_pci" "usb_storage" "sd_mod" ]; }; environment.impermanence.device = config.disko.devices.disk.usb.content.partitions.root.content.name; nixpkgs = { hostPlatform = "x86_64-linux"; config = { cudaSupport = true; rocmSupport = true; }; }; powerManagement.enable = true; systemd.services.powertop.postStart = builtins.readFile ./system/scripts/mouse.sh; services = { xserver.videoDrivers = [ "nvidia" ]; fstrim.enable = true; tlp.settings.DISK_DEVICES = "nvme0n1 nvme1n1"; }; home-manager.sharedModules = [ { wayland.windowManager.hyprland.settings = { monitor = "eDP-1, 2560x1600@165, 0x0, 1.25"; env = [ "WLR_DRM_DEVICES,$HOME/.config/hypr/card" ]; device = [ { name = "syna2ba6:00-06cb:ce44-touchpad"; sensitivity = 0.5; } ]; gestures.workspace_swipe_distance = 600; }; programs = { zsh.loginExtra = lib.mkBefore (builtins.readFile ./system/scripts/card.sh); # VSCode does not play well with fractional scaling vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2; obs-studio.resolution = { base = { x = 4096; y = 2560; }; output = { x = 2048; y = 1280; }; }; }; theme.cursor.size = 24; } ]; }