From c0badcb2dde9f2e28d62da120f1adb570ad3b7ef Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Fri, 14 Jun 2024 11:48:55 -0400 Subject: [PATCH] ollama + python --- hosts/fwbook.nix | 34 ++++++++++++--------------------- modules/home-manager/common.nix | 5 ++--- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 1694856..4c5e5eb 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -1,37 +1,26 @@ -{ user -, dataDir ? "/mnt/Data" -}: +{ user, dataDir ? "/mnt/Data" }: { pkgs, lib, ... }: let zshFWBook = builtins.filterSource (p: t: true) ../configs/fwbook; zshFunctions = zshFWBook + "/functions.sh"; in { - imports = - [ - ./fwbook.hardware-configuration.nix - ]; + imports = [ ./fwbook.hardware-configuration.nix ]; services.fwupd.enable = true; services.fwupd.package = (import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz"; + url = + "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz"; sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk"; }) - { - inherit (pkgs) system; - }).fwupd; + { inherit (pkgs) system; }).fwupd; services.fprintd.enable = true; fileSystems."${dataDir}" = { device = "/dev/sda1"; fsType = "ext4"; - options = [ - "users" - "nofail" - ]; - }; - hardware.bluetooth.settings.General = { - ControllerMode = "bredr"; + options = [ "users" "nofail" ]; }; + hardware.bluetooth.settings.General = { ControllerMode = "bredr"; }; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -49,6 +38,8 @@ in amdctl # Display Libraries displaylink + # python + python312 ]; # Gaming programs.gamescope.enable = true; @@ -61,6 +52,8 @@ in services.ollama = { enable = true; acceleration = "rocm"; + # host = "0.0.0.0"; + openFirewall = true; }; # Display Managers services.xserver.videoDrivers = [ "displaylink" "modesetting" ]; @@ -69,10 +62,7 @@ in ''; # Kernel boot.initrd.kernelModules = [ "amdgpu" "evdi" ]; - hardware.opengl.extraPackages = with pkgs; [ - rocmPackages.clr.icd - amdvlk - ]; + hardware.opengl.extraPackages = with pkgs; [ rocmPackages.clr.icd amdvlk ]; # Add Functions home-manager.users.${user.name}.programs.zsh.initExtra = '' source ${zshFunctions} diff --git a/modules/home-manager/common.nix b/modules/home-manager/common.nix index 6624a14..6dda461 100644 --- a/modules/home-manager/common.nix +++ b/modules/home-manager/common.nix @@ -21,9 +21,7 @@ in }; home-manager.users.${user.name} = { home = { - sessionVariables = { - MAMBA_ROOT_PREFIX = "$HOME/.local/micromamba"; - }; + sessionVariables = { MAMBA_ROOT_PREFIX = "$HOME/.local/micromamba"; }; stateVersion = homeMangerVersion; shellAliases = { cat = "bat"; @@ -41,6 +39,7 @@ in ipfetch nixd devbox + uv ]; }; programs = {