summaryrefslogtreecommitdiff
path: root/Omni/Dev/Beryllium
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Dev/Beryllium')
-rw-r--r--Omni/Dev/Beryllium/Configuration.nix17
-rw-r--r--Omni/Dev/Beryllium/Hardware.nix20
-rw-r--r--Omni/Dev/Beryllium/Ollama.nix29
3 files changed, 34 insertions, 32 deletions
diff --git a/Omni/Dev/Beryllium/Configuration.nix b/Omni/Dev/Beryllium/Configuration.nix
index 16f4bca..69c83a6 100644
--- a/Omni/Dev/Beryllium/Configuration.nix
+++ b/Omni/Dev/Beryllium/Configuration.nix
@@ -1,8 +1,8 @@
-{ pkgs, ... }:
-
-let ports = import ../../Cloud/Ports.nix;
+{pkgs, ...}: let
+ ports = import ../../Cloud/Ports.nix;
in {
- imports = [ # Include the results of the hardware scan.
+ imports = [
+ # Include the results of the hardware scan.
./Hardware.nix
];
@@ -10,8 +10,8 @@ in {
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
- boot.kernelModules = [ "v4l2loopback" ];
- boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
+ boot.kernelModules = ["v4l2loopback"];
+ boot.extraModulePackages = [pkgs.linuxPackages.v4l2loopback];
# Enable networking
networking.networkmanager.enable = true;
@@ -68,7 +68,7 @@ in {
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
- services.xserver.videoDrivers = [ "nvidia" ];
+ services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.nvidiaPersistenced = true;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.powerManagement.enable = false;
@@ -103,7 +103,7 @@ in {
systemd.services.NetworkManager-wait-online.enable = false;
- networking.firewall.allowedTCPPorts = [ ports.barrier ];
+ networking.firewall.allowedTCPPorts = [ports.barrier];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
@@ -111,5 +111,4 @@ in {
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
-
}
diff --git a/Omni/Dev/Beryllium/Hardware.nix b/Omni/Dev/Beryllium/Hardware.nix
index ecf425c..5a8b583 100644
--- a/Omni/Dev/Beryllium/Hardware.nix
+++ b/Omni/Dev/Beryllium/Hardware.nix
@@ -1,16 +1,18 @@
# 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") ];
+ config,
+ lib,
+ modulesPath,
+ ...
+}: {
+ imports = [(modulesPath + "/installer/scan/not-detected.nix")];
- boot.initrd.availableKernelModules =
- [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ "kvm-amd" ];
- boot.extraModulePackages = [ ];
+ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
+ boot.initrd.kernelModules = [];
+ boot.kernelModules = ["kvm-amd"];
+ boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f96eaa16-d0e2-4230-aece-131ce7b630da";
@@ -22,7 +24,7 @@
fsType = "vfat";
};
- swapDevices = [ ];
+ swapDevices = [];
# 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
diff --git a/Omni/Dev/Beryllium/Ollama.nix b/Omni/Dev/Beryllium/Ollama.nix
index 35b4fe1..0018f49 100644
--- a/Omni/Dev/Beryllium/Ollama.nix
+++ b/Omni/Dev/Beryllium/Ollama.nix
@@ -1,19 +1,20 @@
-{ pkgs, ... }:
-/* Ollama API service
+{pkgs, ...}:
+/*
+Ollama API service
- Don't put too much work into this, there's a much better and more complete
- ollama service (with webui!) being built here:
- https://github.com/NixOS/nixpkgs/pull/275448
+Don't put too much work into this, there's a much better and more complete
+ollama service (with webui!) being built here:
+https://github.com/NixOS/nixpkgs/pull/275448
- If you want to spend time on it, spend time over there.
+If you want to spend time on it, spend time over there.
*/
-let pkg = pkgs.unstable.ollama;
+let
+ pkg = pkgs.unstable.ollama;
in {
-
systemd.services.ollama = {
description = "ollama";
- after = [ "network.target" ];
- wantedBy = [ "multi-user.target" ];
+ after = ["network.target"];
+ wantedBy = ["multi-user.target"];
environment = {
OLLAMA_HOST = "localhost:11434";
@@ -31,18 +32,18 @@ in {
Restart = "on-failure";
RestartSec = 3;
# Persistent storage for model files, i.e. /var/lib/<StateDirectory>
- StateDirectory = [ "ollama" ];
+ StateDirectory = ["ollama"];
};
};
# for administration, make this available to users' PATH
- environment.systemPackages = [ pkg ];
+ environment.systemPackages = [pkg];
- users.groups.ollama = { };
+ users.groups.ollama = {};
users.users.ollama = {
group = "ollama";
isSystemUser = true;
- extraGroups = [ "render" "video" ];
+ extraGroups = ["render" "video"];
};
}