remoteenv cleanup
This commit is contained in:
parent
ac56f68f3a
commit
8ee842d89a
10
.envrc
10
.envrc
|
@ -15,15 +15,11 @@ if ! test -s .direnv/pull-date || test "$now" != "$(cat .direnv/pull-date)"; the
|
||||||
echo "$now" > .direnv/pull-date
|
echo "$now" > .direnv/pull-date
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v nixos-rebuild >/dev/null; then
|
use flake .#envrc
|
||||||
use flake .#nixos-rebuild-nom
|
|
||||||
elif ! command -v nixos-rebuild >/dev/null; then
|
|
||||||
use flake .#non-nixos
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -s .remote.toml; then
|
if test -s .remote.toml; then
|
||||||
if ! command -v remote-init >/dev/null; then
|
if ! command -v remote-init >/dev/null || ! command -v tomlq >/dev/null; then
|
||||||
use flake .#remote
|
use flake .#envrc-remote
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "Current remote: $(remote-host)"
|
echo "Current remote: $(remote-host)"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
eval "$(nix print-dev-env .#nixos-rebuild-nom)"
|
eval "$(nix print-dev-env .#remoteenv)"
|
||||||
echo Entered $(hostname --fqdn)
|
echo Entered $(hostname --fqdn)
|
||||||
|
|
|
@ -17,10 +17,9 @@
|
||||||
|
|
||||||
# TODO: somehow make these private repos optional (a lazy fetch would be nice)
|
# TODO: somehow make these private repos optional (a lazy fetch would be nice)
|
||||||
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
pbsds-papers.url = "git+ssh://git@github.com/pbsds/papers.git";
|
||||||
#pbsds-papers.flake = false;
|
|
||||||
|
|
||||||
# temporary stuff i want to use
|
# temporary stuff i want to use
|
||||||
# TODO: can i fetch a subset of files if these? ^
|
# TODO: can i fetch a subset of files of these?
|
||||||
pr-polaris14.url = "github:pbsds/nixpkgs/polaris-14";
|
pr-polaris14.url = "github:pbsds/nixpkgs/polaris-14";
|
||||||
pr-remote-exec.url = "github:pbsds/nixpkgs/remote-exec-init";
|
pr-remote-exec.url = "github:pbsds/nixpkgs/remote-exec-init";
|
||||||
};
|
};
|
||||||
|
@ -118,15 +117,15 @@
|
||||||
'';
|
'';
|
||||||
mkShell = packages: pkgs.mkShell { inherit packages; };
|
mkShell = packages: pkgs.mkShell { inherit packages; };
|
||||||
in {
|
in {
|
||||||
nixos-rebuild-nom = mkShell [
|
remoteenv = mkShell [
|
||||||
nixos-rebuild-nom
|
nixos-rebuild-nom
|
||||||
];
|
];
|
||||||
non-nixos = mkShell [
|
envrc = mkShell [
|
||||||
nixos-rebuild-nom
|
nixos-rebuild-nom
|
||||||
pkgs.home-manager
|
pkgs.home-manager
|
||||||
pkgs.nix-output-monitor
|
pkgs.nix-output-monitor
|
||||||
];
|
];
|
||||||
remote = mkShell [
|
encrc-remote = mkShell [
|
||||||
remote-exec
|
remote-exec
|
||||||
pkgs.yq
|
pkgs.yq
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue