Init commit
This commit is contained in:
27
flake.lock
generated
Executable file
27
flake.lock
generated
Executable 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
16
flake.nix
Executable 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
26
shell.nix
Executable 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
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user