ljkasdjlasdklj

This commit is contained in:
2025-05-01 16:55:19 +02:00
parent 8e5263b5d5
commit 495252670b
5 changed files with 29 additions and 8 deletions

View File

@@ -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-

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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;