Init commit

This commit is contained in:
2025-10-17 11:23:05 +03:00
parent 1e8707500a
commit 404a2ac233
4 changed files with 70 additions and 0 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

27
flake.lock generated Executable file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1753722563,
"narHash": "sha256-FK8iq76wlacriq3u0kFCehsRYTAqjA9nfprpiSWRWIc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "648f70160c03151bc2121d179291337ad6bc564b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

16
flake.nix Executable file
View File

@@ -0,0 +1,16 @@
{
description = "open webui flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = {...} @ inputs: let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
devShells.${system} = import ./shell.nix {
inherit pkgs;
};
};
}

26
shell.nix Executable file
View File

@@ -0,0 +1,26 @@
{pkgs}: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
python312
];
shellHook =
/*
bash
*/
''
if [ ! -d ./venv ]; then
python -m venv ./venv
source ./venv/bin/activate
pip install -U pip
pip install open-webui
deactivate
fi
source ./venv/bin/activate
'';
};
}