Files
nix/hosts/eirene/base/default.nix
Nikolaos Karaolidis 9dfbe1203d Add syncthing base
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2024-07-08 15:56:42 +03:00

106 lines
2.3 KiB
Nix

{
config,
inputs,
lib,
pkgs,
...
}:
{
imports = [
inputs.disko.nixosModules.disko
(import ../format.nix {
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL22T0HBLB-00BL2_S64RNE0R602762";
})
./hardware-configuration.nix
../.
];
networking.hostName = "eirene";
# https://github.com/NixOS/nixos-hardware/tree/master/lenovo/legion/16achg6
hardware = {
cpu.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
];
};
enableAllFirmware = true;
};
services = {
xserver.videoDrivers = [ "nvidia" ];
fstrim.enable = true;
tlp = {
enable = true;
settings = {
DISK_DEVICES = "nvme0n1 nvme1n1";
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
};
};
};
boot = {
kernelParams = [
"amd_pstate=active"
"video=eDP-1:2560x1600@165"
];
initrd.kernelModules = [ "amdgpu" ];
};
home-manager.sharedModules = lib.mkIf config.programs.hyprland.enable [
{
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 ./card.sh);
# VSCode does not play well with fractional scaling
vscode.userSettings."window.zoomLevel" = (1.25 - 1) / 0.2;
};
theme = {
cursor.size = 24;
};
}
];
nixpkgs.config = {
cudaSupport = true;
rocmSupport = true;
};
}