# SPDX-FileCopyrightText: 2025 Nitesh Kumar Debnath # # SPDX-License-Identifier: GPL-3.0-or-later { lib, config, inputs, ... }: let nixosModules = config.flake.modules.nixos; inherit (config.meta) username; in { flake.modules.nixos.tjmaxxer = { pkgs, config, ... }: let inherit (config.boot.kernelPackages) zenergy; in { hardware.facter.reportPath = ./facter.json; boot.extraModulePackages = [ zenergy ]; hardware.ckb-next.enable = true; services.hardware.openrgb = { enable = true; package = pkgs.openrgb-with-all-plugins; }; services.lact.enable = true; hardware.bluetooth = { enable = true; powerOnBoot = false; }; # Enable OpenTabletDriver hardware.opentabletdriver.enable = true; # Required by OpenTabletDriver hardware.uinput.enable = true; boot.kernelModules = [ "uinput" ]; hardware.graphics = { extraPackages = [ # Required for modern Intel GPUs (Xe iGPU and ARC) pkgs.intel-media-driver # VA-API (iHD) userspace pkgs.intel-compute-runtime # For Intel 12th Gen and newer pkgs.vpl-gpu-rt # oneVPL (QSV) runtime ]; # Source SDK 2013 may need them # enable32Bit = true; # extraPackages32 = [ # # Required for modern Intel GPUs (Xe iGPU and ARC) # pkgs.pkgsi686Linux.intel-media-driver # VA-API (iHD) userspace # ]; }; environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend # VDPAU_DRIVER = "va_gl"; # Only if using libvdpau-va-gl }; # May help if FFmpeg/VAAPI/QSV init fails (esp. on Arc with i915): hardware.enableRedistributableFirmware = true; networking.hostName = "tjmaxxer"; # Define your hostname. # I did not read the comment system.stateVersion = "24.11"; services.homed.enable = true; users.users.${username} = { enable = false; isNormalUser = true; }; fileSystems."/" = { device = "/dev/disk/by-partlabel/nixos-root-b"; fsType = "btrfs"; options = [ "subvol=@" "compress=zstd" ]; }; fileSystems."/nix" = { device = "/dev/disk/by-partlabel/nixos-root-b"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@nix" "noatime" "compress=zstd" ]; }; fileSystems."/home" = { device = "/dev/disk/by-partlabel/nixos-root-b"; fsType = "btrfs"; neededForBoot = true; options = [ "subvol=@home" "compress=zstd" ]; }; fileSystems."/boot" = { device = "/dev/disk/by-partlabel/wd-efi"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; swapDevices = [ { device = "/dev/disk/by-partlabel/wd-swap"; } ]; }; flake.nixosConfigurations.tjmaxxer = inputs.nixpkgs.lib.nixosSystem { modules = lib.attrValues { inherit (nixosModules) pc tjmaxxer ; }; }; }