Commit graph

11 commits

Author SHA1 Message Date
0f8e5a2132 *: do not require env.sh
This removes the need to source env.{sh,fish} when working with hscloud.

This is done by:

 1. Implementing a Go library to reliably detect the location of the
    active hscloud checkout. That in turn is enabled by
    BUILD_WORKSPACE_DIRECTORY being now a thing in Bazel.
 2. Creating a tool `hscloud`, with a command `hscloud workspace` that
    returns the workspace path.
 3. Wrapping this tool to be accessible from Python and Bash.
 4. Bumping all users of hscloud_root to use either the Go library or
    one of the two implemented wrappers.

We also drive-by replace tools/install.sh to be a proper sh_binary, and
make it yell at people if it isn't being ran as `bazel run
//tools:install`.

Finally, we also drive-by delete cluster/tools/nixops.sh which was never used.

Change-Id: I7873714319bfc38bbb930b05baa605c5aa36470a
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1169
Reviewed-by: informatic <informatic@hackerspace.pl>
2021-10-17 21:21:58 +00:00
0c59cb33af shell.nix: add missing gnupg
This should fix secretstore on NixOS

Change-Id: Id86b0e920bef82f08a67a84e59d37d6f8737d83f
2021-09-14 20:00:42 +02:00
013c159dfe Merge "shell.nix: add missing tools" 2021-09-14 16:43:21 +00:00
cb9cbb3fcc shell.nix: add missing tools
Some tools were taken from "host" shell/PATH which crashed in certain
cases due to libc incompatiblity.

Fixes b/50

Change-Id: Ie94e2c064afff6d5aa782f70e0a024365079e4c7
2021-09-14 18:37:10 +02:00
7f7dcd9847 Merge "nix: upgrade readTree" 2021-09-11 10:19:03 +00:00
56ff18c486 nix: upgrade readTree
Change-Id: I460800dc3d8095e2ae89b8bd6ed7c5f0c90b6ccf
2021-09-11 12:18:04 +02:00
69ff6038d5 shell.nix: colorful prompt
https://object.ceph-waw3.hswaw.net/q3k-personal/815968ff10071d4192e464c91b64228e760128267311a94872006d87cbfd0bd9.png

Change-Id: Ia4eeddf045af0d0bdc962087aaeed55d11846648
2021-09-10 23:15:38 +00:00
51f6c10660 shell.nix: add git to targetPkgs
nix-shell attempts to use packages from the system and fails to find git
installed via users.users.<name>.packages.  Adding it to targetPkgs
resolves the issue and makes the dependency explicit.

Change-Id: Ie0c3e48065174a5032ced9c31236f65255483d08
2021-07-18 18:08:27 +00:00
43b0e0920f shell.nix: add random utilities
Change-Id: I49bfe400af054a8bcc0861f6066e7ca426590268
2021-06-06 12:59:44 +00:00
dce10bae86 shell.nix: add binutils and gcc
Fixes b.hswaw.net/33

Change-Id: Iadeb4157f4271ad684b6c2603d734cb0c098238d
2021-03-11 23:17:21 +00:00
c97461e844 shell.nix: actually add
This should've been merged in with cr/704. Whoops.

Change-Id: I1fe18a74462e8bdc0350c5ba26b51261b76c7ae1
2021-02-17 19:30:51 +00:00