flake: add 'upcache' command
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
easy way to push dev env to cachix
This commit is contained in:
parent
d0350962e9
commit
9f37caad91
10
flake.nix
10
flake.nix
@ -127,6 +127,15 @@
|
||||
cd $(git rev-parse --show-toplevel)
|
||||
go test ./...
|
||||
'';
|
||||
upcache = pkgs.writeShellScriptBin "upcache" ''
|
||||
## refs:
|
||||
## https://fzakaria.com/2020/08/11/caching-your-nix-shell.html
|
||||
## https://nixos.wiki/wiki/Caching_nix_shell_build_inputs
|
||||
nix-store --query --references $(nix-instantiate shell.nix) | \
|
||||
xargs nix-store --realise | \
|
||||
xargs nix-store --query --requisites | \
|
||||
cachix push go-xkcdreader
|
||||
'';
|
||||
in
|
||||
{
|
||||
default = with pkgs; mkShell
|
||||
@ -163,6 +172,7 @@
|
||||
## ad-hoc cmds
|
||||
gob
|
||||
gota
|
||||
upcache
|
||||
|
||||
gopls
|
||||
gofumpt
|
||||
|
Loading…
Reference in New Issue
Block a user