2023-08-19 16:58:57 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
# [HARDWARE]
|
|
|
|
imports =
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
./hardware-configuration.nix
|
|
|
|
];
|
2024-06-24 21:53:35 +02:00
|
|
|
|
2024-12-14 00:27:16 +01:00
|
|
|
hardware.graphics = {
|
2023-08-19 16:58:57 +02:00
|
|
|
enable = true;
|
2024-12-08 12:14:40 +01:00
|
|
|
enable32Bit = true;
|
2024-11-04 14:14:28 +01:00
|
|
|
extraPackages = [
|
|
|
|
pkgs.rocmPackages.clr.icd
|
|
|
|
];
|
2023-08-19 16:58:57 +02:00
|
|
|
};
|
|
|
|
|
2024-11-04 14:14:28 +01:00
|
|
|
# amd gpu
|
|
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
|
|
|
];
|
|
|
|
|
2023-08-19 16:58:57 +02:00
|
|
|
# [BOOT]
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2023-12-29 17:26:46 +01:00
|
|
|
# [AUDIO]
|
2024-06-04 14:23:11 +02:00
|
|
|
services.pipewire.wireplumber.extraConfig = {
|
|
|
|
"alsa-monitor.conf" = {
|
|
|
|
enabled = true;
|
2023-12-29 17:26:46 +01:00
|
|
|
|
2024-06-04 14:23:11 +02:00
|
|
|
rules = [
|
|
|
|
{
|
|
|
|
matches = [
|
|
|
|
{
|
|
|
|
"node.name" = "alsa_output.usb-SMSL_SMSL_USB_AUDIO-00.analog-stereo";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
actions = {
|
|
|
|
update-props = {
|
|
|
|
audio.format = "S32_LE";
|
|
|
|
};
|
|
|
|
};
|
2023-12-29 17:26:46 +01:00
|
|
|
}
|
2024-06-04 14:23:11 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2023-12-29 17:26:46 +01:00
|
|
|
|
2024-06-04 14:23:11 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-11 20:16:48 +02:00
|
|
|
|
|
|
|
# [Fix KWIN locking to 60Hz]
|
|
|
|
environment.sessionVariables = {
|
|
|
|
KWIN_X11_NO_SYNC_TO_VBLANK = 1;
|
2024-12-03 23:55:42 +01:00
|
|
|
KWIN_X11_REFRESH_RATE = 180000;
|
2024-10-11 20:16:48 +02:00
|
|
|
KWIN_X11_FORCE_SOFTWARE_VSYNC = 1;
|
|
|
|
};
|
2023-12-29 17:26:46 +01:00
|
|
|
|
2023-08-19 16:58:57 +02:00
|
|
|
# [NETWORKING]
|
|
|
|
networking.hostName = "computational";
|
2023-11-18 11:29:47 +01:00
|
|
|
networking.networkmanager.enable = true;
|
2024-12-03 23:55:42 +01:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
};
|
|
|
|
};
|
2023-08-19 16:58:57 +02:00
|
|
|
|
2024-12-07 20:31:23 +01:00
|
|
|
system.stateVersion = "24.11";
|
2023-08-19 16:58:57 +02:00
|
|
|
}
|