File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 3
3
NixConfigurator ,
4
4
BuildbotNixConfig ,
5
5
)
6
+ import getpass
6
7
from buildbot .plugins import util
7
8
from buildbot .process .factory import BuildFactory
8
9
11
12
STATE_DIR = Path ("." )
12
13
PORT = 8012
13
14
url = f"http://localhost:{ PORT } "
15
+ current_user = getpass .getuser ()
16
+ gcroots_dir = Path ("/nix/var/nix/gcroots/per-user/" ) / current_user
17
+ if not gcroots_dir .exists ():
18
+ raise RuntimeError (
19
+ f"GC roots directory { gcroots_dir } does not exist. "
20
+ "Please ensure that the Nix daemon is running and that you have the correct permissions."
21
+ f" You can create it with `sudo mkdir -p { gcroots_dir } ` and `sudo chown { current_user } { gcroots_dir } `."
22
+ )
14
23
15
24
buildbot_nix_config = BuildbotNixConfig (
16
25
db_url = "sqlite:///state.sqlite" ,
31
40
domain = "localhost" ,
32
41
webhook_base_url = url ,
33
42
url = url ,
43
+ gcroots_dir = gcroots_dir ,
34
44
admins = ["admin" ],
35
45
)
36
46
You can’t perform that action at this time.
0 commit comments