From a7d3e5b7b9c66fa1436c20ce8427b9d9b1f1a412 Mon Sep 17 00:00:00 2001 From: Lilith Date: Wed, 24 Jul 2024 01:01:20 +0200 Subject: [PATCH] containers --- system/containers/default.nix | 28 ++++------------------------ system/containers/ollama.nix | 5 ----- system/env.nix | 2 +- system/full.nix | 6 +++--- 4 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 system/containers/ollama.nix diff --git a/system/containers/default.nix b/system/containers/default.nix index cadbe2c8..c6b2df7d 100644 --- a/system/containers/default.nix +++ b/system/containers/default.nix @@ -1,27 +1,7 @@ -{ pkgs, lib, config, conf, ...}: { - environment.systemPackages = with pkgs; [ - arion - docker-client - ]; - - virtualization = { - docker.enable = false; - podman.enable = true; - podman.dockerSocket.enable = true; - podman.defaultNetwork.dnsname.enable = true; - - arion.projects.ollama = lib.mkIf config.containers.ollama.enable { - settings.services = { - ollama = { - service = { - image = "ollama/ollama:sha256:4325d935cd6e07cfa840eb193aad0594ba6cbc97ca9d0778f6716507cb3955ed"; - useHostStore = true; - }; - }; - }; +{ config, lib, ...}: { + config = lib.mkIf config.containers.enable { + virtualization.oci-containers.containers.ollama = lib.mkIf config.containers.ollama.enable { + image = "ollama/ollama@sha256:4325d935cd6e07cfa840eb193aad0594ba6cbc97ca9d0778f6716507cb3955ed"; }; }; - - users.users.${conf.user}.extraGroups = ["podman"]; } - diff --git a/system/containers/ollama.nix b/system/containers/ollama.nix deleted file mode 100644 index 8da0ff1f..00000000 --- a/system/containers/ollama.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - projects.ollama = { - - } -} diff --git a/system/env.nix b/system/env.nix index 957336d9..c630d856 100644 --- a/system/env.nix +++ b/system/env.nix @@ -2,7 +2,7 @@ environment.variables = { EDITOR = "hx"; VISUAL = "hx"; - FLAKE = conf.home + /nixos; + FLAKE = "${conf.home}/nixos"; ELECTRON_OZONE_PLATFORM_HINT = "auto"; }; } diff --git a/system/full.nix b/system/full.nix index 14e02217..854733a2 100644 --- a/system/full.nix +++ b/system/full.nix @@ -1,4 +1,4 @@ -{lib, config, ...}: { +{lib, config, conf, ...}: { imports = [ ./audio.nix ./env.nix @@ -18,6 +18,6 @@ ./syncthing.nix ./wayland.nix ./zsh.nix - ] ++ lib.optional config.containers.enable ./containers - ; + ./containers + ]; }