Merge branch 'main' of github.com:asosnovsky/nixos-setup

This commit is contained in:
ari committed 2024-07-17 19:52:50 -04:00
commit 7bd24844e5
11 files changed
+253 -66

No files matched your search

+12 -26
View File
@@ -4,40 +4,26 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/f2732ab2-ea52-4f61-b55a-6617d496bf39";
fsType = "ext4";
};
fileSystems."/mnt/EightTerra/DownloadedTorrents" = {
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f2732ab2-ea52-4f61-b55a-6617d496bf39";
fsType = "ext4";
};
fileSystems."/mnt/EightTerra/k3s-cluster" = {
device = "tnas1.lab.internal:/mnt/EightTerra/k3s-cluster";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" ];
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9222-7B1D";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/9222-7B1D";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+5 -14
View File
@@ -8,31 +8,22 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.tmp.useTmpfs = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
environment.systemPackages = with pkgs; [
nvtopPackages.nvidia
cudaPackages.cudnn
];
# Ollama
services.ollama = {
enable = true;
acceleration = "cuda";
# environmentVariables = {
# OLLAMA_LLM_LIBRARY = "cuda";
# LD_LIBRARY_PATH = "run/opengl-driver/lib";
# NVARCH = "x86_64";
# NV_CUDA_CUDART_VERSION = "11.3.1";
# NVIDIA_VISIBLE_DEVICES = "all";
# };
host = "0.0.0.0";
};
# Nvidia Settings
services.xserver.videoDrivers = [ "nvidia" "modesetting" "fbdev" ];
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.enable = true;
hardware.graphics = { enable = true; };
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
open = true;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.stable;
package = config.boot.kernelPackages.nvidiaPackages.production;
};
}
@@ -0,0 +1,30 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/142c88f4-b1bc-4ed9-92ee-2c52cdfa4274";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/01FE-EDCC";
fsType = "vfat";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+23
View File
@@ -0,0 +1,23 @@
{ user }:
{ pkgs, lib, config, ... }: {
imports = [ ./hl-minipc1.hardware-configuration.nix ];
# firmware updater
services.fwupd.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Data
fileSystems."/mnt/Data" = {
device = "/dev/sda1";
fsType = "ext4";
options = [ "nofail" ];
};
homelab.services.audiobookshelf = {
enable = true;
host = "0.0.0.0";
openFirewall = true;
port = 8000;
configDir = "/mnt/Data/audiobookshelf/config";
metadtaDir = "/mnt/Data/audiobookshelf/metadata";
};
}