blob: 691dedb6493daf66c3088b3f302851ed58144212 (
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
|
{ config, ... }: {
# Setup bootloader
boot._loader.enable = true;
# Enable common options
_archetypes = {
profiles = {
headless = {
enable = true;
home.users.timmy.enable = true;
};
#zfs.enable = true;
};
};
# Import zfs pools
#boot.zfs.extraPools = [ "storage" ];
# Enable user timmy
_users.timmy.enable = true;
# Without this, "ZFS requires networking.hostId to be set" will be raised
#networking.hostId = "4d9e002f";
nixpkgs.config.allowUnfree = true;
nixpkgs.config.cudaSupport = true;
# NVIDIA
services.xserver.videoDrivers = [ "nvidia" ]; # xserver.videoDrivers does not imply X
hardware.graphics.enable = true;
hardware.nvidia = {
modesetting.enable = true; # Required
nvidiaSettings = false; # Don't need gui
open = false;
package = config.boot.kernelPackages.nvidiaPackages.legacy_580; # Support for Tesla P100
powerManagement.enable = false; # Can cause bugs
powerManagement.finegrained = false; # Only works on turing and newer
};
# Packages
environment.systemPackages = with pkgs; [
config.hardware.nvidia.package # nvidia-smi
];
system.stateVersion = "26.05";
}
|