forked from fediversity/fediversity
consolidate setup in script
This commit is contained in:
parent
da030f8b4f
commit
cb69cb41b5
2 changed files with 10 additions and 12 deletions
|
|
@ -2,22 +2,14 @@
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
|
||||||
<-- TODO: port to just -->
|
before using other commands, if not using direnv:
|
||||||
|
|
||||||
### updating npins
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cd launch/
|
nix-shell
|
||||||
$ echo "$(nix eval --json -f ../npins)" > .npins.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### local development
|
then to initialize, or after updating pins or TF providers:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ nix-shell
|
setup
|
||||||
$ eval "$(ssh-agent -s)"
|
|
||||||
# set your ssh key, e.g.:
|
|
||||||
$ ssh_key="$(readlink -f ~/.ssh/id_ed25519)"
|
|
||||||
$ rm -rf .terraform/
|
|
||||||
$ tofu init
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,11 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
setup = pkgs.writeScriptBin "setup" ''
|
||||||
|
echo '${lib.strings.toJSON sources}' > .npins.json
|
||||||
|
rm -rf .terraform/
|
||||||
|
tofu init
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# shell for testing TF directly
|
# shell for testing TF directly
|
||||||
|
|
@ -19,6 +24,7 @@ in
|
||||||
packages = [
|
packages = [
|
||||||
(import ./tf.nix { inherit lib pkgs; })
|
(import ./tf.nix { inherit lib pkgs; })
|
||||||
pkgs.jaq
|
pkgs.jaq
|
||||||
|
setup
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue