Compare commits
No commits in common. "a09d10ab905a5f744bb48fbb003c6c85d2c1f0b4" and "3746abd6ec494d16082306111a47e9b4f4c7975c" have entirely different histories.
a09d10ab90
...
3746abd6ec
8
flake.lock
generated
8
flake.lock
generated
@ -666,11 +666,11 @@
|
|||||||
"sudoku-solver": "sudoku-solver"
|
"sudoku-solver": "sudoku-solver"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759620370,
|
"lastModified": 1759462273,
|
||||||
"narHash": "sha256-GTyxqIhtDTySs8f2l8N1zoS2wEBVFfF60nMJ7jEIWn0=",
|
"narHash": "sha256-eQVmWzWE9gzLSqEkvURyYoqLmDeiokGbQGkYvQ58kVc=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "6aea10172155c10e63d2efb454e28b9c1e50e3a6",
|
"rev": "9ab256ded797f78c9e411fe186dde9410be3049d",
|
||||||
"revCount": 108,
|
"revCount": 107,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.servidos.lat/jawz/scripts.git"
|
"url": "https://git.servidos.lat/jawz/scripts.git"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,31 +1,7 @@
|
|||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.my.servers.stash;
|
cfg = config.my.servers.stash;
|
||||||
cfgS = config.services.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;
|
||||||
@ -53,19 +29,5 @@ 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";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
BindReadOnlyPaths = lib.mkForce [ ];
|
|
||||||
BindPaths = lib.mkIf (cfgS.settings != { }) (map (stash: "${stash.path}") cfgS.settings.stash);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
users.users.stash = {
|
|
||||||
isSystemUser = true;
|
|
||||||
packages = [ stashPythonFHS ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user