containers

This commit is contained in:
Lilith 2024-07-24 01:01:20 +02:00
parent 81a3c9ac67
commit a7d3e5b7b9
Signed by: lilith
GPG key ID: 8712A0F317C37175
4 changed files with 8 additions and 33 deletions

View file

@ -1,27 +1,7 @@
{ pkgs, lib, config, conf, ...}: { { config, lib, ...}: {
environment.systemPackages = with pkgs; [ config = lib.mkIf config.containers.enable {
arion virtualization.oci-containers.containers.ollama = lib.mkIf config.containers.ollama.enable {
docker-client image = "ollama/ollama@sha256:4325d935cd6e07cfa840eb193aad0594ba6cbc97ca9d0778f6716507cb3955ed";
];
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;
};
};
};
}; };
}; };
users.users.${conf.user}.extraGroups = ["podman"];
} }

View file

@ -1,5 +0,0 @@
{...}: {
projects.ollama = {
}
}

View file

@ -2,7 +2,7 @@
environment.variables = { environment.variables = {
EDITOR = "hx"; EDITOR = "hx";
VISUAL = "hx"; VISUAL = "hx";
FLAKE = conf.home + /nixos; FLAKE = "${conf.home}/nixos";
ELECTRON_OZONE_PLATFORM_HINT = "auto"; ELECTRON_OZONE_PLATFORM_HINT = "auto";
}; };
} }

View file

@ -1,4 +1,4 @@
{lib, config, ...}: { {lib, config, conf, ...}: {
imports = [ imports = [
./audio.nix ./audio.nix
./env.nix ./env.nix
@ -18,6 +18,6 @@
./syncthing.nix ./syncthing.nix
./wayland.nix ./wayland.nix
./zsh.nix ./zsh.nix
] ++ lib.optional config.containers.enable ./containers ./containers
; ];
} }