diff --git a/README.md b/README.md index 7a2d773..70005ee 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,10 @@ Some subtleties about my setup: - my firefox setup is decked out with all my preferred addons, css, and settings [declared](https://github.com/JakeGinesin/nix-dots/blob/master/home/programs/firefox/default.nix). i also have a nice startpage [declared](https://github.com/JakeGinesin/nix-dots/tree/master/home/programs/firefox/startpage) - i use dnsmasq as opposed to systemd-resolved to manage local dns. I configured nmcli to automatically set dnsmasq to resolve dns queries to [certain websites](https://github.com/JakeGinesin/nix-dots/blob/master/system/networking/blockers.sh) (i.e. instagram.com) to 0.0.0.0 if i'm connected to certain wifi ESSID's (i.e. my university's wifi, "NUWave") - both neovim+emacs used +- my many helpful [scripts](https://github.com/JakeGinesin/nix-dots/tree/master/home/scripts) are autopackaged using writeScriptBin - custom font ttfs for polybar are [directly included](https://github.com/JakeGinesin/nix-dots/blob/master/home/fonts/default.nix) in my config because certain icons are no longer supported - i have a stacked [rebuild script](https://github.com/JakeGinesin/nix-dots/blob/master/home/scripts/rebuild.sh) - my zsh is [stacked](https://github.com/JakeGinesin/nix-dots/blob/master/home/programs/zsh/default.nix) with many nice [aliases](https://github.com/JakeGinesin/nix-dots/blob/master/home/programs/zsh/zshrc) for automation. secret aliases with hard-coded IPs whatever are stored under an agenix secret - bspwm on x is used, with sxhkd used for most hotkeys - papers automatically saved with zotero are [automatically searchable](https://github.com/JakeGinesin/nix-dots/tree/master/home/scripts/document-scripts) - there is an option for resolution in the [configuration.nix file](https://github.com/JakeGinesin/nix-dots/tree/master/hosts/rq) -- my [scripts](https://github.com/JakeGinesin/nix-dots/tree/master/home/scripts) are autopackaged using writeScriptBin diff --git a/extras/k3s-node.nix b/extras/k3s-node.nix index 2f97846..5be09c9 100644 --- a/extras/k3s-node.nix +++ b/extras/k3s-node.nix @@ -4,16 +4,15 @@ lib, ... }: { - environment.etc."rancher/k3s/registries.yaml".text = '' -mirrors: - "100.125.181.75:5000": - endpoint: - - http://100.125.181.75:5000/v2 -configs: - "100.125.181.75:5000": - tls: - insecure_skip_verify: true + mirrors: + "100.125.181.75:5000": + endpoint: + - http://100.125.181.75:5000/v2 + configs: + "100.125.181.75:5000": + tls: + insecure_skip_verify: true ''; swapDevices = lib.mkForce []; @@ -30,10 +29,7 @@ configs: }; }; - boot.kernelModules = [ "rbd" "nbd" ]; - - environment.systemPackages = with pkgs; [ - ]; + boot.kernelModules = ["rbd" "nbd" "ceph"]; networking.firewall.enable = false; # networking.firewall.allowedTCPPorts = [ diff --git a/extras/k3s.nix b/extras/k3s.nix index 796f363..1f7764f 100644 --- a/extras/k3s.nix +++ b/extras/k3s.nix @@ -4,16 +4,15 @@ lib, ... }: { - environment.etc."rancher/k3s/registries.yaml".text = '' -mirrors: - "100.125.181.75:5000": - endpoint: - - http://100.125.181.75:5000/v2 -configs: - "100.125.181.75:5000": - tls: - insecure_skip_verify: true + mirrors: + "100.125.181.75:5000": + endpoint: + - http://100.125.181.75:5000/v2 + configs: + "100.125.181.75:5000": + tls: + insecure_skip_verify: true ''; swapDevices = lib.mkForce []; @@ -36,6 +35,8 @@ configs: kubernetes-helm ]; + boot.kernelModules = ["rbd" "nbd" "ceph"]; + networking.firewall.enable = false; # networking.firewall.allowedTCPPorts = [ # 6443 # k3s: required so that pods can reach the API server diff --git a/home/home.nix b/home/home.nix index 28390d5..69634cb 100644 --- a/home/home.nix +++ b/home/home.nix @@ -115,6 +115,11 @@ in { ripgrep-all element-desktop rustup # for verus rip + python313Packages.ipython + sage + yq + semgrep + # texlive.combined.scheme-full # security aflplusplus diff --git a/home/programs/bspwm/bspwmrc b/home/programs/bspwm/bspwmrc index 80b11aa..beb28ba 100644 --- a/home/programs/bspwm/bspwmrc +++ b/home/programs/bspwm/bspwmrc @@ -25,6 +25,8 @@ bspc config window_gap 2 bspc config split_ratio 0.50 bspc config borderless_monocle true bspc config gapless_monocle true +bspc config remove_disabled_monitors true +bspc config merge_overlapping_monitors true # bspc config merge_overlapping_monitors true bspc rule -a Zathura state=tiled bspc rule -a "Zotero" -o desktop="19" focus=off diff --git a/home/programs/firefox/default.nix b/home/programs/firefox/default.nix index bd784a9..2caec08 100644 --- a/home/programs/firefox/default.nix +++ b/home/programs/firefox/default.nix @@ -105,6 +105,10 @@ in { name = "nix options"; url = "https://search.nixos.org/options"; } + { + name = "old packages"; + url = "https://lazamar.co.uk/nix-versions/"; + } ]; } { @@ -177,11 +181,39 @@ in { } ]; } + { + name = "verus"; + bookmarks = [ + { + name = "verus playground"; + url = "https://play.verus-lang.org/?version=stable&mode=basic&edition=2021"; + } + { + name = "verus docs"; + url = "https://verus-lang.github.io/verus/guide/verus_macro_intro.html"; + } + { + name = "verus zulip"; + url = "https://verus-lang.zulipchat.com/#feed"; + } + { + name = "vstd docs"; + url = "https://verus-lang.github.io/verus/verusdoc/vstd/index.html"; + } + { + name = "core docs"; + url = "https://doc.rust-lang.org/1.88.0/core/index.html"; + } + { + name = "verus github"; + url = "https://github.com/verus-lang/verus"; + } + ]; + } { name = "cal"; url = "https://calendar.google.com/"; } - { name = "performance"; url = "about:processes"; diff --git a/home/programs/firefox/startpage/index.html b/home/programs/firefox/startpage/index.html index f9fa587..e52d9c0 100644 --- a/home/programs/firefox/startpage/index.html +++ b/home/programs/firefox/startpage/index.html @@ -41,9 +41,9 @@

Uni

@@ -54,6 +54,7 @@
  • lobste.rs
  • Hackernews
  • Codeforces
  • +
  • CVEs
  • diff --git a/home/programs/nvim/plugins/vimtex.lua b/home/programs/nvim/plugins/vimtex.lua index 2dd9a4a..b7b0d66 100644 --- a/home/programs/nvim/plugins/vimtex.lua +++ b/home/programs/nvim/plugins/vimtex.lua @@ -13,7 +13,7 @@ vim.g.vimtex_quickfix_mode = 0 vim.g.vimtex_quickfix_enabled = 0 -- Compiler backend. -vim.g.vimtex_compiler_method = 'latexrun' +vim.g.vimtex_compiler_method = 'latexmk' -- Set the local leader (default is "\"; here we change it to comma). vim.g.maplocalleader = ',' diff --git a/home/programs/sxhkd/sxhkdrc b/home/programs/sxhkd/sxhkdrc index a4246b8..1353ebb 100644 --- a/home/programs/sxhkd/sxhkdrc +++ b/home/programs/sxhkd/sxhkdrc @@ -68,7 +68,7 @@ super + {t,shift + t,s,a} # focus the node in the given direction super + {_,shift + }{j,k,i,l} - bspc node -{f,s} {west,south,north,east} + bspc node -{f,s} {west,south,north,east}.local # focus the node for the given path jump # super + {p,b,comma,period} @@ -165,7 +165,10 @@ ctrl + super + {Left,Right} fast-shift {left,right} super + {shift} + {d} - pkill -f discord + pkill -f legcord + +super + {shift} + {h} + pkill -f slack ctrl + super + bracket{left,right} fast-shift {left,right} diff --git a/home/programs/zsh/zshrc b/home/programs/zsh/zshrc index aeadf02..9018a4b 100644 --- a/home/programs/zsh/zshrc +++ b/home/programs/zsh/zshrc @@ -254,6 +254,10 @@ a.sitecopy() { wget -k -K -E -r -l 10 -p -N -F -nH $@ } +a.pdfcopy() { + wget -k -r -l 10 -p -A "*.pdf" -N -F -nH $@ +} + a.fo() { firefox `pwd` } diff --git a/home/scripts/bspwm/add-1080p.sh b/home/scripts/bspwm/add-1080p.sh new file mode 100644 index 0000000..f23fc5b --- /dev/null +++ b/home/scripts/bspwm/add-1080p.sh @@ -0,0 +1,25 @@ +PRIMARY="$(xrandr --query | awk '/ connected primary/{print $1; exit}')" +[ -z "$PRIMARY" ] && PRIMARY="$(xrandr --query | awk '/ connected/{print $1; exit}')" +bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + +if [[ $(xrandr -q | grep 'HDMI-1 connected') ]]; then +xrandr --output "$PRIMARY" --primary --auto --scale 1x1 --rotate normal --output HDMI-1 --mode 1920x1080 --rotate normal --right-of "$PRIMARY" + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + bspc monitor HDMI-1 -d 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "eDP-1" + xinput map-to-output "Synaptics TM3289-002" "eDP-1" +else + xrandr --output HDMI-1 --off + # Remove nodes + while bspc node 20: --kill; do + : + done + # Remove workspaces + bspc desktop -r 20 + # Remove monitor + bspc monitor HDMI-1 -r + + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "all" + xinput map-to-output "Synaptics TM3289-002" "all" +fi diff --git a/home/scripts/bspwm/add-3840p-hdmi.sh b/home/scripts/bspwm/add-3840p-hdmi.sh new file mode 100644 index 0000000..d40e8f4 --- /dev/null +++ b/home/scripts/bspwm/add-3840p-hdmi.sh @@ -0,0 +1,25 @@ +PRIMARY="$(xrandr --query | awk '/ connected primary/{print $1; exit}')" +[ -z "$PRIMARY" ] && PRIMARY="$(xrandr --query | awk '/ connected/{print $1; exit}')" +bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + +if [[ $(xrandr -q | grep 'HDMI-1 connected') ]]; then +xrandr --output "$PRIMARY" --primary --auto --scale 1x1 --rotate normal --output HDMI-1 --mode 3840x2160 --rotate normal --right-of "$PRIMARY" + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + bspc monitor HDMI-1 -d 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "eDP-1" + xinput map-to-output "Synaptics TM3289-002" "eDP-1" +else + xrandr --output HDMI-1 --off + # Remove nodes + while bspc node 20: --kill; do + : + done + # Remove workspaces + bspc desktop -r 20 + # Remove monitor + bspc monitor HDMI-1 -r + + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "all" + xinput map-to-output "Synaptics TM3289-002" "all" +fi diff --git a/home/scripts/bspwm/add-3840p.sh b/home/scripts/bspwm/add-3840p.sh new file mode 100644 index 0000000..48134f1 --- /dev/null +++ b/home/scripts/bspwm/add-3840p.sh @@ -0,0 +1,25 @@ +PRIMARY="$(xrandr --query | awk '/ connected primary/{print $1; exit}')" +[ -z "$PRIMARY" ] && PRIMARY="$(xrandr --query | awk '/ connected/{print $1; exit}')" +bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + +if [[ $(xrandr -q | grep 'DP-2 connected') ]]; then +xrandr --output "$PRIMARY" --primary --auto --scale 1x1 --rotate normal --output DP-2 --mode 3840x2160 --rotate normal --right-of "$PRIMARY" + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + bspc monitor DP-2 -d 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "eDP-1" + xinput map-to-output "Synaptics TM3289-002" "eDP-1" +else + xrandr --output DP-2 --off + # Remove nodes + while bspc node 20: --kill; do + : + done + # Remove workspaces + bspc desktop -r 20 + # Remove monitor + bspc monitor DP-2 -r + + bspc monitor "$PRIMARY" -d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 + xinput map-to-output "TPPS/2 Elan TrackPoint" "all" + xinput map-to-output "Synaptics TM3289-002" "all" +fi diff --git a/system/system-server.nix b/system/system-server.nix index ff9ebdc..47f184e 100644 --- a/system/system-server.nix +++ b/system/system-server.nix @@ -45,15 +45,15 @@ ''; # services.containerd.registryMirrors = { - # # Replace with your registry's address and port - # "100.125.181.75:5000" = { - # endpoint = ["http://100.125.181.75:5000"]; - # }; + # # Replace with your registry's address and port + # "100.125.181.75:5000" = { + # endpoint = ["http://100.125.181.75:5000"]; + # }; # }; virtualisation.containerd.settings = { plugins."io.containerd.grpc.v1.cri".registry.mirrors."100.125.181.75:5000" = { - endpoint = [ "http://100.125.181.75:5000" ]; + endpoint = ["http://100.125.181.75:5000"]; }; plugins."io.containerd.grpc.v1.cri".registry.configs."100.125.181.75:5000".tls.insecure_skip_verify = true; diff --git a/system/system.nix b/system/system.nix index 498b1f0..2baf50f 100644 --- a/system/system.nix +++ b/system/system.nix @@ -128,6 +128,12 @@ }; }; + boot.extraModulePackages = with config.boot.kernelPackages; [ + rtl88xxau-aircrack + ]; + + boot.kernelModules = ["rtl8812au"]; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/system/users/default.nix b/system/users/default.nix index a6fd4fc..79b6bf3 100644 --- a/system/users/default.nix +++ b/system/users/default.nix @@ -73,6 +73,7 @@ in { polybar sxhkd bspwm + # linuxKernel.packages.linux_zen.rtl8812au # librewolf ]; }