Compare commits

...

11 Commits

6 changed files with 81 additions and 8 deletions

View File

@ -9,6 +9,7 @@
home.keyboard.layout = "us";
home.keyboard.variant = "3l";
home.packages = with pkgs; with (import ../packages/all-packages.nix nixpkgs); [
encfs
entr
restic
ripgrep

View File

@ -9,9 +9,12 @@ pkgs: {
"extensions.pocket.enabled" = false;
"browser.eme.ui.enabled" = false; # DRM popup
"image.jxl.enabled" = true;
"xpinstall.signatures.required" = true;
"browser.search.suggest.enabled" = false;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
"browser.aboutConfig.showWarning" = false;
"browser.search.suggest.enabled" = false;
# Privacy Shit
"privacy.firstparty.isolate" = true;
@ -43,6 +46,18 @@ pkgs: {
updateInterval = 7 * 24 * 60 * 60 * 1000; # every week
definedAliases = [ "!yt" ];
};
"Wiktionary" = {
urls = [{
template = "https://en.wiktionary.org/w/index.php";
params = [
{name = "search"; value = "{searchTerms}";}
{name = "page"; value = "{startPage}";}
];
}];
iconUpdateURL = "https://en.wiktionary.org/static/favicon/wiktionary/en.ico";
updateInterval = 30 * 24 * 60 * 60 * 1000; # every month
definedAliases = [ "!wt" ];
};
"ArchWiki" = {
urls = [{
template = "https://wiki.archlinux.org/index.php";

View File

@ -19,14 +19,17 @@ pkgs: {
lonk = "qrencode -t utf8i";
s = "kitty +kitten ssh";
weather = "curl wttr.in/43.0844,-77.6749";
uwu = "mkdir -p /tmp/uwu && encfs -i 60 ~/Pictures/uwu/ /tmp/uwu --extpass 'pass storage-encryption/annex-fs'";
};
shellAbbrs = rec {
tab = "clone-in-kitty --type=tab";
win = "clone-in-kitty --type=os-window";
ns = "nix-shell --run fish -p";
unlock-rclone = "set -x RCLONE_CONFIG_PASS (pass rclone)";
":qa" = "exit";
":q" = "exit";
"rmount" = "rclone --rc --rc-web-gui --rc-no-auth --cache-dir /tmp/rclone-cache mount --vfs-cache-mode full --vfs-cache-max-size 8Gi";
"backup" = "${unlock-rclone} && restic -r rclone:rit:'Restic Backups/'(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (pass backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}";
"backup" = "eval (pass backblaze/backup-bucket) && restic -r s3:s3.us-west-000.backblazeb2.com/ember-restic-backups/(hostname | sed \"s/\\(.\\)/\\u\\1/\") -p (pass backups | psub) backup ~/ --exclude-caches --exclude-file=${import ./restic.nix}";
"diary" = "bwrap --bind ~/Diary/gate/ / --bind ~/Diary/store /store --ro-bind /nix /nix --bind /run /run -- (whereis -b restic | cut -c 9-) -r /store -p (pass diary | psub) backup -H 'diary' -e /nix -e /run -e /store -e /home /";
"dl" = "wget (kitty +kitten clipboard --get-clipboard)";
bottom = "termdown 2023-06-13T7:30:00";

View File

@ -53,6 +53,8 @@ let
","
(map (rt: "${rt}") rs)
);
mkDigraph = {keys, code}: "dig " + keys + " " + (toString code) + "\n";
mkDigraphs = dgs: (concatStringsSep "" (map mkDigraph dgs));
mkVimHeader = h: "\"\"\"\"\"\"\"\" ${h} \"\"\"\"\"\"\"\"\"";
mkVimSection = section:
(concatStringsSep "\n\n\n"
@ -67,10 +69,11 @@ let
)
);
mkVimSections = sections: concatStringsSep "\n\n\n" (map mkVimSection sections);
mkConfig = { settings?{}, mappings?[], runtimes?[], extra?"" }:
mkConfig = { settings?{}, mappings?[], digraphs?[], runtimes?[], extra?"" }:
mkVimSections [
{"ADDITIONAL RUNTIME DIRS" = mkRuntimes runtimes;}
{"SETTINGS" = mkSettings settings;}
{"DIGRAPHS" = mkDigraphs digraphs;}
{"KEY BINGINGS" = mkMappings mappings;}
{"MANUAL SETTINGS" = extra;}
];
@ -116,27 +119,66 @@ in
foldminlines = 10;
foldnestmax = 2;
};
digraphs = [
{ # Append
keys = "<>";
code = 8853;
}
{ # Multi Map
keys = "-o";
code = 8888;
}
{ # Degree Symbol
keys = "'o";
code = 176;
}
{ # Ring Operator
keys = ".o";
code = 8728;
}
{ # Integers
keys = "ZZ";
code = 8484;
}
{ # Naturals
keys = "NN";
code = 8469;
}
{ # Reals
keys = "RR";
code = 8477;
}
{ # Rationals
keys = "QQ";
code = 8474;
}
];
mappings = [
{
{ # New tab
mode = "";
binding = "<C-t>";
command = "<Cmd>:tab split<CR>";
}
{
{ # File picker
mode = "n";
binding = "<C-n>";
command = "<cmd>call nnn#pick(expand('%:p:h'))<CR>";
}
{
{ # Jump
mode = "n";
binding = "<C-h>";
command = "<cmd>HopWord<CR>";
}
{
{ # Jump by characters
mode = "n";
binding = "<C-l>";
binding = "<C-o>";
command = "<cmd>HopChar2<CR>";
}
{ # Clear search
mode = "";
binding = "<C-l>";
command = "<cmd>noh<CR>";
}
{
mode = "i";
binding = "<Tab>";
@ -225,5 +267,11 @@ in
"diagnostic-languageserver.filetypes" = {
python = "mypy";
};
haskell = {
command = "haskell-language-server-wrapper";
args = ["--lsp"];
rootPatterns = ["*.cabal" "stack.yaml" "cabal.project" "package.yaml" "hie.yaml"];
filetypes = ["hs" "lhs" "haskell" "lhaskell"];
};
};
}

View File

@ -8,6 +8,7 @@ let paths = [
"**/__pycache__/"
"**/.clj-kondo/"
"**/.lsp/"
"**/.stack-work/"
"**/target/"
"/home/ember/Audiobooks/"
"/home/ember/.cabal/"
@ -20,10 +21,12 @@ let paths = [
"/home/ember/.config/archivewebpage/**/Cache*/"
"/home/ember/.ghcup/"
"/home/ember/.lein"
"/home/ember/.local/share/geary/"
"/home/ember/.local/share/gnome-boxes/"
"/home/ember/.local/share/gvfs-metadata/"
"/home/ember/.local/share/lutris/"
"/home/ember/.local/share/tts/"
"/home/ember/.local/share/waydroid/"
"/home/ember/.m2/"
"/home/ember/.mozilla"
"/home/ember/.npm/"

View File

@ -23,6 +23,9 @@ let systemInformation = import ./system/system-information.nix; in
# Power efficiency
# https://wiki.archlinux.org/title/Power_management#Kernel_parameters
"nmi_watchdog=0"
# https://bbs.archlinux.org/viewtopic.php?id=282614 ?
"amd_iommu=off"
];
boot.kernel.sysctl = {