diff --git a/justfile b/justfile index e5ac869..fbebd2b 100644 --- a/justfile +++ b/justfile @@ -42,14 +42,14 @@ update: git add flake.lock # todo: support system-manager -#build hostname=`if test -z "${IS_REMOTE_ENV:-}"; then just _a_host_timeout; else printf "\n"; fi`: +# todo: support home-manager? build hostname="": nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" # todo: support system-manager -#build-no-remote-builders hostname=`if test -z "$IS_REMOTE_ENV"; then just _a_host_timeout; else printf "\n"; fi`: -build-no-remote-builders hostname="": - nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" --builders "" +# todo: support home-manager? +build-no-config hostname="": + nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" --builders "" --option access-tokens "" build-vm hostname=`just _a_host`: nixos-rebuild build-vm --accept-flake-config --show-trace --flake .#"{{hostname}}" @@ -283,6 +283,9 @@ motd: @_some_remote_labels: just remote-list | gum filter --placeholder "Pick remotes..." --no-limit | cut -d' ' -f2 +@_some_remote_label_names: + just remote-list | gum filter --placeholder "Pick remotes..." --no-limit | tr ' ' '\t' | cut -f2,5 + @_a_remote_fqdn: just remote-list | gum filter --placeholder "Pick a remote..." | cut -d' ' -f5- diff --git a/profiles/oci/podman.nix b/profiles/oci/podman.nix index bafe025..1f9a8bf 100644 --- a/profiles/oci/podman.nix +++ b/profiles/oci/podman.nix @@ -8,6 +8,12 @@ virtualisation.podman.autoPrune.dates = "weekly"; #virtualisation.podman.autoPrune.flags = [ "--all" ]; + # needed by arion + # TODO: figure out if i want it + # https://docs.hercules-ci.com/arion/ + #virtualisation.podman.dockerSocket.enable = true; + #virtualisation.podman.defaultNetwork.dnsname.enable = true; + environment.systemPackages = with pkgs; [ #podman-compose # TODO: docker-compose alias to this podman-tui diff --git a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh index b9e9fc4..7266aa2 100644 --- a/users/pbsds/home/profiles/bashrc.d/nix-shell.sh +++ b/users/pbsds/home/profiles/bashrc.d/nix-shell.sh @@ -1,4 +1,3 @@ -# TODO: nom _ns_ohk2aaDu() { local is_dev=$1; shift # "true" or "false" if $is_dev; then @@ -53,7 +52,11 @@ _ns_ohk2aaDu() { export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM export NIXPKGS_ALLOW_UNFREE export NIXPKGS_ALLOW_INSECURE - nix --extra-experimental-features "nix-command flakes" build --impure "${args[@]}" --print-out-paths --no-link + if [[ -t 2 ]] && command -v nom >/dev/null ]]; then + nom build --extra-experimental-features "nix-command flakes" --impure "${args[@]}" --print-out-paths --no-link + else + nix build --extra-experimental-features "nix-command flakes" --impure "${args[@]}" --print-out-paths --no-link + fi )" if [[ $? -ne 0 || -z "$outpaths" ]]; then return @@ -116,6 +119,12 @@ _ns_ohk2aaDu() { fi export MANPATH="$storepath/share/man:$MANPATH" fi + # TODO: see /nix/store/...-bash-completion-2.14.0/etc/profile.d/bash_completion.sh for details on how to source these + # if [[ -d "$storepath/share/bash-completion/completions" ]] && shopt -q progcomp; then + # "$storepath/share/bash-completion/completions/*.bash" + # "$storepath/share/bash-completion/completions/*" + # "$storepath/share/bash-completion/completions/_*" + # fi if [[ -d "$storepath/share/pkgconfig" ]]; then export PKG_CONFIG_PATH="$storepath/share/pkgconfig${PKG_CONFIG_PATH:+":$PKG_CONFIG_PATH"}" fi diff --git a/users/pbsds/home/profiles/bashrc.d/zeditor-remote.sh b/users/pbsds/home/profiles/bashrc.d/zeditor-remote.sh index 18018ef..ae9e00c 100644 --- a/users/pbsds/home/profiles/bashrc.d/zeditor-remote.sh +++ b/users/pbsds/home/profiles/bashrc.d/zeditor-remote.sh @@ -61,7 +61,7 @@ zeditor-remote() { return 1 fi - local prefix="${gum input }" + local prefix="$(gum input --value="repos/")" # make $prefix relative to $HOME if [[ "$prefix" =~ ^/ ]]; then prefix="${prefix//"$HOME/"/}" @@ -123,9 +123,10 @@ zeditor-remote() { rg <<<"$choice" '^ssh://([^/]*)/(~/.*)$' -r '$1' || printf "%s\n" localhost ) local ssh_cd_cmd=$( - rg <<<"$choice" '^ssh://([^/]*)/(~/.*)$' -r 'ssh -t "$1" "cd $2; \\$$SHELL -l"' ||: + rg <<<"$choice" '^ssh://([^/]*)/(~/.*)$' -r 'ssh -t "$1" "cd $2; \$$SHELL -l"' ||: ) + # TODO: find a way for this definition not to leak out of the function # TODO: evict lru_push() { local line="$1" diff --git a/users/pbsds/home/profiles/shell.nix b/users/pbsds/home/profiles/shell.nix index e0c3915..29a5146 100644 --- a/users/pbsds/home/profiles/shell.nix +++ b/users/pbsds/home/profiles/shell.nix @@ -83,6 +83,8 @@ in #historyWidgetOptions = [ "--sort" "--exact" ]; }; + # TODO: slow when colors are enabled, use lsd instead? + # https://github.com/eza-community/eza/issues/922 programs.eza.enable = true; programs.eza.enableAliases = lib.mkIf (lib.versionOlder config.home.version.release "24.05") true; programs.eza.enableBashIntegration = true;