fix to have stash plugins work

This commit is contained in:
Danilo Reyes 2025-10-04 19:09:57 -06:00
parent 3746abd6ec
commit 84737df99b
2 changed files with 36 additions and 5 deletions

8
flake.lock generated
View File

@ -666,11 +666,11 @@
"sudoku-solver": "sudoku-solver" "sudoku-solver": "sudoku-solver"
}, },
"locked": { "locked": {
"lastModified": 1759462273, "lastModified": 1759620370,
"narHash": "sha256-eQVmWzWE9gzLSqEkvURyYoqLmDeiokGbQGkYvQ58kVc=", "narHash": "sha256-GTyxqIhtDTySs8f2l8N1zoS2wEBVFfF60nMJ7jEIWn0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "9ab256ded797f78c9e411fe186dde9410be3049d", "rev": "6aea10172155c10e63d2efb454e28b9c1e50e3a6",
"revCount": 107, "revCount": 108,
"type": "git", "type": "git",
"url": "https://git.servidos.lat/jawz/scripts.git" "url": "https://git.servidos.lat/jawz/scripts.git"
}, },

View File

@ -1,7 +1,30 @@
{ lib, config, ... }: {
lib,
config,
pkgs,
...
}:
let let
cfg = config.my.servers.stash; cfg = config.my.servers.stash;
setup = import ../factories/mkserver.nix { inherit lib config; }; setup = import ../factories/mkserver.nix { inherit lib config; };
stashPythonFHS = pkgs.buildFHSEnv {
name = "stash-python-fhs";
targetPkgs =
pkgs:
builtins.attrValues {
inherit (pkgs)
python3
gcc
glibc
;
inherit (pkgs.python3Packages)
pip
virtualenv
;
inherit (pkgs.stdenv.cc.cc) lib;
};
runScript = "bash";
};
in in
{ {
options.my.servers.stash = setup.mkOptions "stash" "xxx" 9999; options.my.servers.stash = setup.mkOptions "stash" "xxx" 9999;
@ -29,5 +52,13 @@ in
]; ];
}; };
}; };
systemd.services.stash.environment = {
PYTHONPATH = "/var/lib/stash/venv/lib/python3.12/site-packages";
LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.glibc}/lib:${pkgs.zlib}/lib:${pkgs.libffi}/lib:${pkgs.openssl}/lib";
};
users.users.stash = {
isSystemUser = true;
packages = [ stashPythonFHS ];
};
}; };
} }