summaryrefslogtreecommitdiff
path: root/hosts/workstation/default.nix
blob: 25535664f2dab681f9d4f592b9eb771aed330a08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{ pkgs, nixpkgs, ... }:
{
	imports = [
		./hardware.nix
		../../modules/hyprland/monitor.nix
		../../modules/usbauth/default.nix
	];

	nixpkgs.config.rocmSupport = true;

	networking.hostName = "workstation";

	boot.loader = {
		efi.canTouchEfiVariables = true;
		grub = {
			enable = true;
			device = "nodev";
			efiSupport = true;
			gfxmodeEfi = "1920x1080";
		};
	};

	hyprland.monitors = {
		default = {
			resolution = "preferred";
			position = "auto";
			scale = 1;
		};

		DP-2 = {
			resolution = "preferred";
			position = "auto";
			scale = 1;
			bar.enable = true;
		};

		DP-3 = {
			resolution = "preferred";
			position = "auto";
			scale = 1;
			transform = {
				rotation = 90;
			};
		};

		HDMA-A-1 = {
			resolution = "preferred";
			position = "auto";
			scale = 1;
		};
	};

	webtray.instances = {
		element = {
			url = "https://chat.nathanreiner.xyz";
			autoStart = true;
			openInWindow = false;
		};
		syncthing-tray = {
			url = "http://localhost:8384";
			autoStart = true;
			openInWindow = false;
		};
	};

	usbauth = {
		enable = true;
		device = "root";
		uuid = "543f281c-4feb-4a5a-b51b-99114fa4b8a1";
		keyname = "n8";
	};

	hardware.opengl = {
		enable = true;
		driSupport = true;
		driSupport32Bit = true;
		extraPackages = with pkgs; [
			amdvlk
			rocmPackages.clr.icd
			vulkan-loader
			vulkan-validation-layers
			vulkan-extension-layer
		];
	};

	systemd.tmpfiles.rules = [ "L+    /opt/rocm/hip   -    -    -     -    ${pkgs.rocmPackages.clr}" ];

	environment.systemPackages = with pkgs; [ clinfo ];

	virtualisation = {
		libvirtd.enable = true;
	};

	system.stateVersion = "24.05";
}