nix/nixos/dragon.nix

158 lines
3.8 KiB
Nix
Raw Normal View History

{
pkgs,
lib,
config,
...
}: {
2024-07-29 11:29:05 -05:00
imports = [
{
2024-12-02 13:27:49 -06:00
system.stateVersion = "24.11";
2024-07-29 11:29:05 -05:00
home-manager.users.daniel.home.stateVersion = "24.05";
networking.hostName = "dragon";
}
2024-09-14 07:43:11 -05:00
{
# sops secrets config
sops = {
defaultSopsFile = ../secrets/dragon/secrets.yml;
age = {
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true;
};
};
}
{
sops.secrets = {
ddns-pass = {mode = "0400";};
};
services.deno-netlify-ddns-client = {
passwordFile = config.sops.secrets.ddns-pass.path;
};
}
2024-07-29 11:29:05 -05:00
];
2024-07-29 10:01:59 -05:00
hardware.graphics.extraPackages = [
# pkgs.rocmPackages.clr.icd
pkgs.amdvlk
# encoding/decoding acceleration
pkgs.libvdpau-va-gl
pkgs.vaapiVdpau
];
2024-07-29 11:29:05 -05:00
boot = {
2024-08-21 20:11:39 -05:00
kernelPackages = pkgs.linuxPackages_latest;
2024-07-29 11:29:05 -05:00
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = true;
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];
kernelModules = ["kvm-amd"];
supportedFilesystems = ["ntfs"];
};
hardware.bluetooth = {
enable = true;
2024-08-09 16:42:57 -05:00
# package = pkgs.bluez;
settings = {
General = {
AutoConnect = true;
MultiProfile = "multiple";
};
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
# dragon firewall
# TODO: maybe should go in the gaming module?
networking = {
firewall = let
terraria = 7777;
stardew-valley = 24642;
web-dev-lan = 18888;
ports = [
terraria
stardew-valley
web-dev-lan
];
in {
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
};
environment.systemPackages = with pkgs; [
radeontop
godot_4
prismlauncher
];
home-manager.users.daniel = {
2024-07-30 15:16:46 -05:00
slippi-launcher = {
enable = true;
isoPath = "${config.home-manager.users.daniel.home.homeDirectory}/../games/roms/dolphin/melee.iso";
launchMeleeOnPlay = false;
};
# TODO: monitor config module?
2024-09-12 11:58:24 -05:00
wayland.windowManager.hyprland = {
settings = {
env = [
"EWW_BAR_MON,0"
2024-09-12 11:58:24 -05:00
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
monitor = [
# "DP-2,3840x2160@60,-2160x0,1,transform,3"
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1"
# TODO: HDR breaks screenshare?
/*
"DP-3,3840x2160@120,${toString (builtins.ceil (2160 / 1.5))}x0,1,bitdepth,10"
"desc:LG Display 0x0521,3840x2160@120,0x0,1"
"desc:Dell Inc. DELL U2720Q D3TM623,3840x2160@60,3840x0,1.5,transform,1"
*/
"DP-1,3840x2160@60,0x0,1.5,transform,1"
2024-09-12 11:58:24 -05:00
];
input = {
force_no_accel = true;
sensitivity = 1; # -1.0 - 1.0, 0 means no modification.
};
};
};
2024-09-12 11:58:24 -05:00
wayland.windowManager.sway = {
config = {
output = {
"GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307" = {
mode = "3840x2160@120Hz";
position = "${toString (builtins.ceil (2160 / 1.5))},0";
};
2024-09-12 11:58:24 -05:00
"Dell Inc. DELL U2720Q D3TM623" = {
# desktop left vertical monitor
mode = "3840x2160@60Hz";
transform = "270";
scale = "1.5";
position = "0,0";
};
};
2024-09-12 11:58:24 -05:00
workspaceOutputAssign =
(
map
(ws: {
output = "GIGA-BYTE TECHNOLOGY CO., LTD. AORUS FO48U 23070B000307";
workspace = toString ws;
})
(lib.range 1 7)
)
++ (
map
(ws: {
output = "Dell Inc. DELL U2720Q D3TM623";
workspace = toString ws;
})
(lib.range 8 9)
);
};
};
};
}