diff --git a/TODO.md b/TODO.md index d370575..023c781 100644 --- a/TODO.md +++ b/TODO.md @@ -1,13 +1,9 @@ - [ ] Update the README.md - [ ] switch ssh keys to ECC (fuck RSA) +- [ ] forgejo not post-quantum (fix that) +- [X] migrate forge.dobutterfliescry.net -> tearforge.net +- [X] rename forgejo user to git - [ ] setup my own VPN - [ ] connect matcha to my VPN - [ ] use matcha to build stuff instead of using my laptop - -- [X] update bat config -- [ ] switch to zsh? or maybe elvish? -- [ ] switch to neovim -- [ ] switch to mangowc - -- [ ] fix my fuck ass emojis diff --git a/groups/cryos/default.nix b/groups/cryos/default.nix index d00bae3..236930f 100644 --- a/groups/cryos/default.nix +++ b/groups/cryos/default.nix @@ -1,7 +1,6 @@ -{...}: { +{lib, ...}: { imports = [ ./programs.nix - ./keybinds.nix ]; boot.loader = { diff --git a/groups/cryos/keybinds.nix b/groups/cryos/keybinds.nix deleted file mode 100644 index 25a3f19..0000000 --- a/groups/cryos/keybinds.nix +++ /dev/null @@ -1,19 +0,0 @@ -{...}: { - services.keyd = { - enable = true; - keyboards.default = { - ids = ["*"]; - settings = { - main = { - capslock = "meta"; - - # NOTE: unsure whether or not i like oneshot... - # shift = "oneshot(shift)"; - # control = "oneshot(control)"; - # leftalt = "oneshot(alt)"; - # rightalt = "oneshot(rightalt)"; - }; - }; - }; - }; -} diff --git a/groups/cryos/programs.nix b/groups/cryos/programs.nix index 6b2fd55..ee38f86 100644 --- a/groups/cryos/programs.nix +++ b/groups/cryos/programs.nix @@ -1,8 +1,4 @@ -{ - pkgs, - upkgs, - ... -}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ # Shell bash @@ -49,7 +45,6 @@ nix-prefetch-git nix-index nix-unit - upkgs.nix-search-tv # Python python312 # I use 3.12 since it's in a pretty stable state now diff --git a/homes/me/default.nix b/homes/me/default.nix index 6380ca2..89d16b5 100755 --- a/homes/me/default.nix +++ b/homes/me/default.nix @@ -26,15 +26,11 @@ home = { shellAliases = { - # nix nd = "nix develop"; - ntv = "nix-search-tv"; rebuild = "nh os switch ~/flake"; trybuild = "nh os test ~/flake"; - - # shell utilities - rgf = "rg --files | rg"; - watch = "viddy"; + brip = "batgrep"; # bat + ripgrep + man = "batman"; # bat + man }; pointerCursor = { @@ -47,13 +43,14 @@ packages = with pkgs; [ # for services.gnome-keyring - gcr # provides org.gnome.keyring.SystemPrompter + pkgs.gcr # provides org.gnome.keyring.SystemPrompter seahorse # gui - krita + tor-browser fuzzel + speedtest-cli ]; }; diff --git a/homes/modules/bat.nix b/homes/modules/bat.nix index 70268f5..fca2231 100755 --- a/homes/modules/bat.nix +++ b/homes/modules/bat.nix @@ -1,109 +1,24 @@ -let - # Module Meta Configuration - setShellAliases = true; - supportBash = true; - supportZsh = true; - supportFish = true; -in - { - osConfig, - config, - pkgs, - lib, - username, - ... - }: let - inherit - (builtins) - elemAt - ; - - inherit - (lib) - flip - mkIf - optional - splitString - ; - - cfg = config.programs.bat; - - # NOTE: `.pname` can be used instead of `.meta.mainProgram` - # NOTE: but then `pkgs.bash` would return `"bash-interactive"` which is annoying... - shellPkg = osConfig.users.users.${username}.shell; - shell = shellPkg.meta.mainProgram; - - pager = - cfg.config.pager - |> splitString " " - |> flip elemAt 0; - in { - programs.bat = { - enable = true; - config = { - # WARNING: pager must be set for this module to function - # NOTE: not sure whether to use ov/moor/viddy as my pager? - pager = "less -FR"; - # theme = "Dracula"; - }; +{ + config, + pkgs, + ... +}: { + # like `/bin/cat` but with syntax highlighting + # TODO: change the pager (maybe use Github:sachaos/viddy instead) + programs.bat = { + enable = true; + config = { + pager = "less -FR"; + theme = "Dracula"; }; + }; - home = { - shellAliases = mkIf setShellAliases { - bat = "prettybat"; - cat = "prettybat"; - diff = "batdiff"; - brg = "batgrep"; - man = "batman"; - # watch = "batwatch"; # NOTE: using viddy instead atm - }; - - sessionVariables = { - PAGER = pager; - - # REF: https://github.com/eth-p/bat-extras/blob/master/doc/batpipe.md - BATPIPE_ENABLE_COLOR = "true"; - BATPIPE_INSIDE_LESS = "true"; - BATPIPE_TERM_WIDTH = "-"; # hyphone -> auto detect - }; - - packages = with pkgs.bat-extras; - [ - batdiff - batgrep - batman - batpipe - batwatch - prettybat - ] - ++ (with pkgs; [ - bat - entr # required by pkgs.bat-extras.batwatch - ripgrep # required by pkgs.bat-extras.batgrep - delta # required by pkgs.bat-extras.batdiff - ]) - ++ optional (pkgs?${pager}) pkgs.${pager}; - }; - - # Configure the user's shell to source batpipe - # WARNING: only currently supports bash, zsh, & fish - programs = { - bash = mkIf (supportBash || shell == "bash") { - initExtra = '' - eval "$(batpipe)" - ''; - }; - - zsh = mkIf (supportZsh || shell == "zsh") { - initContent = '' - eval "$(batpipe)" - ''; - }; - - fish = mkIf (supportFish || shell == "fish") { - interactiveShellInit = '' - eval (batpipe) - ''; - }; - }; - } + # other commands that make normal utils prettier + home.packages = with pkgs.bat-extras; [ + batdiff + batgrep + batman + batwatch + prettybat + ]; +} diff --git a/homes/modules/fish.nix b/homes/modules/fish.nix index dd14c45..ddfbcf7 100755 --- a/homes/modules/fish.nix +++ b/homes/modules/fish.nix @@ -1,4 +1,5 @@ { + config, lib, pkgs, ... @@ -59,13 +60,14 @@ curl -sL "https://www.gitignore.io/api/$type" end - end - - function decompile - objdump --disassemble --demangle --debugging --debugging-tags $argv | bat --language asm + # ripgrep on files + function rgf + rg --files | rg $args end set -g fish_greeting (rand_greet) + + ''; shellAliases = {