added new configs for ender-ml
This commit is contained in:
@@ -74,6 +74,9 @@
|
||||
++ lib.optionals (hostTypes.isServer hostname) (with pkgs; [
|
||||
# Add server-specific packages here
|
||||
])
|
||||
++ lib.optionals (hostname == "") [
|
||||
|
||||
]
|
||||
# Host-specific packages
|
||||
++ lib.optionals (hostname == "eva-01") [
|
||||
# cli
|
||||
@@ -144,6 +147,19 @@
|
||||
identityFile = "~/.ssh/github-buildbox";
|
||||
user = "git";
|
||||
};
|
||||
} // lib.optionalAttrs (hostname == "ender-ml") {
|
||||
"192.168.8.109" = {
|
||||
identityFile = "~/.ssh/gitea-ender-ml";
|
||||
user = "gitea";
|
||||
};
|
||||
"gitea.miguelmuniz.com" = {
|
||||
identityFile = "~/.ssh/gitea-ender-ml";
|
||||
user = "gitea";
|
||||
};
|
||||
"github.com" = {
|
||||
identityFile = "~/.ssh/github-ender-ml";
|
||||
user = "git";
|
||||
};
|
||||
};
|
||||
extraConfig = if hostname == "eva-02"
|
||||
then ''
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
name = "rogueking";
|
||||
email = "miguel@muniz.org";
|
||||
};
|
||||
} // lib.optionalAttrs (! (lib.elem hostname [ "buildbox" ])) {
|
||||
} // lib.optionalAttrs (! (lib.elem hostname [ "buildbox" "ender-ml" ])) {
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
ssh = lib.optionalAttrs (hostname == "eva-02") {
|
||||
@@ -22,7 +22,7 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
} // lib.optionalAttrs (! (lib.elem hostname [ "buildbox" ])) {
|
||||
} // lib.optionalAttrs (! (lib.elem hostname [ "buildbox" "ender-ml" ])) {
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
signer = if hostname == "eva-02"
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
#Kernel
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = lib.mkDefault true;
|
||||
boot.loader.grub.devices = [ "nodev" ];
|
||||
@@ -42,15 +45,17 @@
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
|
||||
hardware.nvidia = {
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
@@ -71,6 +76,11 @@
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://cache.nixos-cuda.org" ];
|
||||
trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
@@ -127,18 +137,18 @@
|
||||
|
||||
# Enable ollama
|
||||
services.ollama = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
acceleration = "cuda";
|
||||
package = pkgs-unstable.ollama;
|
||||
};
|
||||
|
||||
services.llama-cpp = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.llama-cpp;
|
||||
cudaSupport = true;
|
||||
};
|
||||
#services.llama-cpp = {
|
||||
# enable = true;
|
||||
# package = pkgs-unstable.llama-cpp;
|
||||
# model = "/home/rogueking/models";
|
||||
#};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
programs.zsh.enable = true;
|
||||
@@ -211,7 +221,8 @@
|
||||
tlp
|
||||
unzip
|
||||
vim
|
||||
|
||||
|
||||
pkgs-unstable.llama-cpp
|
||||
pkgs-unstable.witr
|
||||
];
|
||||
|
||||
|
||||
@@ -8,28 +8,17 @@
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2387c615-e566-44ed-a708-ebd407ee16f6";
|
||||
{ device = "/dev/disk/by-uuid/bf8d1e67-f9c0-47ef-a635-2aeef68246a6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ {
|
||||
device = "/var/lib/swapfile";
|
||||
size = 4*1024;
|
||||
} ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user