Compare commits
3 Commits
a60d5b16e2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
1c3fca3518
|
|||
|
fd77e045f4
|
|||
|
4832e5d70d
|
141
flake.lock
generated
141
flake.lock
generated
@@ -11,16 +11,15 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"systems": "systems_2",
|
||||
"vscode-server": "vscode-server"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780944121,
|
||||
"narHash": "sha256-aCuvB42Y+Di26o4csc2MCCUHyMJtOEqjpego344E+14=",
|
||||
"lastModified": 1781271331,
|
||||
"narHash": "sha256-ut5Bb92qeovYACgLzQeg/QLKqmWuw9G/xiwTyzj6Z4o=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "c4fb365814f7b3b45eab076f30fead512fab6382",
|
||||
"revCount": 554,
|
||||
"rev": "a2c2b2a2e5b64d5f7664c1067fbf05f9dffb7bd6",
|
||||
"revCount": 561,
|
||||
"type": "git",
|
||||
"url": "https://github.com/dotdoom/dotfiles.git"
|
||||
},
|
||||
@@ -30,23 +29,6 @@
|
||||
}
|
||||
},
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1778427648,
|
||||
"narHash": "sha256-pt9KaDGsMyYWB9JeHs4XGHs870f1lOZe3vx9LpVIhUE=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "6f293daa9f9f5832e13b497976335e90509886d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "5.1.11",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"brew-src_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1779646357,
|
||||
@@ -63,6 +45,23 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"brew-src_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1781226006,
|
||||
"narHash": "sha256-w4ZTuOnhYiDxjaynrMTASzp802QblBWmo3wpB8wVN4Y=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "109191be4988470b51a60a5ef1998520aa24c01b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "6.0.1",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -71,11 +70,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779036909,
|
||||
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
||||
"lastModified": 1780795403,
|
||||
"narHash": "sha256-AkWx4Zt9pQbD/f82Z8N57+d0HGLN/rV3gdMKJTpBPKs=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
||||
"rev": "6a771120d607dcccb279a27d227650e324815c35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -91,11 +90,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780795403,
|
||||
"narHash": "sha256-AkWx4Zt9pQbD/f82Z8N57+d0HGLN/rV3gdMKJTpBPKs=",
|
||||
"lastModified": 1781242433,
|
||||
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "6a771120d607dcccb279a27d227650e324815c35",
|
||||
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -196,11 +195,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779558945,
|
||||
"narHash": "sha256-G9CDHTBQvOglYRistiZ2nHvyupowPIGwn0cOFlvzo10=",
|
||||
"lastModified": 1780996927,
|
||||
"narHash": "sha256-eHLRPZfoJqi65kmDmtH5WSrfB6rkmRNy9lg6r/mmmzM=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "438bd6ee8fb77d3f3de364913e58b8dd5ef8d982",
|
||||
"revCount": 33,
|
||||
"rev": "06c21a86a1e097654e0657ebff648dbd47aeac6d",
|
||||
"revCount": 35,
|
||||
"type": "git",
|
||||
"url": "https://github.com/futureware-tech/nix.git"
|
||||
},
|
||||
@@ -218,11 +217,11 @@
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780942485,
|
||||
"narHash": "sha256-eb44NLHKDRk+T119UxVE2jGvzUPyz9pG1MagrpPSjnk=",
|
||||
"lastModified": 1780996927,
|
||||
"narHash": "sha256-eHLRPZfoJqi65kmDmtH5WSrfB6rkmRNy9lg6r/mmmzM=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "4389726b1ba7021690ca96c61e0797a5bb289e93",
|
||||
"revCount": 34,
|
||||
"rev": "06c21a86a1e097654e0657ebff648dbd47aeac6d",
|
||||
"revCount": 35,
|
||||
"type": "git",
|
||||
"url": "https://github.com/futureware-tech/nix.git"
|
||||
},
|
||||
@@ -419,11 +418,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779678629,
|
||||
"narHash": "sha256-gHcIFg0mm+KFsg7iZQt67kni3+qR5U3PhEC9P7vKlZ4=",
|
||||
"lastModified": 1781009359,
|
||||
"narHash": "sha256-w/mZkRscTatf8NWyUstli8ROzM/eopxZzi0WRjoeYkU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "612bbe3b405ad5f71d7bf9edecc04b678a061652",
|
||||
"rev": "c58ead12efcac436afffa93a22099a5595eb4157",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -439,11 +438,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780943742,
|
||||
"narHash": "sha256-01bTMR9ZPG+uxPaZBeOwagg5uxIaFYs2/3YIrOX+bCA=",
|
||||
"lastModified": 1781189114,
|
||||
"narHash": "sha256-5inaamLgUMWy+MOBE9ChF9QAF1o/74LFuHkI0W/9rqc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "df39142474950e42d5fc3bf2fef9d6c62abbe8d7",
|
||||
"rev": "486595d2cf49cfcd649b58a284fa11ac0e34da22",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -486,24 +485,6 @@
|
||||
"inputs": {
|
||||
"brew-src": "brew-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778851564,
|
||||
"narHash": "sha256-p8wzcnpB2Iys+QzAKM9/Eyw/pUyqCO3sw/NCnDH4dTE=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "b3a87b4793205cc111f3c61e25e018ffac3b8039",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew_2": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780492467,
|
||||
"narHash": "sha256-zMEJwtQPmsPPgPczFkyjWHgd1z0HagOPS2Wt2WDYLJY=",
|
||||
@@ -518,13 +499,31 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew_2": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781269551,
|
||||
"narHash": "sha256-zn0rty4K5LbBAzuyJMdncDbYzSefr29IUJvcUv7kFn8=",
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "5e721fc7756a6abffe07c7dd5ed3f9080b68108f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1780749050,
|
||||
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
|
||||
"lastModified": 1781074563,
|
||||
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
|
||||
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -534,22 +533,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1779694939,
|
||||
"narHash": "sha256-Ly4j75O8ICaSQx3uxPnwk2x7PMF0XQvn5r0c3yBA7FI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f9d8b65950353691ab56561e7c73d2e1063d810b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-screen": {
|
||||
"locked": {
|
||||
"lastModified": 1737753705,
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
inputs.fw_nix.nixosModules.identities
|
||||
inputs.artem_dotfiles.nixosModules.linux-headless
|
||||
inputs.artem_dotfiles.nixosModules.linux-lxc
|
||||
inputs.artem_dotfiles.nixosModules.jailed-agy
|
||||
inputs.fw_nix.nixosModules.nix-gc
|
||||
inputs.fw_nix.nixosModules.nix-settings
|
||||
inputs.fw_nix.nixosModules.tools
|
||||
|
||||
@@ -23,6 +23,7 @@ in
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true; # for agy
|
||||
environment.systemPackages = with pkgs; [
|
||||
(jail "jailed-agy" pkgs.antigravity-cli (
|
||||
with jail.combinators;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# At least have the following in .zshenv_local:
|
||||
# export GIT_AUTHOR_NAME='Alfred Muster'
|
||||
# export GIT_AUTHOR_EMAIL='test@example.com'
|
||||
# export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME?}"
|
||||
# export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL?}"
|
||||
[ -r ~/.zshenv_local ] && source ~/.zshenv_local || true
|
||||
180
migrated/.zshrc
180
migrated/.zshrc
@@ -1,180 +0,0 @@
|
||||
# Interactive shell.
|
||||
export PATH="${HOME}/bin:${PATH}"
|
||||
|
||||
# Login shell, connected via SSH, interactive (implied by running in this file),
|
||||
# not in a GNU screen session already and screen is installed: jump to an active
|
||||
# screen session or start a new, UTF-8 capable.
|
||||
#
|
||||
# Since we exec right afterwards, there's no point in setting this shell up.
|
||||
if [[ -o login ]]; then
|
||||
[ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && \
|
||||
[ -z "$STY" ] && \
|
||||
which screen 2>/dev/null && \
|
||||
exec screen -URR
|
||||
fi
|
||||
|
||||
HISTFILE=~/.zsh_history
|
||||
# History in the file
|
||||
HISTSIZE=10000
|
||||
# History in RAM
|
||||
SAVEHIST=10000
|
||||
setopt appendhistory
|
||||
setopt SHARE_HISTORY
|
||||
# Self-explanatory
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_dups
|
||||
# Remove older duplicates first
|
||||
setopt hist_expire_dups_first
|
||||
# Store timestamps
|
||||
setopt EXTENDED_HISTORY
|
||||
|
||||
export EDITOR=vim
|
||||
# Noticing this EDITOR setting, zsh will default to vim keybindings. No thanks.
|
||||
bindkey -e
|
||||
export PAGER='less -R -F -X -S -n -i -m'
|
||||
export LESSCHARSET=utf-8
|
||||
export PYTHONSTARTUP="$HOME/.pythonstartup"
|
||||
export NCURSES_NO_UTF8_ACS=1
|
||||
# For ls.
|
||||
export CLICOLOR=1
|
||||
# For dark terminal backgrounds.
|
||||
export LSCOLORS=HxFxCxDxBxEgEdHbHgHcHd
|
||||
|
||||
# Looking for more environment variables? Check out .zshenv!
|
||||
|
||||
alias rm='rm -i'
|
||||
alias mv='mv -i'
|
||||
alias cp='cp -i'
|
||||
alias crontab='crontab -i'
|
||||
|
||||
alias gb='git branch'
|
||||
alias gba='git branch -a'
|
||||
alias gc='git commit -v'
|
||||
alias gd='git diff'
|
||||
alias gdc='git diff --cached'
|
||||
alias gst='git status'
|
||||
|
||||
alias sudo='sudo -E '
|
||||
alias su='su -m'
|
||||
|
||||
alias pager=$PAGER
|
||||
alias grep='grep --line-buffered --color=auto'
|
||||
alias ipt='iptables -nvL --line-numbers'
|
||||
alias ip6t='ip6tables -nvL --line-numbers'
|
||||
alias tcpdump='tcpdump -l'
|
||||
alias ag='ag -C 2 --pager="$PAGER" --smart-case'
|
||||
alias mysql='mysql --select_limit=1000'
|
||||
alias logcat='adb logcat -v "color printable usec year zone" -T 10'
|
||||
alias readelf='readelf -W'
|
||||
alias l='ls -lA'
|
||||
alias ll='ls -la'
|
||||
# To kill the ControlMaster session (e.g. to modify it or when it's stuck).
|
||||
alias unssh='ssh -O exit'
|
||||
alias ffmpeg_q='ffmpeg -hide_banner -nostats -loglevel warning'
|
||||
|
||||
alias curl_t='curl -w \
|
||||
"# dnslookup: %{time_namelookup} | \
|
||||
connect: %{time_connect} | \
|
||||
appconnect: %{time_appconnect} | \
|
||||
pretransfer: %{time_pretransfer} | \
|
||||
starttransfer: %{time_starttransfer} | \
|
||||
total: %{time_total} | \
|
||||
size: %{size_download}\n"'
|
||||
|
||||
# nix-deploy # current host
|
||||
# nix-deploy nas # deploy nas
|
||||
# nix-deploy test secondary # deploy secondary but do not add to boot
|
||||
nix-deploy() {
|
||||
local action=switch target config cmd r_flake
|
||||
|
||||
if (( $# == 0 )); then
|
||||
# Local deployment.
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
cmd=darwin-rebuild
|
||||
r_flake="darwin#darwin-rebuild"
|
||||
else
|
||||
cmd=nixos-rebuild
|
||||
r_flake="nixpkgs#nixos-rebuild"
|
||||
fi
|
||||
|
||||
local run_cmd=($cmd)
|
||||
command -v "$cmd" >/dev/null 2>&1 || run_cmd=(nix run "$r_flake" --)
|
||||
sudo "${run_cmd[@]}" switch --flake . |& nom
|
||||
|
||||
# home-manager switch if exists.
|
||||
local hm_conf="$(whoami)@$(hostname -s)"
|
||||
if [[ "$(nix eval --json ".#homeConfigurations" --apply "x: x ? \"$hm_conf\"" 2>/dev/null)" == "true" ]]; then
|
||||
local hm_run=(home-manager)
|
||||
command -v home-manager >/dev/null 2>&1 || hm_run=(nix run "home-manager#home-manager" --)
|
||||
"${hm_run[@]}" switch --flake .
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
# Remote deployment (always NixOS).
|
||||
if (( $# == 1 )); then
|
||||
target=$1
|
||||
shift
|
||||
else
|
||||
action=$1
|
||||
target=$2
|
||||
shift 2
|
||||
fi
|
||||
|
||||
config=${${target#*@}%%.*}
|
||||
cmd=(nixos-rebuild)
|
||||
command -v nixos-rebuild >/dev/null 2>&1 || cmd=(nix run "nixpkgs#nixos-rebuild" --)
|
||||
|
||||
"${cmd[@]}" "$action" --flake ".#$config" --target-host "$target" --sudo "$@" |& nom
|
||||
}
|
||||
|
||||
myip() {
|
||||
if [ $# -eq 0 ]; then
|
||||
curl -4 --silent http://ipecho.net/plain; echo
|
||||
curl -6 --silent http://ipecho.net/plain; echo
|
||||
else
|
||||
ip addr show "$1" | sed -nr 's/\s+inet ([0-9.]+)\/.*/\1/p'
|
||||
fi
|
||||
}
|
||||
|
||||
colordiff() {
|
||||
local gitarg file1 file2
|
||||
for arg; do
|
||||
gitarg="$gitarg $file1"
|
||||
file1="$file2"
|
||||
file2="$arg"
|
||||
done
|
||||
# git won't diff against a pipe, so a kind of workaround
|
||||
cat "$file2" | git diff --no-prefix $gitarg --no-index "$file1" -
|
||||
}
|
||||
|
||||
alias backup-home-explore='eval "ncdu $(grep -A1 -- --exclude $HOME/bin/backup-home | tr -d \|)"'
|
||||
|
||||
# stderr redirect for if direnv is missing
|
||||
eval "$(direnv hook zsh 2>/dev/null)"
|
||||
|
||||
if [ -z "$SSH_AUTH_SOCK" -a -z "$SSH_CLIENT" ]; then
|
||||
# This path is only needed in a local shell.
|
||||
#
|
||||
# In a screen session, we set SSH_AUTH_SOCK to a fixed path in
|
||||
# .screenrc before a shell is started.
|
||||
#
|
||||
# That fixed path is a symlink which gets updated by .ssh/rc scrtipt.
|
||||
eval `ssh-agent -s`
|
||||
trap 'ssh-agent -k' EXIT
|
||||
fi
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd_functions+=( vcs_info )
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' stagedstr '%F{green}*%f'
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*%f'
|
||||
zstyle ':vcs_info:git:*' formats ' (%F{cyan}%b%f%c%u)'
|
||||
setopt prompt_subst
|
||||
PROMPT='${IN_NIX_SHELL}%(?..%F{red}%?%f )[%n@%m] %3~${vcs_info_msg_0_} %# '
|
||||
|
||||
# Expand aliases by the press of TAB.
|
||||
zstyle ':completion:*' completer _expand_alias _complete _ignored
|
||||
|
||||
[ -r ~/.zshrc_local ] && source ~/.zshrc_local || true
|
||||
Reference in New Issue
Block a user