1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-05-11 23:58:28 +02:00
parent c5b629b295
commit 69165bbbf7
No known key found for this signature in database
9 changed files with 213 additions and 94 deletions

5
.gitignore vendored
View file

@ -1,6 +1,3 @@
.direnv/ .direnv/
.devenv/
.pre-commit-config.yaml .weavehist
.plowcache

165
flake.lock generated
View file

@ -3,22 +3,25 @@
"cachix": { "cachix": {
"inputs": { "inputs": {
"devenv": [ "devenv": [
"weave",
"devenv" "devenv"
], ],
"flake-compat": [ "flake-compat": [
"weave",
"devenv" "devenv"
], ],
"git-hooks": [ "git-hooks": [
"weave",
"devenv" "devenv"
], ],
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1737621947, "lastModified": 1742042642,
"narHash": "sha256-8HFvG7fvIFbgtaYAY2628Tb89fA55nPm2jSiNs0/Cws=", "narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=",
"owner": "cachix", "owner": "cachix",
"repo": "cachix", "repo": "cachix",
"rev": "f65a3cd5e339c223471e64c051434616e18cc4f5", "rev": "a624d3eaf4b1d225f918de8543ed739f2f574203",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,14 +37,14 @@
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"nix": "nix", "nix": "nix",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1740851740, "lastModified": 1743783972,
"narHash": "sha256-urr8VnD7dXWd6io9DmwVlboa0Or9ygsahx1UAft7ZxY=", "narHash": "sha256-5wPsNCnWmeLpLxavsftA9L7tnYgtlexV7FwLegxtpy4=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "56e488989b3d72cd8e30ddd419e879658609bf88", "rev": "2f53e2f867e0c2ba18b880e66169366e5f8ca554",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,8 +82,27 @@
} }
}, },
"flake-parts": { "flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"weave",
"devenv", "devenv",
"nix", "nix",
"nixpkgs" "nixpkgs"
@ -100,16 +122,16 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib_2"
}, },
"locked": { "locked": {
"lastModified": 1738453229, "lastModified": 1743550720,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -121,20 +143,22 @@
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"weave",
"devenv" "devenv"
], ],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"weave",
"devenv", "devenv",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1740849354, "lastModified": 1742649964,
"narHash": "sha256-oy33+t09FraucSZ2rZ6qnD1Y1c8azKKmQuCvF2ytUko=", "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "4a709a8ce9f8c08fa7ddb86761fe488ff7858a07", "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -146,6 +170,7 @@
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"weave",
"devenv", "devenv",
"git-hooks", "git-hooks",
"nixpkgs" "nixpkgs"
@ -184,27 +209,31 @@
"nix": { "nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"weave",
"devenv" "devenv"
], ],
"flake-parts": "flake-parts", "flake-parts": "flake-parts_2",
"libgit2": "libgit2", "libgit2": "libgit2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-23-11": [ "nixpkgs-23-11": [
"weave",
"devenv" "devenv"
], ],
"nixpkgs-regression": [ "nixpkgs-regression": [
"weave",
"devenv" "devenv"
], ],
"pre-commit-hooks": [ "pre-commit-hooks": [
"weave",
"devenv" "devenv"
] ]
}, },
"locked": { "locked": {
"lastModified": 1734114420, "lastModified": 1741798497,
"narHash": "sha256-n52PUzub5jZWc8nI/sR7UICOheU8rNA+YZ73YaHeCBg=", "narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=",
"owner": "domenkozar", "owner": "domenkozar",
"repo": "nix", "repo": "nix",
"rev": "bde6a1a0d1f2af86caa4d20d23eca019f3d57eee", "rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,6 +244,52 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1746663147,
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1733212471, "lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
@ -230,19 +305,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs_3": {
"locked": {
"lastModified": 1738452942,
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1717432640, "lastModified": 1717432640,
"narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=",
@ -258,7 +321,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1733477122, "lastModified": 1733477122,
"narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=", "narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=",
@ -274,13 +337,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1740695751, "lastModified": 1743827369,
"narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=", "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4", "rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -291,11 +354,31 @@
} }
}, },
"root": { "root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
"weave": "weave"
}
},
"weave": {
"inputs": { "inputs": {
"devenv": "devenv", "devenv": "devenv",
"devenv-root": "devenv-root", "devenv-root": "devenv-root",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1744154589,
"narHash": "sha256-W56RJmip2eup9o7uF/C7XHbamqqC5JXcDZ3AQ8M5jVI=",
"ref": "refs/heads/main",
"rev": "0d6662bdc7c73aa323074b11c6a14b0a6a041d8e",
"revCount": 2,
"type": "git",
"url": "https://codeberg.org/helvetica/weave.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/helvetica/weave.git"
} }
} }
}, },

View file

@ -4,11 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
devenv-root = { weave.url = "git+https://codeberg.org/helvetica/weave.git";
url = "file+file:///dev/null";
flake = false;
};
devenv.url = "github:cachix/devenv";
}; };
nixConfig = { nixConfig = {
@ -22,13 +18,10 @@
... ...
} @ inputs: } @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.devenv.flakeModule
];
systems = nixpkgs.lib.systems.flakeExposed; systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { perSystem = {
system,
pkgs, pkgs,
self', self',
lib, lib,
@ -39,23 +32,17 @@
directory = ./packages; directory = ./packages;
}; };
devenv.shells.default = { devShells.default = pkgs.mkShellNoCC {
devenv.root = let
devenvRootFileContent = builtins.readFile inputs.devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
env.PLOW_FROM = "./home";
env.PLOW_CACHE = "./.plowcache";
imports = [
./devenv.nix
];
packages = [ packages = [
self'.packages.plow inputs.weave.packages.${system}.default
self'.packages.codeinit
]; ];
shellHook = ''
root=$(git rev-parse --show-toplevel)
export WEAVE_FROM=$root/home
export WEAVE_HIST=$root/.weavecache
'';
}; };
}; };
}; };

View file

@ -6,8 +6,8 @@
excludesFile = ~/.config/git/ignore excludesFile = ~/.config/git/ignore
# Paginate output # Paginate output
pager = less pager = less
# Use Codium as default editor # Use Helix as default editor
editor = codium --wait editor = hx
# Don't consider trailing space change as a cause for merge conflicts # Don't consider trailing space change as a cause for merge conflicts
whitespace = -trailing-space whitespace = -trailing-space
[init] [init]
@ -36,12 +36,12 @@
wordRegex = . wordRegex = .
# Display submodule-related information (commit listings) # Display submodule-related information (commit listings)
submodule = log submodule = log
# Use VSCode as default diff tool when running `git difftool` # Use Helix as default diff tool when running `git difftool` (TODO)
tool = codium # tool = helix
[difftool] [difftool]
prompt = false prompt = false
[difftool "codium"] # [difftool "helix"]
cmd = codium --wait --diff -- "$LOCAL" "$REMOTE" # cmd = hx --wait --diff -- "$LOCAL" "$REMOTE"
[fetch] [fetch]
# Auto-fetch submodule changes (won't auto-update) # Auto-fetch submodule changes (won't auto-update)
recurseSubmodules = on-demand recurseSubmodules = on-demand

View file

@ -0,0 +1,4 @@
[user]
name = Lukas Wurzinger
email = lukas@wrz.one
signingkey = ~/.ssh/id_ed25519.pub

View file

@ -50,7 +50,6 @@ after-delay.enable = true
after-delay.timeout = 3000 after-delay.timeout = 3000
[keys.normal] [keys.normal]
# Nicities
esc = ["collapse_selection", "keep_primary_selection"] esc = ["collapse_selection", "keep_primary_selection"]
C-h = "select_prev_sibling" C-h = "select_prev_sibling"
@ -65,13 +64,7 @@ C-r = "redo"
x = "extend_line" x = "extend_line"
# Vim-like # Vim
V = ["select_mode", "extend_to_line_bounds"]
C = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection", "insert_mode"]
D = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection"]
G = "goto_last_line"
# Vim-like but also generally useful
"{" = ["goto_prev_paragraph", "collapse_selection"] "{" = ["goto_prev_paragraph", "collapse_selection"]
"}" = ["goto_next_paragraph", "collapse_selection"] "}" = ["goto_next_paragraph", "collapse_selection"]
@ -84,7 +77,9 @@ a = ["append_mode", "collapse_selection"]
u = ["undo", "collapse_selection"] u = ["undo", "collapse_selection"]
## Search for word under cursor G = "goto_last_line"
# Search for word under cursor
"*" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_next"] "*" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_next"]
"#" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_prev"] "#" = ["move_char_right", "move_prev_word_start", "move_next_word_end", "search_selection", "search_prev"]
@ -92,20 +87,13 @@ u = ["undo", "collapse_selection"]
esc = ["collapse_selection", "normal_mode"] esc = ["collapse_selection", "normal_mode"]
[keys.select] [keys.select]
# Nicities
esc = ["collapse_selection", "keep_primary_selection", "normal_mode"] esc = ["collapse_selection", "keep_primary_selection", "normal_mode"]
";" = ["collapse_selection", "normal_mode"] ";" = ["collapse_selection", "normal_mode"]
x = "extend_line" x = "extend_line"
# Vim-like # Vim
V = ["select_mode", "extend_to_line_bounds"]
C = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection", "insert_mode"]
D = ["extend_to_line_end", "yank_main_selection_to_clipboard", "delete_selection"]
G = "goto_last_line"
# Vim-like but also generally useful
"{" = ["goto_prev_paragraph", "collapse_selection"] "{" = ["goto_prev_paragraph", "collapse_selection"]
"}" = ["goto_next_paragraph", "collapse_selection"] "}" = ["goto_next_paragraph", "collapse_selection"]
@ -115,3 +103,5 @@ a = "select_textobject_around"
0 = "goto_first_nonwhitespace" 0 = "goto_first_nonwhitespace"
"^" = "goto_line_start" "^" = "goto_line_start"
"$" = "goto_line_end" "$" = "goto_line_end"
G = "goto_last_line"

View file

@ -6,3 +6,11 @@ file-types = ["tmpl"]
name = "python" name = "python"
language-servers = [ "basedpyright" ] language-servers = [ "basedpyright" ]
formatter = {command = 'ruff', args = ["format", "--quiet", "-"]} formatter = {command = 'ruff', args = ["format", "--quiet", "-"]}
[language-server]
zk-lsp = { command = "zk", args = [ "lsp" ] }
[[language]]
name = "markdown"
roots = [ ".zk" ]
language-servers = [ "zk-lsp" ]

View file

@ -1,5 +1,5 @@
auto-optimise-store = true auto-optimise-store = true
experimental-features = nix-command flakes experimental-features = nix-command flakes
use-xdg-base-directories = true use-xdg-base-directories = true
substituters = https://cache.nixos.org https://fossar.cachix.org substituters = https://cache.nixos.org https://cosmic.cachix.org/ https://cache.nixos.org/ https://fossar.cachix.org https://cosmic.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE= trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=

View file

@ -0,0 +1,50 @@
[notebook]
dir = "~/Notes"
[note]
language = "en"
default-title = "Untitled"
filename = "{{id}}-{{slug title}}"
extension = "md"
template = "default.md"
id-charset = "alphanum"
id-length = 4
id-case = "lower"
[extra]
author = "Helvetica"
[group.journal]
paths = ["journal/weekly", "journal/daily"]
[group.journal.note]
filename = "{{format-date now}}"
[format.markdown]
hashtags = true
colon-tags = true
[tool]
editor = "hx"
# shell = "/bin/bash"
# pager = "less -FIRX"
fzf-preview = "bat -p --color always {-1}"
[filter]
recents = "--sort created- --created-after 'last two weeks'"
[alias]
# Edit the last modified note.
edlast = "zk edit --limit 1 --sort modified- $@"
# Edit the notes selected interactively among the notes created the last two weeks.
recent = "zk edit --sort created- --created-after 'last two weeks' --interactive"
# Show a random note.
lucky = "zk list --quiet --format full --sort random --limit 1"
[lsp]
[lsp.diagnostics]
# Report titles of wiki-links as hints.
wiki-title = "hint"
# Warn for dead links between notes.
dead-link = "error"