diff --git a/flake.lock b/flake.lock index 8c45378..4ad035c 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1733769654, - "narHash": "sha256-aVvYDt8eitZVF6fdOrSoIzYRkQ5Gh6kfRvqkiaDRLL0=", + "lastModified": 1734093295, + "narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=", "owner": "nix-community", "repo": "home-manager", - "rev": "e952e94955dcc6fa2120c1430789fc41363f5237", + "rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733759999, - "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", + "lastModified": 1733940404, + "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", + "rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", "type": "github" }, "original": { diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index b342110..1be658d 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -142,9 +142,6 @@ # Install firefox. programs.firefox.enable = true; - # Add docker! - virtualisation.docker.enable = true; - virtualisation.docker.storageDriver = "btrfs"; # Only when using BTRFS! (wolcen approved!) # Required for DDEV to add hosts files, if your DNS will not resolve addresses to localhost. # Some firewall DNS resolvers will NOT allow an externally resolved domain name to resolve to a reserved IP (e.g. localhost). @@ -201,25 +198,8 @@ diffr # another diff hilighting tool brave # privacy oriented browser zig # the zig language - # fonts - anonymousPro - corefonts - dejavu_fonts - dina-font - fira-code - fira-code-symbols - gohufont - liberation_ttf - nerd-fonts.daddy-time-mono - nerd-fonts.monofur - nerd-fonts._3270 - nerd-fonts.ubuntu - noto-fonts - noto-fonts-color-emoji - noto-fonts-monochrome-emoji - mplus-outline-fonts.githubRelease - mononoki - proggyfonts + powerline # prompt utility + distrobox # instant alternate OS availability ]; programs.zsh.enable = true; programs.git = { @@ -234,22 +214,41 @@ nixpkgs.config.permittedInsecurePackages = [ "electron-27.3.11" ]; + fonts.packages = with pkgs; [ + anonymousPro + corefonts + dejavu_fonts + dina-font + fira-code + fira-code-symbols + gohufont + inconsolata + liberation_ttf + #nerd-fonts + nerd-fonts._0xproto + nerd-fonts._3270 + nerd-fonts.anonymice + nerd-fonts.daddy-time-mono + nerd-fonts.hack + nerd-fonts.jetbrains-mono + nerd-fonts.monofur + nerd-fonts.monoid + nerd-fonts.roboto-mono + nerd-fonts.sauce-code-pro + nerd-fonts.shure-tech-mono + nerd-fonts.space-mono + nerd-fonts.ubuntu + nerd-fonts.ubuntu-mono + nerd-fonts.zed-mono + noto-fonts + noto-fonts-color-emoji + noto-fonts-monochrome-emoji + mplus-outline-fonts.githubRelease + mononoki + powerline-fonts + proggyfonts + ]; - #fonts = { - # fontconfig.enable = true; - # enableFontDir = true; - # enableGhostscriptFonts = true; - # fonts = with pkgs; [ - # corefonts - # dejavu_fonts - # inconsolata - # source-han-sans-japanese - # source-han-sans-korean - # source-han-sans-simplified-chinese - # source-han-sans-traditional-chinese - # ubuntu_font_family - # ]; - #}; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; @@ -276,7 +275,56 @@ hardware.graphics.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; - + services.ollama = { + enable = true; + acceleration = "rocm"; + environmentVariables = { + HCC_AMDGPU_TARGET = "gfx1031"; # used to be necessary, but doesn't seem to anymore + }; + rocmOverrideGfx = "10.3.1"; + }; + system.activationScripts = { + script.text = '' + install -d -m 755 /home/wolcen/.open-webui -o root -g root + ''; + }; + virtualisation = { + # Add docker! + docker.enable = true; + podman.enable = false; + docker.storageDriver = "btrfs"; # Only when using BTRFS! (wolcen approved!) + oci-containers = { + backend = "docker"; + containers = { + open-webui = { + image = "ghcr.io/open-webui/open-webui:main"; + + environment = { + "TZ" = "America/New York"; + "OLLAMA_API_BASE_URL" = "http://127.0.0.1:11434/api"; + "OLLAMA_BASE_URL" = "http://127.0.0.1:11434"; + "WEBUI_URL" = "http://127.0.0.1:8080/"; + }; + + volumes = [ + "/home/wolcen/.openweb-ui:/app/backend/data" + ]; + + ports = [ + "127.0.0.1:3000:8080" # Ensures we listen only on localhost + ]; + + extraOptions = [ + "--pull=always" # Pull if the image on the registry is newer + "--name=open-webui" + "--hostname=open-webui" + "--network=host" + "--add-host=host.containers.internal:host-gateway" + ]; + }; + }; + }; + }; # Force radv environment.variables.AMD_VULKAN_ICD = "RADV"; # Or