# Do not modify this file!  It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, inputs, modulesPath, ... }:

{
  imports = [
    (modulesPath + "/installer/scan/not-detected.nix")
#    inputs.nixos-hardware.nixosModules.microsoft-surface
  ];

  # Kernel Modules
  boot = {
    initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
    initrd.kernelModules = [ ];
#    kernelPackages = pkgs.linuxPackages_zen;
    extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
    kernelModules = [ "kvm-intel" "v4l2loopback" ];
    loader = {
      systemd-boot = {
        enable = true;
        configurationLimit = 10;
      };
      efi.canTouchEfiVariables = true;
    };
  };

  # Modules
  modules.hardware = {
    audio = {
      enable = true;
      enableExtraCompat = true;
    };
    graphics.enable = true;
    fs = {
      enable = true;
      ssd.enable = true;
    };
  };

  # HiDPI
  hardware.video.hidpi.enable = true;

  # CPU
  nix.maxJobs = lib.mkDefault 4;
  hardware.cpu.intel.updateMicrocode = true;

  # Power Management
  powerManagement = {
    powertop.enable = true;
    cpuFreqGovernor = lib.mkDefault "powersave";
  };

  environment.systemPackages = with pkgs; [
    brightnessctl
  ];

  # Filesystems
  fileSystems = {
    "/" = {
      device = "/dev/disk/by-uuid/eb56fb0a-a35d-472c-8704-6eec5ceea999";
      fsType = "f2fs";
    };

    "/boot" = {
      device = "/dev/disk/by-uuid/4669-2B0A";
      fsType = "vfat";
    };

/*
    "/home/aether/Downloads" = {
      fsType = "tmpfs";
    };
*/
  };

  swapDevices = [{ device = "/dev/disk/by-uuid/74226c30-e72f-4576-8349-8e77e844e875"; }];
}
