forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vm.nix
33 lines (30 loc) · 789 Bytes
/
vm.nix
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
{ pkgs ? import <nixpkgs> {
config = {
allowUnfree = true;
cudaSupport = true;
};
} , ... }: {
boot.kernelPackages = pkgs.linuxPackages_latest;
users.users.ai = {
isNormalUser = true;
home = "/home/ai-vm";
description = "AI User";
extraGroups = [ "wheel" ];
initialPassword = "toor";
};
environment.systemPackages = with pkgs; [
git gitRepo gnupg autoconf curl
procps gnumake util-linux m4 gperf unzip
cudatoolkit linuxPackages.nvidia_x11
libGLU libGL
xorg.libXi xorg.libXmu freeglut
xorg.libXext xorg.libX11 xorg.libXv xorg.libXrandr zlib
ncurses5 binutils
glib
conda
];
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
virtualisation.memorySize = 16 * 1024;
virtualisation.cores = 8;
virtualisation.diskSize = 500 * 1024;
}