{ config, pkgs, ... }:
{
  # [HARDWARE]
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
    ];

  hardware.grapchics = {
    enable = true;
    enable32Bit = true;
    extraPackages = [
      pkgs.rocmPackages.clr.icd
    ];
  };

  # amd gpu
  boot.initrd.kernelModules = [ "amdgpu" ];
  services.xserver.videoDrivers = [ "amdgpu" ];
  systemd.tmpfiles.rules = [
      "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages.clr}"
    ];

  # [BOOT]
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.swraid.enable = true;
  boot.swraid.mdadmConf = ''
    ARRAY /dev/md/deppyPC:0 level=raid0 num-devices=2 metadata=1.2 name=deppyPC:0 UUID=ba6fef6e:972796a3:a331c87a:2d973f91
      devices=/dev/sda1,/dev/sdb1
  '';

  # [AUDIO]
  services.pipewire.wireplumber.extraConfig = {
    "alsa-monitor.conf" = {
      enabled = true;

      rules = [
        {
          matches = [
            {
              "node.name" = "alsa_output.usb-SMSL_SMSL_USB_AUDIO-00.analog-stereo";
            }
          ];
          actions = {
            update-props = {
              audio.format = "S32_LE";
            };
          };
        }
      ];
    };
  };

  services.pipewire.extraConfig.pipewire = {
    "10-clock-rate" = {
      "context.properties" = {
        "default.clock.allowed-rates" = [ 44100 48000 88200 96000 176400 192000 352800 384000 705600 768000 ];
        "default.clock.quantum" = 1024;
        "default.clock.min-quantum" = 128;
        "default.clock.max-quantum" = 2048;
      };
    };
    "11-upmix" = {
      "stream.properties" = {
        "channel.upmix" = true;
      };
    };
  };

  # [Fix KWIN locking to 60Hz]
  environment.sessionVariables = {
      KWIN_X11_NO_SYNC_TO_VBLANK = 1;
      KWIN_X11_REFRESH_RATE = 180000;
      KWIN_X11_FORCE_SOFTWARE_VSYNC = 1;
  };

  # [NETWORKING]
  networking.hostName = "computational";
  networking.networkmanager.enable = true;
  services.openssh = {
    enable = true;
    settings = {
      PermitRootLogin = "no";
      PasswordAuthentication = false;
    };
  };

  system.stateVersion = "24.11";
}