remoteenv cleanup

This commit is contained in:
Peder Bergebakken Sundt 2023-06-11 11:24:24 +02:00
parent ac56f68f3a
commit 8ee842d89a
3 changed files with 8 additions and 13 deletions

10
.envrc
View File

@ -15,15 +15,11 @@ if ! test -s .direnv/pull-date || test "$now" != "$(cat .direnv/pull-date)"; the
echo "$now" > .direnv/pull-date
fi
if command -v nixos-rebuild >/dev/null; then
use flake .#nixos-rebuild-nom
elif ! command -v nixos-rebuild >/dev/null; then
use flake .#non-nixos
fi
use flake .#envrc
if test -s .remote.toml; then
if ! command -v remote-init >/dev/null; then
use flake .#remote
if ! command -v remote-init >/dev/null || ! command -v tomlq >/dev/null; then
use flake .#envrc-remote
fi
echo
echo "Current remote: $(remote-host)"

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
eval "$(nix print-dev-env .#nixos-rebuild-nom)"
eval "$(nix print-dev-env .#remoteenv)"
echo Entered $(hostname --fqdn)

View File

@ -17,10 +17,9 @@
# 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.flake = false;
# 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-remote-exec.url = "github:pbsds/nixpkgs/remote-exec-init";
};
@ -118,15 +117,15 @@
'';
mkShell = packages: pkgs.mkShell { inherit packages; };
in {
nixos-rebuild-nom = mkShell [
remoteenv = mkShell [
nixos-rebuild-nom
];
non-nixos = mkShell [
envrc = mkShell [
nixos-rebuild-nom
pkgs.home-manager
pkgs.nix-output-monitor
];
remote = mkShell [
encrc-remote = mkShell [
remote-exec
pkgs.yq
];