stability is near?

This commit is contained in:
L-Nafaryus 2023-06-15 11:05:31 +05:00
parent 82045cb546
commit 5c5ba91aa7
19 changed files with 1807 additions and 226 deletions

View File

@ -35,7 +35,7 @@
(emoji +unicode) ; 🙂 (emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
;;indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side ;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
@ -87,8 +87,8 @@
:tools :tools
;;ansible ;;ansible
biblio ; Writes a PhD for you (citation needed) biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs debugger ; FIXME stepping through code, to help you add bugs
;;direnv direnv
;;docker ;;docker
;;editorconfig ; let someone else argue about tabs vs spaces ;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs ;;ein ; tame Jupyter notebooks with emacs
@ -151,7 +151,7 @@
;;lua ; one-based indices? one-based indices ;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c ;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!" (nix +lsp) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel ;;ocaml ; an objective camel
org ; organize your plain life in plain text org ; organize your plain life in plain text
;;php ; perl's insecure younger brother ;;php ; perl's insecure younger brother

1655
config/zsh/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,16 +19,13 @@ if ! zgenom saved; then
$XDG_CACHE_HOME/zsh/*(N) \ $XDG_CACHE_HOME/zsh/*(N) \
$ZGEN_INIT.zwc $ZGEN_INIT.zwc
# NOTE Be extra careful about plugin load order, or subtle breakage can # NOTE Be extra careful about plugin load order, or subtle breakage can emerge
# emerge. This is the best order I've sussed out for these plugins.
zgenom load junegunn/fzf shell zgenom load junegunn/fzf shell
zgenom load jeffreytse/zsh-vi-mode
zgenom load zdharma-continuum/fast-syntax-highlighting zgenom load zdharma-continuum/fast-syntax-highlighting
zgenom load zsh-users/zsh-completions src zgenom load zsh-users/zsh-completions src
zgenom load zsh-users/zsh-autosuggestions zgenom load zsh-users/zsh-autosuggestions
zgenom load zsh-users/zsh-history-substring-search zgenom load zsh-users/zsh-history-substring-search
zgenom load romkatv/powerlevel10k powerlevel10k zgenom load romkatv/powerlevel10k powerlevel10k
zgenom load hlissner/zsh-autopair autopair.zsh
zgenom save zgenom save
zgenom compile $ZDOTDIR zgenom compile $ZDOTDIR
@ -41,6 +38,7 @@ if [[ $TERM != dumb ]]; then
source $ZDOTDIR/keybinds.zsh source $ZDOTDIR/keybinds.zsh
source $ZDOTDIR/completion.zsh source $ZDOTDIR/completion.zsh
source $ZDOTDIR/aliases.zsh source $ZDOTDIR/aliases.zsh
source $ZDOTDIR/.p10k.zsh
# Auto-generated by nixos # Auto-generated by nixos
_source $ZDOTDIR/extra.zshrc _source $ZDOTDIR/extra.zshrc
@ -48,5 +46,4 @@ if [[ $TERM != dumb ]]; then
_source $ZDOTDIR/local.zshrc _source $ZDOTDIR/local.zshrc
_cache fasd --init posix-alias zsh-{hook,{c,w}comp{,-install}} _cache fasd --init posix-alias zsh-{hook,{c,w}comp{,-install}}
autopair-init
fi fi

View File

@ -78,7 +78,7 @@ function zman {
} }
# Create a reminder with human-readable durations, e.g. 15m, 1h, 40s, etc # Create a reminder with human-readable durations, e.g. 15m, 1h, 40s, etc
function r { function remind {
local time=$1; shift local time=$1; shift
sched "$time" "notify-send --urgency=critical 'Reminder' '$@'; ding"; sched "$time" "notify-send --urgency=critical 'Reminder' '$@'; ding";
}; compdef r=sched }; compdef remind=sched

View File

@ -1,36 +0,0 @@
#compdef hey
_hey_dispatch () {
local cmd="$@"
local offset=$#
CURRENT=$((CURRENT-$offset))
words=($cmd "${words[$((2 + offset)),-1]}")
_$cmd
}
_hey_command_list () {
hey | sed '1,/Available commands:/d' | awk '{ print $1 }'
}
_hey () {
local -a commands
IFS=$'\n' commands=($(_hey_command_list))
if (( CURRENT == 2 )); then
_describe -t commands "hey commands" commands
return
fi
integer ret=1
case ${words[2]} in
ch|channel) _hey_dispatch nix-channel ;;
b|build) _hey_dispatch nix-build ;;
ch|check) _hey_dispatch nix flake check ;;
sh|show) _hey_dispatch nix flake show ;;
s|search) _hey_dispatch nix search nixpkgs ;;
-*) _hey_dispatch nix-env ;;
*) _message "Command not found: ${words[2]}" ;;
esac
return ret
}
_hey

View File

@ -11,10 +11,6 @@ fi
# we handle compinit ourselves... # we handle compinit ourselves...
export ZGEN_AUTOLOAD_COMPINIT=0 export ZGEN_AUTOLOAD_COMPINIT=0
# zsh-vi-mode
export ZVM_INIT_MODE=sourcing
export ZVM_VI_INSERT_ESCAPE_BINDKEY=jk
# fasd # fasd
export _FASD_DATA="$XDG_CACHE_HOME/fasd" export _FASD_DATA="$XDG_CACHE_HOME/fasd"
export _FASD_VIMINFO="$XDG_CACHE_HOME/viminfo" export _FASD_VIMINFO="$XDG_CACHE_HOME/viminfo"

View File

@ -1,65 +0,0 @@
# Other conveniences
bindkey -M viins '^a' beginning-of-line
bindkey -M viins '^d' push-line-or-edit
# Up arrow:
bindkey '\e[A' history-substring-search-up
bindkey '\eOA' history-substring-search-up
# Down arrow:
bindkey '\e[B' history-substring-search-down
bindkey '\eOB' history-substring-search-down
# C-z to toggle current process (background/foreground)
fancy-ctrl-z () {
if [[ $#BUFFER -eq 0 ]]; then
BUFFER="fg"
zle accept-line
else
zle push-input
zle clear-screen
fi
}
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z
if (( $+commands[fzf] )); then
bindkey '^R' fzf-history-widget
fi
# Omni-Completion
if (( $+commands[fasd] )); then
bindkey -M viins '^x^f' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
bindkey -M viins '^x^d' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
fi
# Completing words in buffer in tmux
if [ -n "$TMUX" ]; then
_tmux_pane_words() {
local expl
local -a w
if [[ -z "$TMUX_PANE" ]]; then
_message "not running inside tmux!"
return 1
fi
w=( ${(u)=$(tmux capture-pane \; show-buffer \; delete-buffer)} )
_wanted values expl 'words from current tmux pane' compadd -a w
}
zle -C tmux-pane-words-prefix complete-word _generic
zle -C tmux-pane-words-anywhere complete-word _generic
bindkey -M viins '^x^n' tmux-pane-words-prefix
bindkey -M viins '^x^o' tmux-pane-words-anywhere
zstyle ':completion:tmux-pane-words-(prefix|anywhere):*' completer _tmux_pane_words
zstyle ':completion:tmux-pane-words-(prefix|anywhere):*' ignore-line current
zstyle ':completion:tmux-pane-words-anywhere:*' matcher-list 'b:=* m:{A-Za-z}={a-zA-Z}'
fi
# Vim's C-x C-l in zsh
history-beginning-search-backward-then-append() {
zle history-beginning-search-backward
zle vi-add-eol
}
zle -N history-beginning-search-backward-then-append
bindkey -M viins '^x^l' history-beginning-search-backward-then-append

View File

@ -76,5 +76,6 @@ with lib.custom;
curl curl
gnumake gnumake
unzip unzip
cachix
]; ];
} }

View File

@ -29,11 +29,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1686109285, "lastModified": 1686133476,
"narHash": "sha256-VeKVr7TQdJMEQLTPCA0hfusG3N6JMOTZZUYfMx0B8Ho=", "narHash": "sha256-RCkGMdQ9oivH4bdEwQDyFEIP7bQmdPahTFtBw5rVuyk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "fe83f47d0a8240ec1d81928705f6b02dc722fbbd", "rev": "d80c21d639094ecc95f5ea437a141090499384d0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,11 +120,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1685999310, "lastModified": 1686142265,
"narHash": "sha256-gaRMZhc7z4KeU/xS3IWv3kC+WhVcAXOLXXGKLe5zn1Y=", "narHash": "sha256-IP0xPa0VYqxCzpqZsg3iYGXarUF+4r2zpkhwdHy9WsM=",
"owner": "rycee", "owner": "rycee",
"repo": "home-manager", "repo": "home-manager",
"rev": "28614ed7a1e3ace824c122237bdc0e5e0b62c5c3", "rev": "39c7d0a97a77d3f31953941767a0822c94dc01f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -255,11 +255,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1686025136, "lastModified": 1686089707,
"narHash": "sha256-yd/Lr6RjjeyF7PpA+TpFT4E5LZeDyiMLVJUXIWxB4Rs=", "narHash": "sha256-LTNlJcru2qJ0XhlhG9Acp5KyjB774Pza3tRH0pKIb3o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22467e240f390f029d6c745ce031f0ffbdc40916", "rev": "af21c31b2a1ec5d361ed8050edd0303c31306397",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -301,11 +301,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1686112478, "lastModified": 1686143635,
"narHash": "sha256-WUhnIru2MooIDkYBTl/L2O5x0j8o5PP96yfjVYpS5g4=", "narHash": "sha256-BmsQRuHNoOIQl9Zv/aettlJUt366HoRW1xQnI8n3C64=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "9fa0698ec12a7b685b9978691d3b5ed505611f72", "rev": "b54d94d6eb99231590921225e1601705b97aa968",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,12 +2,21 @@
with builtins; with builtins;
with lib; with lib;
{ {
networking.extraHosts = '' networking = {
extraHosts = ''
192.168.156.1 router.home 192.168.156.1 router.home
192.168.156.35 elnafo.home
# Hosts
192.168.1156.28 elnafo.home
''; '';
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
#allowedUDPPortRanges = [
# { from = 4000; to = 4007; }
# { from = 8000; to = 8010; }
#];
};
};
## Location config -- since Toronto is my 127.0.0.1 ## Location config -- since Toronto is my 127.0.0.1
time.timeZone = mkDefault "Asia/Yekaterinburg"; time.timeZone = mkDefault "Asia/Yekaterinburg";

View File

@ -17,6 +17,7 @@
communication = { communication = {
discord.enable = true; discord.enable = true;
}; };
documents.enable = true;
editors = { editors = {
vscodium.enable = true; vscodium.enable = true;
}; };
@ -54,9 +55,11 @@
gnupg.enable = true; gnupg.enable = true;
tmux.enable = true; tmux.enable = true;
zsh.enable = true; zsh.enable = true;
taskwarrior.enable = true;
}; };
services = { services = {
ssh.enable = true; ssh.enable = true;
nginx.enable = true;
}; };
}; };

View File

@ -13,7 +13,7 @@ in {
discord discord
(makeDesktopItem { (makeDesktopItem {
name = "discord-x11"; name = "discord-x11";
desktopName = "Discord"; desktopName = "Discord XWayland";
genericName = "Discord via xwayland"; genericName = "Discord via xwayland";
icon = "discord"; icon = "discord";
exec = "${discord}/bin/discord --use-gl=desktop"; exec = "${discord}/bin/discord --use-gl=desktop";

View File

@ -17,8 +17,13 @@ in {
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = false;
displayManager.lightdm.enable = true;
displayManager.gdm.wayland = false;
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
#autorun = false;
#displayManager.startx.enable = true;
}; };
}; };

View File

@ -42,6 +42,8 @@ in {
sqlite sqlite
# :lang latex & :lang org (latex previews) # :lang latex & :lang org (latex previews)
texlive.combined.scheme-medium texlive.combined.scheme-medium
# :lang nix
nixfmt
]; ];
env.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ]; env.PATH = [ "$XDG_CONFIG_HOME/emacs/bin" ];

View File

@ -39,7 +39,7 @@ with lib.custom;
in { in {
inherit name; inherit name;
description = "L-Nafaryus"; description = "L-Nafaryus";
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" "networkmanager" ];
isNormalUser = true; isNormalUser = true;
home = "/home/${name}"; home = "/home/${name}";
group = "users"; group = "users";

View File

@ -0,0 +1,14 @@
{ config, options, lib, pkgs, ... }:
with lib;
with lib.custom;
let
cfg = config.modules.shell.taskwarrior;
in {
options.modules.shell.taskwarrior = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = [ pkgs.taskwarrior ];
};
}