summaryrefslogtreecommitdiff
path: root/hosts/office-precision/configuration.nix
blob: 95b4a0a6a33e139916c158d66c244917f5adfe91 (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
{ config, lib, pkgs, ... }: {
	imports = [
		./g610.nix
		./wg.nix
	];

	# Setup bootloader
	boot._loader.enable = true;

	# Enable common options
	_archetypes = {
		profiles = {
			desktop = {
				enable = true;
				home.users.timmy.enable = true;
			};
			btrfs.enable = true;
		};
		collections = {
			desktop = {
				extraUtilities.enable = true;
				chromium.enable = true;
				graphics.enable = true;
				office.enable = true;
			};
			development = {
				docker.enable = true;
				web = {
					node.enable = true;
				};
			};
			virtualization.enable = true;
		};
	};

	# Enable user timmy
	_users.timmy = {
		enable = true;
		nas = {
			enable = true;
			office.enable = true;
			office.automount = true;
		};
	};

	# Disable suspend
	systemd._suspend.disable = true;

	# Allow unfree for nvidia
	nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
		"nvidia-kernel-modules"
		"nvidia-settings"
		"nvidia-x11"
	];

	# Use nvidia driver
	services.xserver.videoDrivers = [ "nvidia" ];
	hardware.nvidia = {
		modesetting.enable = true;  # Required
		powerManagement.enable = false;  # Can cause bugs
		powerManagement.finegrained = false;  # Only works on turing and newer
		nvidiaSettings = true;
		open = false;  # Not compatible w/ GTX-1030
		package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
		forceFullCompositionPipeline = true;  # Enables vsync
	};

	# Configure home
	home-manager.users.timmy = {
		gtk._mintTheme = {
			dark = true;
			color = "Blue";
			icons.color = "Blue";
		};
		programs._seasonalwallpaper.wallpapers.download = true;
		fonts.fontconfig = {
			subpixelRendering = "rgb";
			hinting = "none";
		};
		gtk.gtk3.bookmarks = [
			"file:///home/timmy/docs/src/sites/admin Admin"
			"file:///media/chexx/chexx cHEXx"
		];
	};

	system.stateVersion = "24.11";
}