Compare commits

..

117 Commits

Author SHA1 Message Date
68eecd01c7 chore: update lockfile 2026-01-26 21:59:30 +01:00
8fc4e23d3b fix(nixd): properly configure 'nixd' nvim lsp 2026-01-26 21:58:09 +01:00
cf381042d0 feat: add 'gammastep' to niri deskopt 2026-01-26 21:21:49 +01:00
2303988b74 feat: add '3d' and 'photography' modules to andromache 2026-01-26 21:21:26 +01:00
791d90b703 fix: update hardware config 2026-01-26 18:47:43 +01:00
29137a8cdd chore: update lockfile 2026-01-25 15:32:53 +01:00
dd175e99b8 refactor: migrate vim.cmd to lua API in init.lua 2026-01-23 15:22:55 +01:00
3a5f1cf47e fix: remove conflicting light background setting
The bg=light setting was immediately overridden by vim.opt.background = "dark" later in the file.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-23 15:22:55 +01:00
755f1f4a06 refactor: remove duplicate 'paq-setup' require 2026-01-23 15:22:55 +01:00
1cfc049326 chore(nvim): remove redundant unused config 2026-01-23 15:22:55 +01:00
09d2832948 fix(vim.keymap): resolve duplicate 'fzf' keymap 2026-01-23 15:22:55 +01:00
85ab23eb5d fix(tmux): update tmux config 2026-01-23 15:22:55 +01:00
76a31b3051 refactor: deduplicate firefox/librewolf config 2026-01-23 15:22:55 +01:00
8e5cbe6350 fix: use 'nixGL' for kitty when available 2026-01-23 15:22:55 +01:00
e75fc95b27 feat: add 'tmux' to 'shell' module 2026-01-23 15:22:55 +01:00
24ed3f03cd refactor: extract 'dotsPath' for 'dots' path 2026-01-23 15:22:55 +01:00
b6453330bf refactor: centralize kitty config 2026-01-23 15:22:55 +01:00
bd008cde04 fix: remove 'edit_editor_config' alias 2026-01-23 15:22:55 +01:00
ffff1cfda1 refactor: modularize 'nvim' for home manager hosts 2026-01-23 15:22:55 +01:00
0f369bdf6c feat: set up colmena with hetzner stuff 2026-01-22 20:26:11 +01:00
600e55de1f feat: configure auto suspend 2026-01-22 20:25:06 +01:00
a390428ca9 feat: set up opencode (with automated API key) 2026-01-22 20:25:05 +01:00
a5aeddc5c2 feat: add 'hcloud' module 2026-01-22 20:24:36 +01:00
e9748b0236 chore: update Nix 'work' host 2026-01-22 20:22:19 +01:00
3902e2da67 chore: update lockfile 2026-01-22 20:20:30 +01:00
42af1badc4 refactor: modularize 'nvim' for home manager hosts 2026-01-19 10:12:02 +01:00
1eca0c995d feat: use shell module on work host 2026-01-19 10:03:05 +01:00
92389f7048 feat: modularize (and extend) kitty config 2026-01-19 09:45:22 +01:00
d6459d0d84 feat: add 'hcloud' module 2026-01-18 10:02:20 +01:00
00e5c92c1e fix: add 'hetzner' module 2026-01-18 09:43:45 +01:00
c19afff26a chore: update lockfile 2026-01-17 20:01:31 +01:00
8ea03f0a66 feat: automate optimising store, garbage collection and upgrades 2026-01-17 20:00:21 +01:00
8f3f6ec66d refactor(nixfmt): format 2026-01-17 19:58:27 +01:00
3401ed7424 chore: add 'andromache' ssh public keys 2026-01-17 19:50:21 +01:00
bb6a380599 refactor: simplify hosts files 2026-01-17 19:37:05 +01:00
35fd4e61e2 fix: remove xdg config 2026-01-17 18:02:17 +01:00
01542dda96 feat: replace 'sddm' with 'ly' 2026-01-17 17:51:26 +01:00
8464884fdb feat: automate SSH config ('known_hosts', 'authorized_keys' ...) 2026-01-17 17:37:37 +01:00
33b022c659 chore(nixfmt): format 2026-01-17 17:35:38 +01:00
a8f3f222b1 fix: merge 'astyanax' services configuration 2026-01-17 16:35:38 +01:00
bf9ea37280 fix: disable 'throttled' service 2026-01-17 16:34:14 +01:00
724c5c176b fix: improve niri desktop 2026-01-17 16:33:30 +01:00
49e99e9de2 fix: add anki to 'astyanax' host 2026-01-17 16:31:37 +01:00
ce0af2988a fix: move kitty tab bar to bottom 2026-01-17 15:10:28 +01:00
5a7afbfe82 fix: update font configuration 2026-01-17 15:09:57 +01:00
87afec8955 chore: update lockfile 2026-01-17 15:09:14 +01:00
2a1512f85b fix: disable 'nixos-hardware' module for astyanax (caused boot to hang on 'loading module i915') 2026-01-17 14:56:03 +01:00
313e623ec4 feat(home): add shell module 2026-01-16 15:25:29 +01:00
4f7ab88634 fix(anki): make sops optional for standalone home-manager 2026-01-16 15:25:27 +01:00
a8851e5a91 feat(home): migrate bash config to shell module 2026-01-16 15:25:25 +01:00
629f25c795 feat(nixos): pass inputs to home-manager via extraSpecialArgs 2026-01-16 15:25:23 +01:00
b52d87d30b chore(git): add .claude/ to gitignore 2026-01-16 15:25:20 +01:00
54114f99ab fix: make taskwarrior available on both NixOS and standalone home-manager 2026-01-14 22:57:27 +01:00
2fcde8ddd1 chore: update NixOS 2026-01-14 20:55:59 +01:00
a952136be1 fix: remove descriptions from 'browser' module 2026-01-14 16:45:56 +01:00
7773d2a7a0 fix: resolve nvim treesitter errors 2026-01-14 11:50:28 +01:00
c86a52e435 fix: add 'stylelint' to neovim flake 2026-01-14 11:22:01 +01:00
c99738c210 refactor(browser): create single browser module 2026-01-12 18:10:52 +01:00
8321d5e2ef chore: update Nix 'work' host 2026-01-08 11:59:54 +01:00
46477cce25 chore: update lockfile 2025-12-29 09:35:08 +01:00
4765527fa6 feat(nvim): add typescript-language-server to runtime dependencies 2025-12-24 14:46:40 +01:00
67f5aefc82 fix(nvim): ensure codecompanion config structure exists before mcphub extension loads 2025-12-24 14:43:29 +01:00
89c398a957 chore: update flake.lock with nvim mcp-hub input
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 14:14:38 +01:00
d1fc192d26 feat(nvim): add mcp-hub, fd, and delta dependencies
- add mcp-hub flake input for MCP integration
- create system-aware dependency overlays
- add mcp-hub, fd, delta to lspsAndRuntimeDeps
- remove duplicate tailwind-fold.lua file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 14:14:10 +01:00
bc2790c7fb feat: set up 'claude-code.nvim' plugin 2025-12-18 16:01:31 +01:00
e3f55a1fbd chore: add TODO for unique 'networking.hostId' 2025-12-18 13:40:26 +01:00
c66cd0e28c refactor: use username variable consistently
Replaced hardcoded "h" username references with variables:
- hosts/vm: use username variable for secrets.username
- home configs: use username variable in bash initExtra paths
- keepassxc: update comment to use $HOME instead of /home/h

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 13:39:43 +01:00
d5d395ed56 fix(firefox): merge duplicate policies declarations
Second policies declaration was overwriting the first, causing
DefaultDownloadDirectory setting to be lost. Merged both into single
policies block.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 13:39:43 +01:00
e15f9a51cb fix: format rust using 'rustfmt' 2025-12-15 18:18:20 +01:00
acafbf9a6a refactor: decouple 'andromache' home config from 'astyanax' 2025-12-15 12:19:38 +01:00
4952ea0634 chore: update neovim flake (and main flake) 2025-12-15 12:01:19 +01:00
6e2f28d601 refactor: import shikane 'desktop/niri' instead of directly 2025-12-15 11:57:22 +01:00
143d31433f feat: add plain 'mako' service for notifications 2025-12-14 23:45:58 +01:00
a176c744f8 feat: declare anki config 2025-12-14 22:44:45 +01:00
2fa0b1f36a fix: migrate 'r5rs' script to neovim 2025-12-14 22:11:14 +01:00
520cd476fc fix: ignore directories that contain '.nobackup' in 'save-home' 2025-12-14 22:11:14 +01:00
f985df8e61 chore: format using 'black' 2025-12-14 22:11:14 +01:00
ec750ebb17 chore: clean up 'astyanax' packages 2025-12-09 23:43:56 +01:00
f3fd842692 feat: add 'fail2ban' to 'hecuba' host 2025-12-09 23:10:24 +01:00
6ff168caeb refactor: use environment variable for zettelkasten path 2025-12-09 12:43:07 +01:00
0863445dab feat: add 'rustfmt' for rust formatting 2025-12-08 20:16:18 +01:00
989a9626b3 chore: relock flake 2025-12-07 23:04:06 +01:00
7fa58a0421 feat: add 'figet.nvim' to 'nvim' flake 2025-12-07 22:59:05 +01:00
a477b2c5c3 test(nvim): try out 'm_taskwarrior_d.nvim' plugin 2025-12-07 19:16:07 +01:00
d2999ab763 fix: resolve 'nix flake check' errors 2025-12-07 17:42:18 +01:00
5d7b8d520a feat: use 'rustaceanvim' instead for rust development 2025-12-07 17:36:33 +01:00
edbbd3efd5 feat: add 'wl-clipboard' to niri desktop 2025-12-07 14:32:33 +01:00
de0b4852bf fix: work around throttled error 2025-12-07 00:13:59 +01:00
3e66197dd8 fix: declare graphics config for 'astyanax' host 2025-12-07 00:06:22 +01:00
495befc8c0 fix: resolve treesitter errors on NixOS 2025-12-07 00:05:46 +01:00
c4ccfc3a92 chore: ignore breaking changes warning for 'codecompanion.nvim' 2025-12-07 00:04:56 +01:00
02869d267a enable 'shikane' on 'astyanax' (and add 'wdisplays') 2025-12-06 23:51:50 +01:00
1e03157838 feat(nvim): set up rust lsp config 2025-12-06 23:49:29 +01:00
bc3caec6ba refactor: enable firewall explicitely for 'hecuba' host 2025-12-04 12:48:55 +01:00
2d9e1fd875 fix: remove common '.nix' suffix 2025-12-04 12:48:55 +01:00
63ef553d6b fix: update waybar to match polybar config (for the most part) 2025-12-04 12:48:55 +01:00
11ed160935 refactor: move 'wlsunset' package into home manager module 2025-12-04 12:48:55 +01:00
Hektor Misplon
7256c82b91 chore: update 'nvim' flake 2025-12-04 02:24:28 +01:00
Hektor Misplon
fcdb9d19fc fix: don't autoinstall treesitter grammars when using 'nixCats' 2025-12-04 02:21:30 +01:00
cec89af852 fix: declare 'fuzzel' config and add it to 'niri' desktop 2025-12-03 23:49:58 +01:00
8de9913ecf feat: track (currently unused) k3s module 2025-12-03 23:45:55 +01:00
d71e7d0e5d refactor: use 'default.nix' for all modules 2025-12-03 23:43:43 +01:00
e643d22eda fix: declare 'waybar' config and add it to 'niri' desktop 2025-12-03 23:36:33 +01:00
c141508203 fix: declare niri config 2025-12-03 23:36:33 +01:00
8ee1913d93 fix: try 'writeShellApplication' for 'astyanax' WOL script 2025-12-03 22:35:21 +01:00
ac4619f1a4 fix: declare 'andromache' 'eno1' interface MAC address 2025-12-03 21:40:44 +01:00
d178a03b43 feat: add 'hecuba' host config 2025-12-03 19:28:03 +01:00
063f142ae5 fix: further harden 'hardened-openssh' module 2025-12-03 17:14:08 +01:00
c90127e212 fix: replace 'gnome' desktop with 'niri' 2025-12-03 15:56:09 +01:00
f317f9409e fix: declare KeePassXC browser integration 2025-12-03 15:56:06 +01:00
c13de26ee1 chore(pkgs): add 'signal-desktop' package 2025-12-03 15:54:33 +01:00
ac5b97dba4 fix: disable kitty tab shortcut for now 2025-12-03 15:54:33 +01:00
4e2c3473e4 update bluetooth config 2025-12-03 15:54:33 +01:00
8434ceb45a refactor: move bootloader into 'modules/boot' 2025-12-03 15:54:33 +01:00
b2d1ef4bb1 refactor: move 'disko' modules into 'modules/disko' 2025-12-03 15:54:33 +01:00
c6ec0a5d1d resolve NixOS build warnings 2025-12-03 15:54:33 +01:00
d9ea9d1d27 Merge pull request 'update' (#1) from claude-code-test into main
Reviewed-on: #1
2025-12-03 15:53:43 +01:00
213 changed files with 2041 additions and 3915 deletions

1
.envrc
View File

@@ -1 +0,0 @@
use flake

3
.gitignore vendored
View File

@@ -8,6 +8,3 @@ result
result-* result-*
nixos-efi-vars.fd nixos-efi-vars.fd
.direnv/
.pre-commit-config.yaml

View File

@@ -1,7 +0,0 @@
{
"mcpServers": {
"nixos": {
"command": "mcp-nixos"
}
}
}

View File

@@ -1,27 +1,15 @@
# ❄️ NixOS flake # NixOS flake
## hosts ## Set up virtual machine ([`disko`](https://github.com/nix-community/disko/blob/master/docs/interactive-vm.md))
### NixOS 1. Build the virtual machine
```
nixos-rebuild switch --flake .#<hostname>
```
### home manager
```
home-manager switch --flake .#work
```
### virtual machines
``` ```
nix build -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko' nix build -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko'
./result/bin/disko-vm
``` ```
## docs 2. Run the virtual machine
* [deploy using colmena](./deploy/README.md) ```
* [SD installer images](./images/README.md) ./result/bin/disko-vm
```

View File

@@ -3,32 +3,26 @@
inputs, inputs,
}: }:
let inputs.colmena.lib.makeHive {
inherit (inputs.nixpkgs) lib; meta = {
utils = import ../utils { inherit lib; }; nixpkgs = import inputs.nixpkgs {
hostDirNames = utils.dirNames ../hosts; system = "x86_64-linux";
mkNode = hostname: meta: {
imports = [ ../hosts/${hostname} ];
deployment = {
inherit (meta.deployment) targetHost targetUser tags;
buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags;
}; };
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;
nodeSpecialArgs = builtins.mapAttrs (_: v: v._module.specialArgs or { }) self.nixosConfigurations;
}; };
nodes = lib.genAttrs hostDirNames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname})); astyanax.deployment.tags = [ "local" ];
in
inputs.colmena.lib.makeHive ( andromache.deployment.tags = [ "local" ];
{
meta = { vm.deployment.tags = [ "local" ];
nixpkgs = import inputs.nixpkgs { localSystem = "x86_64-linux"; };
specialArgs = { hecuba.deployment = {
inherit inputs; targetHost = "hecuba";
outputs = self; targetUser = "username";
dotsPath = ../dots; targetPort = 22;
myUtils = utils; tags = [ "cloud" ];
}; };
}; }
}
// nodes
)

View File

@@ -27,6 +27,8 @@ alias ipa="ip -brief address"
alias ipl="ip -brief link" alias ipl="ip -brief link"
alias ipr="ip route" alias ipr="ip route"
alias clip="xclip -sel clip"
alias df="df -kTh" alias df="df -kTh"
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S" alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables

View File

@@ -103,6 +103,13 @@ if [[ -z "${SSH_CONNECTION}" ]]; then
fi fi
# }}} # }}}
# pnpm
export PNPM_HOME="/home/h/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# Codi # Codi
# Usage: codi [filetype] [filename] # Usage: codi [filetype] [filename]

View File

@@ -4,4 +4,3 @@
# Set NeoVim as default editor # Set NeoVim as default editor
export EDITOR=nvim export EDITOR=nvim
export SUDO_EDITOR="$EDITOR" export SUDO_EDITOR="$EDITOR"
export SYSTEMD_EDITOR="$EDITOR"

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env bash
# back up a file by copying it to a new file with a .bak extension
# reference: https://askubuntu.com/questions/962489/is-there-any-way-to-create-backup-copy-of-a-file-without-type-its-name-twice
usage() {
echo "Usage: bak [-t|--timestamp] <file to back up>"
exit 1
}
timestamp=false
while [[ $# -gt 0 ]]; do
case $1 in
-t|--timestamp)
timestamp=true
shift
;;
*)
break
;;
esac
done
[ $# -eq 1 ] || usage
if $timestamp; then
date="$(date +%Y-%m-%d_%H-%M-%S)"
cp -vpn "$1"{,."$date".bak}
else
cp -vpn "$1"{,.bak}
fi

221
dots/.bin/git-cb Executable file
View File

@@ -0,0 +1,221 @@
#!/usr/bin/env bash
set -euo pipefail
readonly ALLOWED_MAIN_BRANCHES=("main" "master" "develop")
readonly BRANCH_TYPES=(
"feat For new features"
"hotfix For urgent fixes"
"fix For fixes"
"release For preparing releases"
"chore For non-code tasks"
)
error() {
echo "Error: $1" >&2
exit 1
}
warn() {
echo "Warning: $1" >&2
}
check_dependencies() {
local missing=()
for cmd in git fzf; do
if ! command -v "$cmd" &> /dev/null; then
missing+=("$cmd")
fi
done
if [[ ${#missing[@]} -gt 0 ]]; then
error "Missing required commands: ${missing[*]}"
fi
}
check_git_repo() {
if ! git rev-parse --git-dir &> /dev/null; then
error "Not in a git repository"
fi
}
check_current_branch() {
local current_branch
current_branch=$(git branch --show-current)
local is_main_branch=false
for branch in "${ALLOWED_MAIN_BRANCHES[@]}"; do
if [[ "$current_branch" == "$branch" ]]; then
is_main_branch=true
break
fi
done
if [[ "$is_main_branch" == false ]]; then
warn "Not branching from a main branch (current: $current_branch)"
read -rp "Continue anyway? [y/N] " response
if [[ ! "$response" =~ ^[Yy]$ ]]; then
exit 0
fi
fi
}
get_user_email() {
local email
email=$(git config --get user.email 2>/dev/null)
if [[ -z "$email" ]]; then
error "Git user email not configured. Run: git config user.email 'your@email.com'"
fi
echo "$email"
}
select_branch_type() {
local selected
selected=$(printf '%s\n' "${BRANCH_TYPES[@]}" | \
fzf --prompt="Select branch type: " \
--height=40% \
--border \
--info=inline) || error "Branch type selection cancelled"
echo "${selected%% *}"
}
select_jira_ticket() {
local email=$1
if ! command -v jira &> /dev/null; then
warn "Jira CLI not found. Proceeding without ticket ID."
return 0
fi
echo "Fetching Jira tickets for $email..." >&2
local jira_data
jira_data=$(jira issue list --assignee="$email" --order-by=priority --plain --no-headers 2>/dev/null) || {
warn "Could not fetch Jira tickets. Proceeding without ticket ID."
return 0
}
if [[ -z "$jira_data" ]]; then
warn "No Jira tickets found. Proceeding without ticket ID."
return 0
fi
echo "$jira_data" >&2
echo "" >&2
local formatted_tickets
formatted_tickets=$(echo "$jira_data" | awk '{
ticket_id = $2
$1 = $2 = ""
description = $0
gsub(/^[ \t]+/, "", description)
if (length(description) > 60) {
description = substr(description, 1, 57) "..."
}
print ticket_id " - " description
}')
if [[ -z "$formatted_tickets" ]]; then
warn "No tickets to display. Proceeding without ticket ID."
return 0
fi
local selected_ticket
selected_ticket=$(echo -e "SKIP - Create branch without ticket ID\n$formatted_tickets" | \
fzf --prompt="Select Jira ticket (or skip): " \
--height=40% \
--border \
--info=inline) || error "Ticket selection cancelled"
if [[ "$selected_ticket" != "SKIP"* ]]; then
echo "${selected_ticket%% -*}"
fi
}
get_branch_description() {
local ticket_id=$1
local editor="${EDITOR:-vi}"
local tmpfile
tmpfile=$(mktemp)
trap "rm -f '$tmpfile'" EXIT
if [[ -n "$ticket_id" ]]; then
cat > "$tmpfile" << EOF
# Selected ticket: $ticket_id
# Enter your branch description below in kebab-case (e.g., my-description):
# The ticket ID will be automatically included in the branch name.
# Lines starting with # will be ignored.
EOF
else
cat > "$tmpfile" << 'EOF'
# Enter your branch description below in kebab-case (e.g., my-description):
# Lines starting with # will be ignored.
EOF
fi
"$editor" "$tmpfile" < /dev/tty > /dev/tty
local desc
desc=$(grep -v '^#' "$tmpfile" | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "$desc"
}
validate_description() {
local desc=$1
if [[ -z "$desc" ]]; then
error "No description provided"
fi
if [[ ! "$desc" =~ ^[a-z0-9]+(-[a-z0-9]+)*$ ]]; then
error "Invalid branch description format.\nUse lowercase letters, numbers, and hyphens only.\nNo trailing or consecutive hyphens allowed.\nExample: my-feature-description"
fi
}
create_branch() {
local type=$1
local ticket_id=$2
local desc=$3
local branch
if [[ -n "$ticket_id" ]]; then
branch="$type/$ticket_id-$desc"
else
branch="$type/$desc"
fi
if git show-ref --verify --quiet "refs/heads/$branch"; then
error "Branch '$branch' already exists"
fi
echo ""
echo "Creating branch: $branch"
git checkout -b "$branch"
}
main() {
check_dependencies
check_git_repo
check_current_branch
local email
email=$(get_user_email)
local type
type=$(select_branch_type)
echo "About to call select_jira_ticket" >&2
local ticket_id=""
ticket_id=$(select_jira_ticket "$email")
local desc
desc=$(get_branch_description "$ticket_id")
validate_description "$desc"
create_branch "$type" "$ticket_id" "$desc"
}
main "$@"

26
dots/.bin/save-home Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Back up my $HOME folder to OneDrive using `restic`.
#
# Adds extra flags needed for using `rclone` with sharepoint WebDav I.e. add
# `--ignore-size --ignore-checksum --update` to the default `rclone.args`.
#
# Select directory in repo using -r rclone:<repo>:<directory>
#
# Runs `backup` command on $HOME and ignore what is listed in `.resticexclude`
#
# ```/etc/restic-env
# export B2_ACCOUNT_ID=
# export B2_ACCOUNT_KEY=
# ```
#
# `restic -r b2:desktop-arch init`
source /etc/restic-env
restic -r "$RESTIC_REPOSITORY:$HOSTNAME" backup \
--tag "hektor" \
--one-file-system \
--files-from="$HOME/.resticinclude" \
--exclude-file="$HOME/.resticexclude" \
--exclude-if-present=".nobackup" \
--verbose=3

4
dots/.bin/save-zk Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd "$ZK_PATH" || echo "No zettelkasten directory found"
git a . && git commit -m "Update" && git push

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
[ -f "/home/h/.local/share/pomo" ] && cat /home/h/.local/share/pomo || echo "" [ -f "/tmp/pomo" ] && cat /tmp/pomo || echo ""

37
dots/.bin/setup-gnome Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
gsettings set org.gnome.desktop.background primary-color "#555555"
gsettings set org.gnome.desktop.wm.preferences workspace-names "['sh', 'www', 'dev', 'info', 'etc']"
gsettings set org.gnome.desktop.wm.keybindings close "['<Shift><Super>Delete']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Super>j']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Super>k']"
gsettings set org.gnome.shell.keybindings toggle-application-view "['<Super>p']"
gsettings set org.gnome.mutter center-new-windows true
gsettings set org.gnome.shell.keybindings toggle-quick-settings []
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>a']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>s']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>d']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>f']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>g']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super><Shift>a']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super><Shift>s']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super><Shift>d']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super><Shift>f']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super><Shift>g']"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ name "Kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ command "kitty"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/ binding "<Shift><Super>Return"
gsettings set org.gnome.shell.keybindings screenshot "['Print']"
gsettings set org.gnome.desktop.wm.preferences num-workspaces "5"
gsettings set org.gnome.mutter dynamic-workspaces "false"
gsettings set org.gnome.shell.extensions.window-list display-all-workspaces "true"
gsettings set org.gnome.shell.app-switcher current-workspace-only "true"
gsettings set org.gnome.login-screen logo ''
gsettings set org.gnome.shell favorite-apps "['firefox-developer-edition.desktop']"

20
dots/.bin/setup-zk Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
if [ ! -d ~/.zk ]; then
echo "[zk] Setting up zettelkasten"
gh repo clone zk ~/.zk
else
echo "[zk] Zettelkasten already set up."
fi
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -x "$(command -v zk)" ]; then
zk
else
echo "Error: 'zk' command not found or not executable"
exit 1
fi
fi

5
dots/.bin/update-vim Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Tiny Vim update helper
nvim +PlugUpgrade +PlugUpdate +CocUpdate

14
home/modules/zk/scripts/zk.sh → dots/.bin/zk Normal file → Executable file
View File

@@ -1,6 +1,8 @@
current_zettel_path="$(cat "$ZK_PATH/current-zettel.txt")" #!/usr/bin/env bash
if [ -n "${TMUX:-}" ]; then current_zettel_path="$ZK_PATH/$(cat "$ZK_PATH/current-zettel.txt")"
if [ "$TERM_PROGRAM" = tmux ]; then
cd "$ZK_PATH" && $EDITOR "$current_zettel_path" cd "$ZK_PATH" && $EDITOR "$current_zettel_path"
else else
echo 'Not in tmux' echo 'Not in tmux'
@@ -10,9 +12,13 @@ else
read -r -p 'Enter your choice: ' choice read -r -p 'Enter your choice: ' choice
case $choice in case $choice in
1) 1)
if tmux has-session -t zk 2>/dev/null; then # Check if a tmux session is running with a window named zk
tmux attach -t zk if tmux list-windows -F '#{window_name}' | grep -q zk; then
# Attach to the session containing the 'zk' window
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
tmux attach -t "$session"
else else
# Create session with a window named 'zk' and start nvim
tmux new-session -s zk -n zk -d tmux new-session -s zk -n zk -d
tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter
tmux attach -t zk tmux attach -t zk

View File

@@ -163,4 +163,5 @@ map cmd+q
#: }}} #: }}}
include ./themes/zenwritten_dark.conf
include ./nvim.conf include ./nvim.conf

View File

@@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_dark
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #BBBBBB
background #191919
selection_foreground #BBBBBB
selection_background #404040
# Cursor colors
cursor #C9C9C9
cursor_text_color #191919
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #BBBBBB
active_tab_background #65435E
inactive_tab_foreground #BBBBBB
inactive_tab_background #303030
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #191919
color8 #3D3839
# red
color1 #DE6E7C
color9 #E8838F
# green
color2 #819B69
color10 #8BAE68
# yellow
color3 #B77E64
color11 #D68C67
# blue
color4 #6099C0
color12 #61ABDA
# magenta
color5 #B279A7
color13 #CF86C1
# cyan
color6 #66A5AD
color14 #65B8C1
# white
color7 #BBBBBB
color15 #8E8E8E
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -0,0 +1,49 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_light
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #353535
background #EEEEEE
selection_foreground #353535
selection_background #D7D7D7
# Cursor colors
cursor #353535
cursor_text_color #EEEEEE
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #353535
active_tab_background #DEB9D6
inactive_tab_foreground #353535
inactive_tab_background #CFCFCF
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #EEEEEE
color8 #C6C3C3
# red
color1 #A8334C
color9 #94253E
# green
color2 #4F6C31
color10 #3F5A22
# yellow
color3 #944927
color11 #803D1C
# blue
color4 #286486
color12 #1D5573
# magenta
color5 #88507D
color13 #7B3B70
# cyan
color6 #3B8992
color14 #2B747C
# white
color7 #353535
color15 #5C5C5C
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -1,6 +1,5 @@
default_keybindings = false default_keybindings = false
flip_status_indicators = true flip_status_indicators = true
library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove podcasts tab
[keybindings] [keybindings]
"Enter" = "play" "Enter" = "play"
@@ -25,10 +24,11 @@ library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove p
"c" = "clear" "c" = "clear"
"=" = "volup 1" "=" = "volup 1"
"-" = "voldown 1" "-" = "voldown 1"
"/" = "focus search"
"Q" = "focus queue"
"L" = "focus library"
"1" = "focus queue" "1" = "focus queue"
"2" = "focus search" "2" = "focus library"
"3" = "focus library"
"4" = "focus cover"
"h" = "move left 1" "h" = "move left 1"
"j" = "move down 1" "j" = "move down 1"
"k" = "move up 1" "k" = "move up 1"
@@ -41,5 +41,26 @@ library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove p
"Y" = "share selected" "Y" = "share selected"
"U" = "update" "U" = "update"
[theme]
primary="#aaaaaa"
secondary="#555555"
background="1a1a1a"
title="#cccccc"
title_secondary="#aaaaaa"
playing="#ffffff"
playing_bg="1a1a1a"
playing_selected="#ffffff"
highlight="#cccccc"
highlight_bg="#333333"
error="#ffffff"
error_bg="#333333"
statusbar="#cccccc"
statusbar_bg="#1a1a1a"
statusbar_progress="#cccccc"
statusbar_progress_bg="#1a1a1a"
cmdline="#cccccc"
cmdline_bg="#1a1a1a"
search_match="#ffffff"
backend="pipe" backend="pipe"
notify="false" notify="false"

View File

@@ -0,0 +1,3 @@
username = 'hektor.misplon@gmail.com'
auth_type = 0
auth_data = 'KDEzMzc9PXRydTMpPzo='

View File

@@ -13,7 +13,6 @@ if ok then
cc_config.interactions = cc_config.interactions or {} cc_config.interactions = cc_config.interactions or {}
cc_config.interactions.chat = cc_config.interactions.chat or {} cc_config.interactions.chat = cc_config.interactions.chat or {}
cc_config.interactions.chat.tools = cc_config.interactions.chat.tools or {} cc_config.interactions.chat.tools = cc_config.interactions.chat.tools or {}
cc_config.interactions.chat.variables = cc_config.interactions.chat.variables or {}
require("mcphub.extensions.codecompanion").setup({ require("mcphub.extensions.codecompanion").setup({
make_vars = true, make_vars = true,

View File

@@ -1,35 +0,0 @@
local hydra_repl = "hydra-repl"
if not vim.fn.executable(hydra_repl) then
return
end
local function send(lines)
vim.system({ hydra_repl, table.concat(lines, "\n") })
end
local function get_paragraph(buf)
local start_ = vim.fn.search("^$", "bnW")
local end_ = vim.fn.search("^$", "nW") - 1
if end_ < vim.api.nvim_win_get_cursor(0)[1] then
end_ = vim.api.nvim_buf_line_count(buf)
end
return vim.api.nvim_buf_get_lines(buf, start_, end_, false)
end
local function get_selection(buf)
return vim.api.nvim_buf_get_lines(buf, vim.fn.line("'<") - 1, vim.fn.line("'>"), false)
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "javascript",
callback = function(e)
if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(e.buf), ":e") ~= "hydra" then
return
end
local buf = e.buf
vim.keymap.set("n", "<CR>", function() send(get_paragraph(buf)) end, { buffer = buf, desc = "hydra: send block" })
vim.keymap.set("v", "<CR>", function() send(get_selection(buf)) end, { buffer = buf, desc = "hydra: send selection" })
end,
})

View File

@@ -85,8 +85,8 @@ local servers = {
}, },
}, },
}, },
openscad_ls = {},
pyright = {}, pyright = {},
-- tsserver = {},
svelte = { svelte = {
plugin = { plugin = {
svelte = { svelte = {
@@ -95,6 +95,7 @@ local servers = {
}, },
}, },
tailwindcss = {}, tailwindcss = {},
-- vtsls = {},
ts_ls = {}, ts_ls = {},
-- vtsls = { -- vtsls = {
-- maxTsServerMemory = 16384, -- maxTsServerMemory = 16384,

View File

@@ -1,5 +1,23 @@
local ls = require("luasnip") local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local c = ls.choice_node
local d = ls.dynamic_node
local r = ls.restore_node
local l = require("luasnip.extras").lambda
local rep = require("luasnip.extras").rep
local p = require("luasnip.extras").partial
local m = require("luasnip.extras").match
local n = require("luasnip.extras").nonempty
local dl = require("luasnip.extras").dynamic_lambda
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local conds = require("luasnip.extras.expand_conditions")
ls.config.set_config({ ls.config.set_config({
history = true, history = true,
update_events = "TextChanged,TextChangedI", update_events = "TextChanged,TextChangedI",
@@ -9,5 +27,287 @@ ls.config.set_config({
store_selection_keys = "<Tab>", store_selection_keys = "<Tab>",
}) })
local function copy(args)
return args[1]
end
local function bash(_, _, command)
local file = io.popen(command, "r")
local res = {}
if file then
for line in file:lines() do
table.insert(res, line)
end
end
return res
end
local date_input = function(args, snip, old_state, date_format)
print(args, snip, old_state)
return sn(nil, i(1, os.date(date_format or "%Y-%m-%d")))
end
-- -- FIXME: EXAMPLE
-- ls.add_snippets("all", {
-- -- arg1: trigger `fn`,
-- -- arg2: nodes to insert into buffer on expansion.
-- s("fn", {
-- t("//Parameters: "), -- Text.
-- f(copy, 2), -- 1: function, 2: placeholders to copy text from
-- t({ "", "function " }), -- placeholder/insert.
-- i(1),
-- t("("), -- placeholder with initial text.
-- i(2, "int foo"), -- linebreak
-- t({ ") {", "\t" }), -- last placeholder, snippet exit point
-- i(0),
-- t({ "", "}" }),
-- }),
-- s("class", {
-- -- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes.
-- c(1, {
-- t("public "),
-- t("private "),
-- }),
-- t("class "),
-- i(2),
-- t(" "),
-- c(3, {
-- t("{"),
-- -- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!!
-- -- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to.
-- sn(nil, {
-- t("extends "),
-- -- restoreNode: stores and restores nodes.
-- -- pass position, store-key and nodes.
-- r(1, "other_class", i(1)),
-- t(" {"),
-- }),
-- sn(nil, {
-- t("implements "),
-- -- no need to define the nodes for a given key a second time.
-- r(1, "other_class"),
-- t(" {"),
-- }),
-- }),
-- t({ "", "\t" }),
-- i(0),
-- t({ "", "}" }),
-- }),
-- -- Alternative printf-like notation for defining snippets. It uses format
-- -- string with placeholders similar to the ones used with Python's .format().
-- s(
-- "fmt1",
-- fmt("To {title} {} {}.", {
-- i(2, "Name"),
-- i(3, "Surname"),
-- title = c(1, { t("Mr."), t("Ms.") }),
-- })
-- ),
-- -- To escape delimiters use double them, e.g. `{}` -> `{{}}`.
-- -- Multi-line format strings by default have empty first/last line removed.
-- -- Indent common to all lines is also removed. Use the third `opts` argument
-- -- to control this behaviour.
-- s(
-- "fmt2",
-- fmt(
-- [[
-- foo({1}, {3}) {{
-- return {2} * {4}
-- }}
-- ]],
-- {
-- i(1, "x"),
-- rep(1),
-- i(2, "y"),
-- rep(2),
-- }
-- )
-- ),
-- -- Empty placeholders are numbered automatically starting from 1 or the last
-- -- value of a numbered placeholder. Named placeholders do not affect numbering.
-- s(
-- "fmt3",
-- fmt("{} {a} {} {1} {}", {
-- t("1"),
-- t("2"),
-- a = t("A"),
-- })
-- ),
-- -- The delimiters can be changed from the default `{}` to something else.
-- s("fmt4", fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })),
-- -- `fmta` is a convenient wrapper that uses `<>` instead of `{}`.
-- s("fmt5", fmta("foo() { return <>; }", i(1, "x"))),
-- -- By default all args must be used. Use strict=false to disable the check
-- s(
-- "fmt6",
-- fmt("use {} only", { t("this"), t("not this") }, { strict = false })
-- ),
-- -- Use a dynamic_node to interpolate the output of a
-- -- function (see date_input above) into the initial
-- -- value of an insert_node.
-- s("novel", {
-- t("It was a dark and stormy night on "),
-- d(1, date_input, {}, { user_args = { "%A, %B %d of %Y" } }),
-- t(" and the clocks were striking thirteen."),
-- }),
-- -- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body.
-- -- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string.
-- -- This means they are not SELECTed like in other editors/Snippet engines.
-- ls.parser.parse_snippet(
-- "lspsyn",
-- "Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}"
-- ),
-- -- When wordTrig is set to false, snippets may also expand inside other words.
-- ls.parser.parse_snippet(
-- { trig = "te", wordTrig = false },
-- "${1:cond} ? ${2:true} : ${3:false}"
-- ),
-- -- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number.
-- ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"),
-- -- Using the condition, it's possible to allow expansion only in specific cases.
-- s("cond", {
-- t("will only expand in c-style comments"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- -- optional whitespace followed by //
-- return line_to_cursor:match("%s*//")
-- end,
-- }),
-- -- there's some built-in conditions in "luasnip.extras.expand_conditions".
-- s("cond2", {
-- t("will only expand at the beginning of the line"),
-- }, {
-- condition = conds.line_begin,
-- }),
-- -- The last entry of args passed to the user-function is the surrounding snippet.
-- s(
-- { trig = "a%d", regTrig = true },
-- f(function(_, snip)
-- return "Triggered with " .. snip.trigger .. "."
-- end, {})
-- ),
-- -- It's possible to use capture-groups inside regex-triggers.
-- s(
-- { trig = "b(%d)", regTrig = true },
-- f(function(_, snip)
-- return "Captured Text: " .. snip.captures[1] .. "."
-- end, {})
-- ),
-- s({ trig = "c(%d+)", regTrig = true }, {
-- t("will only expand for even numbers"),
-- }, {
-- condition = function(line_to_cursor, matched_trigger, captures)
-- return tonumber(captures[1]) % 2 == 0
-- end,
-- }),
-- -- Use a function to execute any shell command and print its text.
-- s("bash", f(bash, {}, "ls")),
-- -- Short version for applying String transformations using function nodes.
-- s("transform", {
-- i(1, "initial text"),
-- t({ "", "" }),
-- -- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations.
-- -- This list will be applied in order to the first node given in the second argument.
-- l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1),
-- }),
-- s("transform2", {
-- i(1, "initial text"),
-- t("::"),
-- i(2, "replacement for e"),
-- t({ "", "" }),
-- -- Lambdas can also apply transforms USING the text of other nodes:
-- l(l._1:gsub("e", l._2), { 1, 2 }),
-- }),
-- s({ trig = "trafo(%d+)", regTrig = true }, {
-- -- env-variables and captures can also be used:
-- l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}),
-- }),
-- -- Set store_selection_keys = "<Tab>" (for example) in your
-- -- luasnip.config.setup() call to populate
-- -- TM_SELECTED_TEXT/SELECT_RAW/SELECT_DEDENT.
-- -- In this case: select a URL, hit Tab, then expand this snippet.
-- s("link_url", {
-- t('<a href="'),
-- f(function(_, snip)
-- -- TM_SELECTED_TEXT is a table to account for multiline-selections.
-- -- In this case only the first line is inserted.
-- return snip.env.TM_SELECTED_TEXT[1] or {}
-- end, {}),
-- t('">'),
-- i(1),
-- t("</a>"),
-- i(0),
-- }),
-- -- Shorthand for repeating the text in a given node.
-- s("repeat", { i(1, "text"), t({ "", "" }), rep(1) }),
-- -- Directly insert the ouput from a function evaluated at runtime.
-- s("part", p(os.date, "%Y")),
-- -- use matchNodes (`m(argnode, condition, then, else)`) to insert text
-- -- based on a pattern/function/lambda-evaluation.
-- -- It's basically a shortcut for simple functionNodes:
-- s("mat", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "%d", "contains a number", "no number :("),
-- }),
-- -- The `then`-text defaults to the first capture group/the entire
-- -- match if there are none.
-- s("mat2", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, "[abc][abc][abc]"),
-- }),
-- -- It is even possible to apply gsubs' or other transformations
-- -- before matching.
-- s("mat3", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(
-- 1,
-- l._1:gsub("[123]", ""):match("%d"),
-- "contains a number that isn't 1, 2 or 3!"
-- ),
-- }),
-- -- `match` also accepts a function in place of the condition, which in
-- -- turn accepts the usual functionNode-args.
-- -- The condition is considered true if the function returns any
-- -- non-nil/false-value.
-- -- If that value is a string, it is used as the `if`-text if no if is explicitly given.
-- s("mat4", {
-- i(1, { "sample_text" }),
-- t(": "),
-- m(1, function(args)
-- -- args is a table of multiline-strings (as usual).
-- return (#args[1][1] % 2 == 0 and args[1]) or nil
-- end),
-- }),
-- -- The nonempty-node inserts text depending on whether the arg-node is
-- -- empty.
-- s("nempty", {
-- i(1, "sample_text"),
-- n(1, "i(1) is not empty!"),
-- }),
-- -- dynamic lambdas work exactly like regular lambdas, except that they
-- -- don't return a textNode, but a dynamicNode containing one insertNode.
-- -- This makes it easier to dynamically set preset-text for insertNodes.
-- s("dl1", {
-- i(1, "sample_text"),
-- t({ ":", "" }),
-- dl(2, l._1, 1),
-- }),
-- -- Obviously, it's also possible to apply transformations, just like lambdas.
-- s("dl2", {
-- i(1, "sample_text"),
-- i(2, "sample_text_2"),
-- t({ "", "" }),
-- dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }),
-- }),
-- }, {
-- key = "all",
-- })
require("luasnip.loaders.from_lua").lazy_load({ paths = { "~/.config/nvim/snips" } }) require("luasnip.loaders.from_lua").lazy_load({ paths = { "~/.config/nvim/snips" } })
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/Code - Insiders/User/snippets" } }) require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/Code - Insiders/User/snippets" } })

View File

@@ -0,0 +1,9 @@
require("m_taskwarrior_d").setup()
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
pattern = "*.md",
callback = function()
vim.cmd("TWSyncTasks")
end,
})

View File

@@ -1 +1,3 @@
vim.opt.termguicolors = true
require("nvim-highlight-colors").setup({}) require("nvim-highlight-colors").setup({})

View File

@@ -28,6 +28,9 @@ require("lint").linters_by_ft = {
yaml = { "yamllint" }, yaml = { "yamllint" },
} }
-- TODO: Wouldn't it be possible / nice to only try to load the linters when they are
-- actually needed?
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
callback = function() callback = function()
require("lint").try_lint() require("lint").try_lint()

View File

@@ -1,28 +1,16 @@
vim.g.tidal_default_config = { socket_name = "default", target_pane = "tidal:1.1" } vim.cmd([[
vim.g.tidal_no_mappings = 1 " Tidalcycles (sclang and vim-tidal)
let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1.1"}
let g:tidal_no_mappings = 1
vim.api.nvim_create_autocmd("FileType", { au FileType tidal nm <buffer> <leader>ep <Plug>TidalParagraphSend
pattern = "tidal", au FileType tidal nm <buffer> <leader>ee <Plug>TidalLineSend
callback = function(e) au FileType tidal nnoremap <buffer> <leader>h :TidalHush<cr>
local buf = e.buf au FileType tidal com! -nargs=1 S :TidalSilence <args>
vim.keymap.set("n", "<leader>ep", "<Plug>TidalParagraphSend", { buffer = buf, desc = "Tidal: send paragraph" }) au FileType tidal com! -nargs=1 P :TidalPlay <args>
vim.keymap.set("n", "<leader>ee", "<Plug>TidalLineSend", { buffer = buf, desc = "Tidal: send line" }) au FileType tidal com! -nargs=0 H :TidalHush
vim.keymap.set("n", "<leader>h", ":TidalHush<cr>", { buffer = buf, desc = "Tidal: hush" })
vim.api.nvim_buf_create_user_command(buf, "S", "TidalSilence <args>", { nargs = 1 })
vim.api.nvim_buf_create_user_command(buf, "P", "TidalPlay <args>", { nargs = 1 })
vim.api.nvim_buf_create_user_command(buf, "H", "TidalHush", { nargs = 0 })
end,
})
-- SuperCollider " SuperCollider
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter", "BufNewFile", "BufRead" }, { au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd se filetype=supercollider
pattern = { "*.sc", "*.scd" }, au Filetype supercollider packadd scvim
callback = function() ]])
vim.bo.filetype = "supercollider"
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "supercollider",
command = "packadd scvim",
})

View File

@@ -1,8 +1,6 @@
require("zk.utils")
vim.cmd([[ vim.cmd([[
" Change local buffer to directory of current file after the plugin has loaded " Change local buffer to directory of current file after the plugin has loaded
execute 'autocmd BufEnter' g:zk_path . '/*.md' 'silent lcd %:p:h' autocmd VimEnter * lcd %:p:h
" " Override wiki index mapping to also cd into the wiki " " Override wiki index mapping to also cd into the wiki
nm <leader>ww <plug>(wiki-index) nm <leader>ww <plug>(wiki-index)
@@ -13,16 +11,11 @@ nm <leader>ww <plug>(wiki-index)
" nm <leader>s <plug>(wiki-link-follow-split) " nm <leader>s <plug>(wiki-link-follow-split)
" nm <leader>v <plug>(wiki-link-follow-vsplit) " nm <leader>v <plug>(wiki-link-follow-vsplit)
function! ZKContextualEcho() autocmd BufEnter *.md if expand('%:t') =~ '_' | echo 'hierarchical relation' | endif
let l:name = expand('%:t') autocmd BufEnter *.md if expand('%:t') =~ '--' | echo 'relation' | endif
if l:name =~ '_' | echo 'hierarchical relation' autocmd BufEnter *.md if expand('%:t') =~ '<>' | echo 'dichotomy' | endif
elseif l:name =~ '--' | echo 'relation' autocmd BufEnter *.md if expand('%:t') =~ 'my-' | echo 'personal file' | endif
elseif l:name =~ '<>' | echo 'dichotomy' autocmd BufEnter *.md if expand('%:t') =~ 'project_' | echo 'project file' | endif
elseif l:name =~ 'my-' | echo 'personal file'
elseif l:name =~ 'project_' | echo 'project file'
endif
endfunction
execute 'autocmd BufEnter' g:zk_path . '/*.md' 'call ZKContextualEcho()'
" Only load wiki.vim for zk directory " Only load wiki.vim for zk directory
let g:wiki_index_name='index' let g:wiki_index_name='index'
@@ -83,7 +76,7 @@ let g:wiki_templates = [
" "
let g:wiki_filetypes=['md'] let g:wiki_filetypes=['md']
let g:wiki_root=g:zk_path let g:wiki_root='~/.zk'
let g:wiki_global_load=0 let g:wiki_global_load=0
let g:wiki_link_creation = { let g:wiki_link_creation = {
\ 'md': { \ 'md': {

View File

@@ -42,11 +42,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1777273601, "lastModified": 1769085828,
"narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=", "narHash": "sha256-TjhFIAtS628+/r3IuYWPcNa++mUMMDDG8PbSfFHXBiA=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "f69ea013e328841a7def7037ed59788a76be8816", "rev": "43fbf4d12b0a613f1a792503da4bb2bf270173c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,11 +73,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1777270315, "lastModified": 1769421245,
"narHash": "sha256-yKB4G6cKsQsWN7M6rZGk6gkJPDNPIzT05y4qzRyCDlI=", "narHash": "sha256-m5QLKjpdhbDrhyrUbEm5Haq3lqE5Z6xh2tab5vTHUTo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6368eda62c9775c38ef7f714b2555a741c20c72d", "rev": "5b265bda51b42a2a85af0a543c3e57b778b01b7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -106,11 +106,11 @@
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773934114, "lastModified": 1768584652,
"narHash": "sha256-8trqFsA7nTKSdtkiAL0Sa9bXjh5ONtAqN7XNE/B8ukM=", "narHash": "sha256-jnMc87OjURNcqsva0npYgVyUrWc5C6L7yHpNvt9eSmg=",
"owner": "qvalentin", "owner": "qvalentin",
"repo": "helm-ls.nvim", "repo": "helm-ls.nvim",
"rev": "20df43509b02a3ce3c6b3eee254d6e2bffa9a370", "rev": "f0b9a1723890971a6d84890b50dbf5f40974ea1b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -119,6 +119,22 @@
"type": "github" "type": "github"
} }
}, },
"plugins-m-taskwarrior-d-nvim": {
"flake": false,
"locked": {
"lastModified": 1767960157,
"narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github"
},
"original": {
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"type": "github"
}
},
"plugins-mcphub-nvim": { "plugins-mcphub-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -190,6 +206,7 @@
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
"plugins-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
"plugins-nvimkit-nvim": "plugins-nvimkit-nvim", "plugins-nvimkit-nvim": "plugins-nvimkit-nvim",
"plugins-shipwright-nvim": "plugins-shipwright-nvim", "plugins-shipwright-nvim": "plugins-shipwright-nvim",

View File

@@ -8,10 +8,10 @@
url = "github:rktjmp/shipwright.nvim"; url = "github:rktjmp/shipwright.nvim";
flake = false; flake = false;
}; };
# plugins-m-taskwarrior-d-nvim = { plugins-m-taskwarrior-d-nvim = {
# url = "github:huantrinh1802/m_taskwarrior_d.nvim"; url = "github:huantrinh1802/m_taskwarrior_d.nvim";
# flake = false; flake = false;
# }; };
plugins-beancount-nvim = { plugins-beancount-nvim = {
url = "github:polarmutex/beancount.nvim"; url = "github:polarmutex/beancount.nvim";
flake = false; flake = false;
@@ -37,6 +37,7 @@
outputs = outputs =
{ {
self,
nixpkgs, nixpkgs,
nixCats, nixCats,
... ...
@@ -45,38 +46,13 @@
inherit (nixCats) utils; inherit (nixCats) utils;
luaPath = ./.; luaPath = ./.;
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all; forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
extra_pkg_config = { extra_pkg_config = { };
allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"vim-sandwich"
"jupytext.nvim"
"eyeliner.nvim"
"context_filetype.vim"
"editorconfig-vim"
"unicode.vim"
"quarto-nvim"
"vim-openscad"
"lsp_lines.nvim"
"nvim-highlight-colors"
"nvim-lint"
];
};
mkDependencyOverlays = system: [ mkDependencyOverlays = system: [
(utils.standardPluginOverlay inputs) (utils.standardPluginOverlay inputs)
(_final: _prev: { (final: prev: {
mcp-hub = inputs.mcp-hub.packages.${system}.default; mcp-hub = inputs.mcp-hub.packages.${system}.default;
}) })
(_: prev: {
luajitPackages = prev.luajitPackages.overrideScope (
_: lprev: {
neotest = lprev.neotest.overrideAttrs (_: {
doCheck = false;
});
}
);
})
]; ];
categoryDefinitions = categoryDefinitions =
@@ -87,40 +63,27 @@
{ {
lspsAndRuntimeDeps = with pkgs; { lspsAndRuntimeDeps = with pkgs; {
general = [ general = [
nodejs_24
black black
clang clang
clang-tools clang-tools
curl # → plenary-nvim, mcp-hub
delta delta
emmet-language-server
eslint_d
fd fd
gawk gawk
gdtoolkit_4 gdtoolkit_4
hadolint
helm-ls
isort isort
lua-language-server
mcp-hub mcp-hub
nixd nixd
nixfmt nixfmt
prettier nodePackages.prettier
typescript-language-server nodePackages.typescript-language-server
ormolu ormolu
prettierd prettierd
rust-analyzer
rustfmt rustfmt
shellcheck-minimal shellcheck-minimal
stylelint stylelint
stylua stylua
tree-sitter tree-sitter
tailwindcss-language-server
typescript-language-server
vscode-langservers-extracted vscode-langservers-extracted
vtsls
yaml-language-server
yamllint
]; ];
}; };
@@ -192,7 +155,7 @@
kitty-scrollback-nvim kitty-scrollback-nvim
fidget-nvim fidget-nvim
rustaceanvim rustaceanvim
# pkgs.neovimPlugins.m-taskwarrior-d-nvim pkgs.neovimPlugins.m-taskwarrior-d-nvim
claude-code-nvim claude-code-nvim
]; ];
}; };
@@ -210,17 +173,19 @@
}; };
packageDefinitions = { packageDefinitions = {
nvim = _: { nvim =
settings = { { ... }:
suffix-path = true; {
suffix-LD = true; settings = {
wrapRc = true; suffix-path = true;
aliases = [ "vim" ]; suffix-LD = true;
wrapRc = true;
aliases = [ "vim" ];
};
categories = {
general = true;
};
}; };
categories = {
general = true;
};
};
}; };
defaultPackageName = "nvim"; defaultPackageName = "nvim";
in in

View File

@@ -1,12 +1,15 @@
local json_newline = function() local json_newline = function()
local line = vim.api.nvim_get_current_line() local line = vim.api.nvim_get_current_line()
if line == "" then if line == "" then
print("line is empty")
return "o" return "o"
elseif string.byte(line, -1) == string.byte(",") then elseif string.byte(line, -1) == string.byte(",") then
return "o" return "o"
elseif string.byte(line, -1) == string.byte("{") then elseif string.byte(line, -1) == string.byte("{") then
print("line ends with '{'")
return "o" return "o"
elseif string.byte(line, -1) == string.byte("}") then elseif string.byte(line, -1) == string.byte("}") then
print("line ends with '}'")
return "o" return "o"
else else
return "A,<CR>" return "A,<CR>"

View File

@@ -26,4 +26,5 @@ set lcs=trail:·,tab:→\ ,nbsp:␣ " Whitespace rendering
set ar " Autoread set ar " Autoread
set spellsuggest+=5 " Limit spell suggestions set spellsuggest+=5 " Limit spell suggestions
set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip
" set thesaurus+=./thesaurus/mthesaur.txt " FIXME
]]) ]])

View File

@@ -9,6 +9,5 @@ vim.filetype.add({
["%.env.*"] = "dotenv", ["%.env.*"] = "dotenv",
["%.pl$"] = "prolog", ["%.pl$"] = "prolog",
[".*.containerfile.*"] = "dockerfile", [".*.containerfile.*"] = "dockerfile",
["%.hydra$"] = "javascript",
}, },
}) })

View File

@@ -1,57 +1,60 @@
vim.g.mapleader = " " vim.cmd([[
vim.g.maplocalleader = ";" " Leader keys
let mapleader = " "
let maplocalleader = ";"
" Splits & navigation
nm s <c-w> " Split horizontal
nm ss :sp<CR><c-w>w| " Split horizontal
nm sv :vs<CR><c-w>w| " Split vertical
nm sw <c-w>w| " Navigate splits
nm sh <c-w>h| "
nm sj <c-w>j| "
nm sk <c-w>k| "
nm sl <c-w>l| "
nn sH <c-w>8<| " Resize splits
nn sJ <c-w>8-| "
nn sK <c-w>8+| "
nn sL <c-w>8>| "
nn s= <c-w>=| " Equalize splits
" Open
nn sb :Lex<cr>| " File tree
nn <leader><leader> :noh<cr> |"
nn <leader>t :term<cr>| " Open terminal
" Remaps
ino <nowait> jj <esc>| " Normal now
nn <left> <nop>| " Hard mode
nn <down> <nop>| " "
nn <up> <nop>| " "
nn <right> <nop>| " "
ino <left> <nop>| " "
ino <down> <nop>| " "
ino <up> <nop>| " "
ino <right> <nop>| " "
" Search
nn <c-_> :noh<cr>| " map 'ctrl + /'
" Line numbers
nn <leader>n :set nu! rnu!<cr>
" Vim configuration
nn <leader>ec :vs $MYVIMRC<cr>
nn <leader>so :so %<cr>
]])
local set = vim.keymap.set local set = vim.keymap.set
-- splits & navigation set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Run `chmod +x` on current file" })
set("n", "s", "<c-w>", { desc = "window prefix" }) set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "Yank path" })
set("n", "ss", ":sp<CR><c-w>w", { desc = "split horizontal" })
set("n", "sv", ":vs<CR><c-w>w", { desc = "split vertical" })
set("n", "sw", "<c-w>w", { desc = "navigate splits" })
set("n", "sh", "<c-w>h", { desc = "focus left split" })
set("n", "sj", "<c-w>j", { desc = "focus below split" })
set("n", "sk", "<c-w>k", { desc = "focus above split" })
set("n", "sl", "<c-w>l", { desc = "focus right split" })
set("n", "sH", "<c-w>8<", { desc = "shrink split left" })
set("n", "sJ", "<c-w>8-", { desc = "shrink split down" })
set("n", "sK", "<c-w>8+", { desc = "grow split up" })
set("n", "sL", "<c-w>8>", { desc = "grow split right" })
set("n", "s=", "<c-w>=", { desc = "equalize splits" })
-- open -- Remap native NeoVim comment keymaps
set("n", "sb", ":Lex<cr>", { desc = "file tree" }) set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "Toggle comment" })
set("n", "<leader><leader>", ":noh<cr>", { desc = "clear highlights" }) set("n", "<leader>cc", "gcc", { remap = true, desc = "Toggle comment line" })
set("n", "<leader>t", ":term<cr>", { desc = "open terminal" }) set("o", "<leader>c", "gc", { remap = true, desc = "Comment textobject" })
-- remaps -- Move lines
set("i", "jj", "<esc>", { nowait = true, desc = "exit insert mode" }) set("v", "K", ": '<,'>move '<-2<cr>gv")
set("n", "<left>", "<nop>") set("v", "J", ": '<,'>move '>+1<cr>gv")
set("n", "<down>", "<nop>")
set("n", "<up>", "<nop>")
set("n", "<right>", "<nop>")
set("i", "<left>", "<nop>")
set("i", "<down>", "<nop>")
set("i", "<up>", "<nop>")
set("i", "<right>", "<nop>")
-- search
set("n", "<c-_>", ":noh<cr>", { desc = "clear search highlight" })
-- line numbers
set("n", "<leader>n", ":set nu! rnu!<cr>", { desc = "toggle line numbers" })
-- vim configuration
set("n", "<leader>ec", ":vs $MYVIMRC<cr>", { desc = "edit vimrc" })
set("n", "<leader>so", ":so %<cr>", { desc = "source current file" })
set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "run `chmod +x` on current file" })
set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "yank path" })
-- remap native NeoVim comment keymaps
set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "toggle comment" })
set("n", "<leader>cc", "gcc", { remap = true, desc = "toggle comment line" })
set("o", "<leader>c", "gc", { remap = true, desc = "comment textobject" })
-- move lines
set("v", "K", ": '<,'>move '<-2<cr>gv", { desc = "move selection up" })
set("v", "J", ": '<,'>move '>+1<cr>gv", { desc = "move selection down" })

View File

@@ -2,10 +2,10 @@ local autocmd = vim.api.nvim_create_autocmd
autocmd("BufNewFile", { autocmd("BufNewFile", {
pattern = "shell.nix", pattern = "shell.nix",
command = "0r ~/.config/nvim/skeletons/shell.nix.skeleton", command = "0r ~/.config/nvim/skeletons/shell.nix",
}) })
autocmd("BufNewFile", { autocmd("BufNewFile", {
pattern = "flake.nix", pattern = "flake.nix",
command = "0r ~/.config/nvim/skeletons/flake.nix.skeleton", command = "0r ~/.config/nvim/skeletons/flake.nix",
}) })

View File

@@ -13,31 +13,28 @@ local function get_markdown_files(base)
return items return items
end end
function source:get_keyword_pattern()
return "[%w%./%-]*"
end
function source:complete(params, callback) function source:complete(params, callback)
local cursor_before_line = params.context.cursor_before_line local cursor_before_line = params.context.cursor_before_line
local cursor_after_line = params.context.cursor_after_line or "" local cursor_after_line = params.context.cursor_after_line or ""
if not cursor_before_line:match("%[[^%]]*%]%(") then local trigger = cursor_before_line:match("%[[^%]]*%]%(([^)]*)$")
callback({})
return
end
local items = get_markdown_files(".") if trigger ~= nil then
local next_char = cursor_after_line:sub(1, 1) local items = get_markdown_files(".")
local next_char = cursor_after_line:sub(1, 1)
for _, item in ipairs(items) do for _, item in ipairs(items) do
if next_char == ")" then if next_char == ")" then
item.insertText = item.label item.insertText = item.label
else else
item.insertText = item.label .. ")" item.insertText = item.label .. ")"
end
end end
end
callback(items) callback(items)
else
callback({})
end
end end
function source:get_trigger_characters() function source:get_trigger_characters()

View File

@@ -1,10 +1,9 @@
require("zk.cmp") require("zk.cmp")
require("zk.utils")
vim.cmd([[ vim.cmd([[
let s:zk_preview_enabled = 0 let s:zk_preview_enabled = 0
let s:live_server_job = -1 let s:live_server_job = -1
execute 'au BufEnter' g:zk_path . '/*.md' 'silent exe "!echo %" ">" g:zk_path . "/current-zettel.txt"' au BufEnter /home/h/.zk/*.md silent exe '!echo "%" > /home/h/.zk/current-zettel.txt'
function! ToggleZKPreview() function! ToggleZKPreview()
if s:zk_preview_enabled == 1 if s:zk_preview_enabled == 1
let s:zk_preview_enabled = 0 let s:zk_preview_enabled = 0
@@ -12,10 +11,10 @@ function! ToggleZKPreview()
au! ZKPreview au! ZKPreview
else else
let s:zk_preview_enabled = 1 let s:zk_preview_enabled = 1
let s:live_server_job = jobstart('live-server --watch=' . g:zk_path . '/current-zettel-content.html --open=current-zettel-content.html --port=8080') let s:live_server_job = jobstart('live-server --watch=/home/h/.zk/current-zettel-content.html --open=current-zettel-content.html --port=8080')
augroup ZKPreview augroup ZKPreview
execute 'au BufEnter' g:zk_path . '/*.md' 'silent exe "!cat %:r.html" ">" g:zk_path . "/current-zettel-content.html"' au BufEnter /home/h/.zk/*.md silent exe '!cat "%:r.html" > /home/h/.zk/current-zettel-content.html'
execute 'au BufWritePost' g:zk_path . '/*.md' 'silent exe "!make && cat %:r.html" ">" g:zk_path . "/current-zettel-content.html"' au BufWritePost /home/h/.zk/*.md silent exe '!make && cat "%:r.html" > /home/h/.zk/current-zettel-content.html'
augroup END augroup END
endif endif
endfunction endfunction

View File

@@ -1,2 +0,0 @@
vim.g.zk_path = os.getenv("ZK_PATH") or (os.getenv("HOME") .. "/.zk")
return vim.g.zk_path

View File

@@ -17,7 +17,7 @@ local LOCALHOST_IP = "127.0.0.1"
return { return {
s({ trig = "fn", desc = "Filename" }, { f(TM_FILENAME_BASE) }), s({ trig = "fn", desc = "Filename" }, { f(TM_FILENAME_BASE) }),
s({ trig = "fne", desc = "Filename (+extension)" }, { f(TM_FILENAME) }), s({ trig = "fne", dscr = "Filename (+extension)" }, { f(TM_FILENAME) }),
s({ trig = "hm" }, { t(NAME) }), s({ trig = "hm" }, { t(NAME) }),
s({ trig = "loho" }, { t(LOCALHOST) }), s({ trig = "loho" }, { t(LOCALHOST) }),
s({ trig = "lohoi" }, { t(LOCALHOST_IP) }), s({ trig = "lohoi" }, { t(LOCALHOST_IP) }),

View File

@@ -5,112 +5,112 @@ local i = ls.insert_node
return { return {
-- Flex -- Flex
s({ trig = "b1", desc = "Add 'border: 1px <color>;'" }, { s({ trig = "b1", dscr = "Add 'border: 1px <color>;'" }, {
t("border: 1px solid "), t("border: 1px solid "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "dfl", desc = "Add 'display: flex;'" }, { s({ trig = "dfl", dscr = "Add 'display: flex;'" }, {
t("display: flex;"), t("display: flex;"),
i(0), i(0),
}), }),
s({ trig = "flr", desc = "Add 'flex-direction: row;'" }, { s({ trig = "flr", dscr = "Add 'flex-direction: row;'" }, {
t("flex-direction: row;"), t("flex-direction: row;"),
i(0), i(0),
}), }),
s({ trig = "flc", desc = "Add 'flex-direction: column;'" }, { s({ trig = "flc", dscr = "Add 'flex-direction: column;'" }, {
t("flex-direction: column;"), t("flex-direction: column;"),
i(0), i(0),
}), }),
s({ trig = "flw", desc = "Add 'flex-wrap: wrap;'" }, { s({ trig = "flw", dscr = "Add 'flex-wrap: wrap;'" }, {
t("flex-wrap: wrap;"), t("flex-wrap: wrap;"),
i(0), i(0),
}), }),
s({ trig = "dfc", desc = "Add 'flex-direction: column;'" }, { s({ trig = "dfc", dscr = "Add 'flex-direction: column;'" }, {
t("display: flex;"), t("display: flex;"),
t("flex-direction: column;"), t("flex-direction: column;"),
i(0), i(0),
}), }),
-- Grid -- Grid
s({ trig = "dg", desc = "Add 'display: grid;'" }, { s({ trig = "dg", dscr = "Add 'display: grid;'" }, {
t("display: grid;"), t("display: grid;"),
i(0), i(0),
}), }),
-- Block -- Block
s({ trig = "db", desc = "Add 'display: block;'" }, { s({ trig = "db", dscr = "Add 'display: block;'" }, {
t("display: block;"), t("display: block;"),
i(0), i(0),
}), }),
-- None -- None
s({ trig = "dn", desc = "Add 'display: none;'" }, { s({ trig = "dn", dscr = "Add 'display: none;'" }, {
t("display: none;"), t("display: none;"),
i(0), i(0),
}), }),
-- CSS Variables -- CSS Variables
s({ trig = "v", desc = "Add CSS variable" }, { s({ trig = "v", dscr = "Add CSS variable" }, {
t("var(--"), t("var(--"),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
-- Margin -- Margin
s({ trig = "m", desc = "Add 'margin: ;'" }, { s({ trig = "m", dscr = "Add 'margin: ;'" }, {
t("margin: "), t("margin: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mt", desc = "Add 'margin-top: ;'" }, { s({ trig = "mt", dscr = "Add 'margin-top: ;'" }, {
t("margin-top: "), t("margin-top: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mr", desc = "Add 'margin-right: ;'" }, { s({ trig = "mr", dscr = "Add 'margin-right: ;'" }, {
t("margin-right: "), t("margin-right: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "mb", desc = "Add 'margin-bottom: ;'" }, { s({ trig = "mb", dscr = "Add 'margin-bottom: ;'" }, {
t("margin-bottom: "), t("margin-bottom: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "ml", desc = "Add 'margin-left: ;'" }, { s({ trig = "ml", dscr = "Add 'margin-left: ;'" }, {
t("margin-left: "), t("margin-left: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
-- Padding -- Padding
s({ trig = "p", desc = "Add 'padding: ;'" }, { s({ trig = "p", dscr = "Add 'padding: ;'" }, {
t("padding: "), t("padding: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pt", desc = "Add 'padding-top: ;'" }, { s({ trig = "pt", dscr = "Add 'padding-top: ;'" }, {
t("padding-top: "), t("padding-top: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pr", desc = "Add 'padding-right: ;'" }, { s({ trig = "pr", dscr = "Add 'padding-right: ;'" }, {
t("padding-right: "), t("padding-right: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pb", desc = "Add 'padding-bottom: ;'" }, { s({ trig = "pb", dscr = "Add 'padding-bottom: ;'" }, {
t("padding-bottom: "), t("padding-bottom: "),
i(1), i(1),
t(";"), t(";"),
i(0), i(0),
}), }),
s({ trig = "pl", desc = "Add 'padding-left: ;'" }, { s({ trig = "pl", dscr = "Add 'padding-left: ;'" }, {
t("padding-left: "), t("padding-left: "),
i(1), i(1),
t(";"), t(";"),

View File

@@ -4,19 +4,19 @@ local t = ls.text_node
local i = ls.insert_node local i = ls.insert_node
return { return {
s({ trig = "clg", desc = "console.log" }, { s({ trig = "clg", dscr = "console.log" }, {
t("console.log("), t("console.log("),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
s({ trig = "Js", desc = "JSON.stringify" }, { s({ trig = "Js", dscr = "JSON.stringify" }, {
t("JSON.stringify("), t("JSON.stringify("),
i(1), i(1),
t(")"), t(")"),
i(0), i(0),
}), }),
s({ trig = "Jsf", desc = "JSON.stringify (formatted)" }, { s({ trig = "Jsf", dscr = "JSON.stringify (formatted)" }, {
t("JSON.stringify("), t("JSON.stringify("),
i(1), i(1),
t(", 0, 2)"), t(", 0, 2)"),

View File

@@ -915,21 +915,21 @@ end
return { return {
s( s(
{ trig = "^h", regTrig = true, desc = "Markdown header" }, { trig = "^h", regTrig = true, dscr = "Markdown header" },
fmta("# <><>", { fmta("# <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),
}) })
), ),
s( s(
{ trig = "^sec", regTrig = true, desc = "Markdown header" }, { trig = "^sec", regTrig = true, dscr = "Markdown header" },
fmta("## <><>", { fmta("## <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),
}) })
), ),
s( s(
{ trig = "^ssec", regTrig = true, desc = "Markdown header" }, { trig = "^ssec", regTrig = true, dscr = "Markdown header" },
fmta("### <><>", { fmta("### <><>", {
d(1, get_visual), d(1, get_visual),
i(0), i(0),

View File

@@ -1,5 +1,11 @@
local cmd = vim.cmd
local map = vim.keymap.set local map = vim.keymap.set
cmd([[
source ~/.vim/init/base.vim
source ~/.vim/init/mappings.vim
]])
require("keymaps") require("keymaps")
map({ "n", "v" }, "<leader>p", '<cmd>call VSCodeNotify("workbench.action.quickOpen")<cr>') map({ "n", "v" }, "<leader>p", '<cmd>call VSCodeNotify("workbench.action.quickOpen")<cr>')

View File

@@ -0,0 +1 @@
set -g status-style bg=default

View File

@@ -0,0 +1 @@
set -g status-style bg=blue,fg=black;

View File

@@ -0,0 +1,22 @@
# This file is based on the one provided by shipwright.nvim
set -g @FG '#dddddd'
set -g @BG '#111111'
set -g status-left ' #[fg=#{@FG},bold]#{s/root//:client_key_table} '
set -g status-right '#[fg=#{@FG},bold] [#S]#[fg=#{@FG},bold] [%d/%m] #[fg=#{@FG},bold][%I:%M%p] '
set -g status-style fg='#{@FG}',bg='#{@BG}'
set -g window-status-current-style fg='#{@FG}',bg='#{@BG}',bold
set -g pane-border-style fg='#{@FG}'
set -g pane-active-border-style fg='#{@FG}'
set -g message-style fg='#{@FG}',bg='#{@FG}'
set -g display-panes-active-colour '#{@FG}'
set -g display-panes-colour '#{@FG}'
set -g clock-mode-colour '#{@FG}'
set -g mode-style fg='#{@FG}',bg='#{@FG}'

View File

@@ -0,0 +1,22 @@
# This file is based on the one provided by shipwright.nvim
set -g @FG '#111111'
set -g @BG '#dddddd'
set -g status-left ' #[fg=#{@FG},bold]#{s/root//:client_key_table} '
set -g status-right '#[fg=#{@FG},bold] [#S]#[fg=#{@FG},bold] [%d/%m] #[fg=#{@FG},bold][%I:%M%p] '
set -g status-style fg='#{@FG}',bg='#{@BG}'
set -g window-status-current-style fg='#{@FG}',bg='#{@BG}',bold
set -g pane-border-style fg='#{@FG}'
set -g pane-active-border-style fg='#{@FG}'
set -g message-style fg='#{@FG}',bg='#{@FG}'
set -g display-panes-active-colour '#{@FG}'
set -g display-panes-colour '#{@FG}'
set -g clock-mode-colour '#{@FG}'
set -g mode-style fg='#{@FG}',bg='#{@FG}'

View File

@@ -68,7 +68,20 @@ set -g status-left '#h '
set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d' set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d'
%endif %endif
set -g default-terminal "tmux-256color" # theming
%if "#{==:#{host},desktop-arch}"
set -g default-terminal "tmux-256color"
setw -g window-status-style fg=colour244,bg=default
setw -g window-status-current-style fg=colour232,bg=default,bold
set -g message-style fg=colour232,bg=default
setw -g clock-mode-colour colour235
set -g status-style bg=default
set -g pane-border-style fg=#cccccc
set -g pane-active-border-style fg=#555555
set -g message-style bg=#cccccc,fg=#000000
%endif
set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"'
# Vi copypaste mode # Vi copypaste mode
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel' if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'

View File

@@ -0,0 +1 @@
set -g status-style bg=default

View File

@@ -93,6 +93,3 @@
[includeIf "gitdir:~/work/"] [includeIf "gitdir:~/work/"]
path = ~/.gitconfig.work path = ~/.gitconfig.work
[includeIf "gitdir:~/nix-dev-shells/"]
path = ~/.gitconfig.work

3
dots/.gitignore vendored
View File

@@ -84,9 +84,6 @@ dkms.conf
# Dotenv # Dotenv
.env .env
.envrc
.direnv/
.pre-commit-config.yaml
# Prevent module files from being ignored (e.g. NestJS) # Prevent module files from being ignored (e.g. NestJS)
!*.module* !*.module*

44
dots/.resticexclude Normal file
View File

@@ -0,0 +1,44 @@
# Restic ignore
# General
.trash
Trash
.cache
cache
Cache
CachedData
CachedExtension
CacheStorage
__pycache__
GPUCache
ShaderCache
build
.git
node_modules
venv
env
# Specifics
$HOME/.android
$HOME/.atom
$HOME/.build
$HOME/.cabal
$HOME/.cargo
$HOME/.conda
$HOME/.config/BraveSoftware/Brave-Browser/Default/Local Storage
$HOME/.config/BraveSoftware/Brave-Browser/Default/Local Extension Settings
$HOME/.config/nvm/versions
$HOME/.config/devcert
$HOME/.espressif
$HOME/.local/share/torbrowser
$HOME/.mozilla
$HOME/.nvm
$HOME/.npm
$HOME/.nuget
$HOME/.yarn
$HOME/.config/yarn
$HOME/doc/disk-images
$HOME/.stremio-server
$HOME/Games
!$HOME/Games/*/drive_c/users/h/AppData
!$HOME/Games/rhino

3
dots/.resticinclude Normal file
View File

@@ -0,0 +1,3 @@
/etc
/boot
/home

403
flake.lock generated
View File

@@ -1,73 +1,5 @@
{ {
"nodes": { "nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1755819240,
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1765809053,
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1776754714,
"narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"colmena": { "colmena": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -121,11 +53,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1778040175, "lastModified": 1769400223,
"narHash": "sha256-SSXJp3BMjO2LrW/VLjNdGGcjd3RFEyV4FemYA6OGrYw=", "narHash": "sha256-YJRz6mriRWr5wGftEwm8KFRKtu6ZgsX21NYeXVKGd9M=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "3bd76b0f41e65661866bddcac57ebe83aeadb581", "rev": "25dae404070232baab384b281dbdc8eb70f37ad0",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -135,22 +67,6 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1776136500,
"narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "0f8ba203d475587f477e7ae12661bd8459e225b7",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -167,22 +83,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -205,27 +105,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
@@ -259,82 +138,6 @@
"type": "github" "type": "github"
} }
}, },
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1776796298,
"narHash": "sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "3cfd774b0a530725a077e17354fbdb87ea1c4aad",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1767737596,
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "github"
},
"original": {
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -342,11 +145,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778009629, "lastModified": 1769450270,
"narHash": "sha256-nUoQtf4Zq7DRYJrfv904hjrxjAlWVP6a1pNNFKx3FCg=", "narHash": "sha256-pdVm/zJazDUAasTyHFX/Pbrlk9Upjxi0yzgn7GjGe4g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "00ed86e58bb6979a7921859fd1615d19382eac5c", "rev": "a10c1e8f5ad2589414407f4851c221cb66270257",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -398,10 +201,10 @@
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1776723456, "lastModified": 1769114809,
"narHash": "sha256-GBbbm05oXYqSZ2EgxQPsNpTKl16wNhvrlUxdmv0FbSU=", "narHash": "sha256-xRZeYJAq/AcEZqsevIn1POBswP4rFYhOsQxaJP6xxpM=",
"ref": "main", "ref": "main",
"rev": "135b681d24af6ee4508bbf7c657982d7be8743d4", "rev": "b14f3b416336bf44343941322745d6144582560e",
"shallow": true, "shallow": true,
"type": "git", "type": "git",
"url": "ssh://git@github.com/hektor/nix-secrets" "url": "ssh://git@github.com/hektor/nix-secrets"
@@ -415,11 +218,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1777273601, "lastModified": 1769085828,
"narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=", "narHash": "sha256-TjhFIAtS628+/r3IuYWPcNa++mUMMDDG8PbSfFHXBiA=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "f69ea013e328841a7def7037ed59788a76be8816", "rev": "43fbf4d12b0a613f1a792503da4bb2bf270173c7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -451,11 +254,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1777917524, "lastModified": 1769302137,
"narHash": "sha256-k+LVe9YaO2BEPB9AaCtTtOMCeGi4dxDo6gt4Un3qoPY=", "narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "df7783100babf59001340a7a874ba3824e441ecb", "rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -467,11 +270,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1777954456, "lastModified": 1769170682,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", "rev": "c5296fdd05cfa2c187990dd909864da9658df755",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -497,31 +300,6 @@
"type": "github" "type": "github"
} }
}, },
"nur": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1777598946,
"narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5d55af01c0f86be583931fe99207fc56c14134b3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvim": { "nvim": {
"inputs": { "inputs": {
"mcp-hub": "mcp-hub", "mcp-hub": "mcp-hub",
@@ -531,6 +309,7 @@
], ],
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
"plugins-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
"plugins-nvimkit-nvim": "plugins-nvimkit-nvim", "plugins-nvimkit-nvim": "plugins-nvimkit-nvim",
"plugins-shipwright-nvim": "plugins-shipwright-nvim", "plugins-shipwright-nvim": "plugins-shipwright-nvim",
@@ -565,11 +344,11 @@
"plugins-helm-ls-nvim": { "plugins-helm-ls-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1773934114, "lastModified": 1768584652,
"narHash": "sha256-8trqFsA7nTKSdtkiAL0Sa9bXjh5ONtAqN7XNE/B8ukM=", "narHash": "sha256-jnMc87OjURNcqsva0npYgVyUrWc5C6L7yHpNvt9eSmg=",
"owner": "qvalentin", "owner": "qvalentin",
"repo": "helm-ls.nvim", "repo": "helm-ls.nvim",
"rev": "20df43509b02a3ce3c6b3eee254d6e2bffa9a370", "rev": "f0b9a1723890971a6d84890b50dbf5f40974ea1b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -578,6 +357,22 @@
"type": "github" "type": "github"
} }
}, },
"plugins-m-taskwarrior-d-nvim": {
"flake": false,
"locked": {
"lastModified": 1767960157,
"narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github"
},
"original": {
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"type": "github"
}
},
"plugins-mcphub-nvim": { "plugins-mcphub-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -647,15 +442,13 @@
"colmena": "colmena", "colmena": "colmena",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-secrets": "nix-secrets", "nix-secrets": "nix-secrets",
"nixgl": "nixgl", "nixgl": "nixgl",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nvim": "nvim", "nvim": "nvim",
"sops-nix": "sops-nix", "sops-nix": "sops-nix"
"stylix": "stylix"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -665,11 +458,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777944972, "lastModified": 1769314333,
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=", "narHash": "sha256-+Uvq9h2eGsbhacXpuS7irYO7fFlz514nrhPCSTkASlw=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c", "rev": "2eb9eed7ef48908e0f02985919f7eb9d33fa758f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -694,39 +487,6 @@
"type": "github" "type": "github"
} }
}, },
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_2",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1777835090,
"narHash": "sha256-VLH8zPweblCOvpnQXp4fVs7f6Q79YhXF5XFKlOrvIFk=",
"owner": "danth",
"repo": "stylix",
"rev": "7989a1054b01153212dede6005abfd1576b8328c",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -741,85 +501,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1777041405,
"narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "5f868b3a338b6904c47f3833b9c411be641983a8",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1777169200,
"narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1777463218,
"narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "5768d08ed2e7944a26a958868cdb073cb8856dae",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

126
flake.nix
View File

@@ -3,10 +3,6 @@
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable"; url = "github:nixos/nixpkgs/nixos-unstable";
}; };
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = { nixos-hardware = {
url = "github:NixOS/nixos-hardware/master"; url = "github:NixOS/nixos-hardware/master";
}; };
@@ -42,130 +38,62 @@
url = "github:zhaofengli/colmena"; url = "github:zhaofengli/colmena";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ {
self, self,
nixpkgs, nixpkgs,
nixos-hardware,
disko,
sops-nix,
nix-secrets,
home-manager, home-manager,
nixgl, nixgl,
git-hooks, firefox-addons,
... nvim,
colmena,
}@inputs: }@inputs:
let let
inherit (self) outputs; inherit (self) outputs;
inherit (inputs.nixpkgs) lib; lib = inputs.nixpkgs.lib;
myUtils = import ./utils { inherit lib; }; utils = import ./utils { inherit lib; };
hostDirNames = myUtils.dirNames ./hosts; hostDirNames = utils.dirNames ./hosts;
system = "x86_64-linux"; system = "x86_64-linux";
dotsPath = ./dots; pkgs = import nixpkgs {
gitHooks = import ./git-hooks.nix { inherit system;
inherit nixpkgs git-hooks system; overlays = [ nixgl.overlay ];
src = ./.;
}; };
dotsPath = ./dots;
in in
{ {
nixosConfigurations = nix.nixPath = [
(lib.genAttrs hostDirNames ( "nixpkgs=${inputs.nixpkgs}"
host: ]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
nixpkgs.lib.nixosSystem { nixosConfigurations = lib.genAttrs hostDirNames (
modules = [ host:
./hosts/${host} nixpkgs.lib.nixosSystem {
{ modules = [ ./hosts/${host} ];
nixpkgs.hostPlatform = (myUtils.hostMeta ./hosts/${host}).system; specialArgs = {
host.name = host; inherit inputs outputs dotsPath;
}
];
specialArgs = {
inherit
inputs
outputs
dotsPath
myUtils
;
};
}
))
// {
sd-image-orange-pi-aarch64 = nixpkgs.lib.nixosSystem {
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-orange-pi-aarch64.nix
{
nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
}
];
specialArgs = {
inherit
inputs
outputs
dotsPath
myUtils
;
};
}; };
sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem { }
modules = [ );
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-raspberry-pi-aarch64.nix
{
nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
}
];
specialArgs = {
inherit
inputs
outputs
dotsPath
myUtils
;
};
};
};
homeConfigurations = { homeConfigurations = {
work = home-manager.lib.homeManagerConfiguration { work = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { inherit pkgs;
inherit system;
overlays = [ nixgl.overlay ];
};
modules = [ ./home/hosts/work ]; modules = [ ./home/hosts/work ];
extraSpecialArgs = { extraSpecialArgs = {
inherit inherit inputs outputs dotsPath;
inputs
outputs
dotsPath
myUtils
;
}; };
}; };
}; };
apps.${system}.colmena = inputs.colmena.apps.${system}.default;
colmenaHive = import ./deploy/colmena.nix { colmenaHive = import ./deploy/colmena.nix {
inherit inherit
self self
inputs inputs
; ;
}; };
checks.${system} = gitHooks.checks;
formatter.${system} = gitHooks.formatter;
devShells.${system} = gitHooks.devShells;
legacyPackages.${system} = {
sd-image-orange-pi-aarch64 =
self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage;
sd-image-raspberry-pi-aarch64 =
self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage;
};
}; };
} }

View File

@@ -1,47 +0,0 @@
{
nixpkgs,
git-hooks,
system,
src,
}:
let
pkgs = nixpkgs.legacyPackages.${system};
pre-commit-check = git-hooks.lib.${system}.run {
inherit src;
hooks = {
nixfmt = {
enable = true;
package = pkgs.nixfmt;
};
statix.enable = true;
deadnix.enable = true;
};
};
in
{
checks = {
inherit pre-commit-check;
};
formatter =
let
inherit (pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script;
devShells = {
default =
let
inherit (pre-commit-check) shellHook enabledPackages;
in
pkgs.mkShell {
inherit shellHook;
buildInputs = enabledPackages;
};
};
}

View File

@@ -1,64 +1,45 @@
{ {
lib, lib,
inputs,
config, config,
pkgs, pkgs,
... ...
}: }:
let
username = "h";
in
{ {
imports = [ imports = [
../../modules
../../modules/3d
../../modules/ai-tools
../../modules/anki
../../modules/audio
../../modules/browser
../../modules/cloud
../../modules/comms
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/devenv
../../modules/direnv ../../modules/3d
../../modules/git ../../modules/git.nix
../../modules/k8s/k9s.nix # ../../modules/hetzner.nix
../../modules/keepassxc ../../modules/k9s.nix
../../modules/music ../../modules/kitty.nix
../../modules/nvim ../../modules/ssh.nix
../../modules/pandoc ../../modules/taskwarrior.nix
../../modules/keepassxc.nix
../../modules/anki.nix
../../modules/photography ../../modules/photography
../../modules/secrets ../../modules/browser
../../modules/shell ../../modules/shell
../../modules/ssh
../../modules/taskwarrior
../../modules/terminal
../../modules/zk
../../modules/torrenting
]; ];
home = { home.stateVersion = "25.05";
stateVersion = "25.05"; home.username = username;
inherit (config.host) username; home.homeDirectory = "/home/${username}";
homeDirectory = "/home/${config.host.username}";
};
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
modules."3d" = {
printing.enable = true;
modeling.enable = true;
};
ai-tools = {
claude-code.enable = true;
opencode.enable = true;
};
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true;
comms.signal.enable = true; shell.bash = {
git.github.enable = true; enable = true;
shell.bash.aliases.lang-js = true; aliases.lang-js = true;
shell.bash.addBinToPath = true; };
torrenting.enable = true;
zk.enable = true;
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View File

@@ -1,58 +1,41 @@
{ {
inputs,
config, config,
pkgs, pkgs,
... ...
}: }:
let
username = "h";
in
{ {
imports = [ imports = [
../../modules ../../modules/anki.nix
../../modules/3d
../../modules/ai-tools
../../modules/anki
../../modules/audio
../../modules/browser
../../modules/cloud
../../modules/comms
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/devenv ../../modules/git.nix
../../modules/direnv # ../../modules/hetzner.nix
../../modules/git ../../modules/k9s.nix
../../modules/k8s/k9s.nix ../../modules/kitty.nix
../../modules/keepassxc ../../modules/ssh.nix
../../modules/music ../../modules/taskwarrior.nix
../../modules/nfc ../../modules/keepassxc.nix
../../modules/nvim ../../modules/browser
../../modules/pandoc
../../modules/secrets
../../modules/shell ../../modules/shell
../../modules/ssh
../../modules/taskwarrior
../../modules/terminal
]; ];
home = { home.stateVersion = "25.05";
stateVersion = "25.05"; home.username = username;
inherit (config.host) username; home.homeDirectory = "/home/${username}";
homeDirectory = "/home/${config.host.username}";
};
xdg.userDirs = { xdg.userDirs.createDirectories = false;
enable = false; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
createDirectories = false;
};
modules."3d".printing.enable = true;
ai-tools = {
claude-code.enable = true;
opencode.enable = true;
};
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true;
comms.signal.enable = true; shell.bash = {
git.github.enable = true; enable = true;
shell.bash.aliases.lang-js = true; aliases.lang-js = true;
shell.bash.addBinToPath = true; };
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View File

@@ -2,21 +2,34 @@
with pkgs; with pkgs;
[ [
bash-completion
bat bat
entr entr
feh feh
fzf fzf
gh
git
haskellPackages.pandoc-crossref
htop htop
jq jq
nixfmt-rfc-style
nmap nmap
nodejs_24
opencode
nvimpager nvimpager
pandoc
parallel parallel
pass pass
pnpm
python3
ripgrep ripgrep
signal-desktop
silver-searcher silver-searcher
sops sops
sshfs
tldr tldr
tree tree
unzip unzip
vimPlugins.vim-plug
wget wget
] ]

View File

@@ -5,97 +5,69 @@
... ...
}: }:
let
username = "hektor";
in
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
../../modules ../../modules/dconf.nix
../../modules/ai-tools ../../modules/git.nix
../../modules/anki ../../modules/k9s.nix
../../modules/keepassxc.nix
../../modules/kitty.nix
../../modules/nvim.nix
../../modules/browser ../../modules/browser
../../modules/bruno
../../modules/cloud
../../modules/comms
../../modules/database
../../modules/dconf
../../modules/desktop/niri
../../modules/devenv
../../modules/direnv
../../modules/docker
../../modules/git
../../modules/go
../../modules/infra
../../modules/k8s
../../modules/k8s/k9s.nix
../../modules/keepassxc
../../modules/music
../../modules/nodejs
../../modules/nvim
../../modules/pandoc
../../modules/secrets
../../modules/shell ../../modules/shell
../../modules/stylix ../../modules/taskwarrior.nix
../../modules/taskwarrior
../../modules/ticketing
../../modules/terminal
../../modules/vscode
]; ];
sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; sops = {
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
defaultSopsFile = "${inputs.nix-secrets}/secrets.yaml";
nixpkgs.config.allowUnfree = true; secrets = {
taskwarrior_sync_server_url = { };
taskwarrior_sync_server_client_id = { };
taskwarrior_sync_encryption_secret = { };
anki_sync_user = { };
anki_sync_key = { };
};
xdg = { templates."taskrc.d/sync" = {
systemDirs.config = [ "/etc/xdg" ]; content = ''
userDirs = { sync.server.url=${config.sops.placeholder.taskwarrior_sync_server_url}
createDirectories = false; sync.server.client_id=${config.sops.placeholder.taskwarrior_sync_server_client_id}
download = "${config.home.homeDirectory}/dl"; sync.encryption_secret=${config.sops.placeholder.taskwarrior_sync_encryption_secret}
'';
}; };
}; };
home = { nixpkgs.config.allowUnfree = true;
stateVersion = "25.05";
username = "hektor"; home.stateVersion = "25.05";
homeDirectory = "/home/${config.home.username}"; home.username = username;
}; home.homeDirectory = "/home/${username}";
targets.genericLinux.nixGL = { targets.genericLinux.nixGL = {
inherit (inputs.nixgl) packages; packages = inputs.nixgl.packages;
defaultWrapper = "mesa"; defaultWrapper = "mesa";
}; };
browser.primary = "firefox"; browser.primary = "firefox";
browser.secondary = "chromium"; browser.secondary = "chromium";
cloud.azure.enable = true;
comms.signal.enable = true; shell.bash.enable = true;
comms.teams.enable = true; starship.enable = true;
ai-tools = {
claude-code.enable = true;
tirith.enable = true;
opencode.enable = true;
};
database = {
mssql.enable = true;
postgresql.enable = true;
redis.enable = true;
};
git.github.enable = true;
git.gitlab.enable = true;
secrets.vault.enable = true;
programs = { programs = {
gh.enable = true; gh.enable = true;
kubecolor.enable = true; kubecolor.enable = true;
}; };
home.packages = home.packages = import ./packages.nix {
import ./packages.nix { inherit inputs;
inherit inputs; inherit config;
inherit config; inherit pkgs;
inherit pkgs; };
}
++ import ../packages.nix {
inherit inputs;
inherit config;
inherit pkgs;
};
} }

View File

@@ -13,4 +13,4 @@ let
[ ]; [ ];
in in
localPackages [ ] ++ localPackages

View File

@@ -1,32 +1,11 @@
{ { pkgs, ... }:
config,
lib,
pkgs,
...
}:
let
cfg = config.modules."3d";
in
{ {
options.modules."3d" = { home.packages = with pkgs; [
printing.enable = lib.mkEnableOption "3D printing tools"; bambu-studio
modeling.enable = lib.mkEnableOption "3D modeling tools"; blender
}; openscad-lsp
openscad-unstable
config = lib.mkMerge [ orca-slicer
(lib.mkIf cfg.printing.enable {
home.packages = with pkgs; [
bambu-studio
orca-slicer
];
})
(lib.mkIf cfg.modeling.enable {
home.packages = with pkgs; [
blender
openscad-lsp
openscad-unstable
];
})
]; ];
} }

View File

@@ -1,60 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.claude-code;
rtk-version = "0.18.1";
in
{
options.ai-tools.claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
config = lib.mkIf cfg.enable {
programs.claude-code.enable = true;
home.packages = with pkgs; [
(stdenv.mkDerivation {
name = "ccline";
src = fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
(stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = "tar xzf $src";
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
mcp-nixos
];
};
}

View File

@@ -1,8 +0,0 @@
{
imports = [
./claude-code.nix
./opencode.nix
./skills.nix
./tirith.nix
];
}

View File

@@ -1,40 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.opencode;
in
{
options.ai-tools.opencode = {
enable = lib.mkEnableOption "opencode";
};
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.opencode ];
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
permission = {
external_directory = {
"/run/secrets/" = "deny";
"~/.config/sops/age/keys.txt" = "deny";
"~/.ssh/id_rsa" = "deny";
"~/.ssh/id_ed25519" = "deny";
"~/.ssh/id_ecdsa" = "deny";
"~/.ssh/id_dsa" = "deny";
"/etc/ssh/ssh_host_rsa_key" = "deny";
"/etc/ssh/ssh_host_ed25519_key" = "deny";
"/etc/ssh/ssh_host_ecdsa_key" = "deny";
"/etc/ssh/ssh_host_dsa_key" = "deny";
};
command = {
sops = "deny";
};
};
plugin = [ "@mohak34/opencode-notifier@latest" ];
};
};
}

View File

@@ -1,49 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.claude-code;
skillType = lib.types.submodule {
options = {
owner = lib.mkOption { type = lib.types.str; };
repo = lib.mkOption { type = lib.types.str; };
rev = lib.mkOption { type = lib.types.str; };
hash = lib.mkOption { type = lib.types.str; };
skill = lib.mkOption { type = lib.types.str; };
};
};
fetchSkill =
skill:
let
src = pkgs.fetchFromGitHub {
inherit (skill)
owner
repo
rev
hash
;
};
in
{
name = ".claude/skills/${skill.skill}";
value = {
source = "${src}/${skill.skill}";
recursive = true;
};
};
in
{
options.ai-tools.claude-code.skills = lib.mkOption {
type = lib.types.listOf skillType;
default = [ ];
};
config = lib.mkIf cfg.enable {
home.file = builtins.listToAttrs (map fetchSkill cfg.skills);
};
}

View File

@@ -1,190 +0,0 @@
#!/usr/bin/env python3
"""Claude Code PreToolUse hook — runs tirith check on Bash tool calls.
Reads JSON from stdin (Claude Code hook protocol), extracts the command,
and delegates to `tirith check --json` for security analysis.
Exit codes:
0 — hook completed successfully (decision in stdout JSON)
Non-zero — hook error (fail-closed by default; set TIRITH_FAIL_OPEN=1 for fail-open)
Output (stdout, only for deny):
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "..."
}
}
Environment:
TIRITH_BIN — path to tirith binary (default: "tirith")
TIRITH_HOOK_WARN_ACTION — "deny" (default) or "allow"
"""
import json
import os
import shutil
import subprocess
import sys
def get(data, *keys):
"""Return the first matching key from data (supports dual-case fields)."""
for k in keys:
if k in data:
return data[k]
return None
def deny(reason):
"""Print a deny decision using hookSpecificOutput and exit 0."""
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": reason,
}
}
)
)
sys.exit(0)
def fail_action():
"""Return the fail action: deny (default, fail-closed) or allow (fail-open via env)."""
return "allow" if os.environ.get("TIRITH_FAIL_OPEN") == "1" else "deny"
def fail_closed(reason):
"""Deny or allow based on TIRITH_FAIL_OPEN, for error/missing-binary paths."""
action = fail_action()
if action == "deny":
deny(reason)
else:
sys.exit(0)
def main():
try:
raw = sys.stdin.read()
if not raw.strip():
# Empty input — cannot determine command, fail-closed
fail_closed("tirith: empty hook input — blocked for safety")
return
data = json.loads(raw)
except (json.JSONDecodeError, OSError):
fail_closed("tirith: failed to parse hook input — blocked for safety")
return
if not isinstance(data, dict):
fail_closed("tirith: invalid hook input format — blocked for safety")
return
# Dual-case field extraction (camelCase and snake_case)
event = get(data, "hook_event_name", "hookEventName")
tool = get(data, "tool_name", "toolName")
tool_input = get(data, "tool_input", "toolInput") or {}
# Only intercept PreToolUse + Bash
if event != "PreToolUse" or tool != "Bash":
sys.exit(0)
if not isinstance(tool_input, dict):
fail_closed("tirith: invalid tool_input format — blocked for safety")
return
command = tool_input.get("command")
if not isinstance(command, str) or not command.strip():
fail_closed("tirith: no command found in hook input — blocked for safety")
return
# Locate tirith binary
tirith_bin = os.environ.get("TIRITH_BIN") or shutil.which("tirith") or "tirith"
try:
result = subprocess.run(
[
tirith_bin,
"check",
"--json",
"--non-interactive",
"--shell",
"posix",
"--",
command,
],
capture_output=True,
text=True,
timeout=10,
)
except FileNotFoundError:
fail_closed(f"tirith: {tirith_bin} not found — install tirith or set TIRITH_FAIL_OPEN=1")
return
except subprocess.TimeoutExpired:
fail_closed("tirith: check timed out — blocked for safety")
return
except OSError as e:
fail_closed(f"tirith: OS error running check — {e}")
return
# Unexpected exit code — fail-closed
if result.returncode not in (0, 1, 2):
fail_closed(f"tirith: unexpected exit code {result.returncode} — blocked for safety")
return
if result.returncode != 0 and not result.stdout.strip():
fail_closed("tirith: check returned non-zero with no output — blocked for safety")
return
# Exit 0 = clean, allow
if result.returncode == 0:
sys.exit(0)
# Exit 2 = warn — check TIRITH_HOOK_WARN_ACTION
if result.returncode == 2:
warn_action = os.environ.get("TIRITH_HOOK_WARN_ACTION", "deny").lower()
if warn_action == "allow":
sys.exit(0)
# Exit 1 = block, Exit 2 + deny = block
# Build reason from tirith JSON output
reason = "Tirith security check failed"
if result.stdout.strip():
try:
verdict = json.loads(result.stdout)
findings = verdict.get("findings", [])
if findings:
parts = []
for f in findings:
title = f.get("title", f.get("rule_id", "unknown"))
severity = f.get("severity", "")
parts.append(f"[{severity}] {title}" if severity else title)
reason = "Tirith: " + "; ".join(parts)
except json.JSONDecodeError:
reason = result.stdout.strip()[:500]
deny(reason)
if __name__ == "__main__":
try:
main()
except Exception:
# Fail-closed on unexpected errors (respects TIRITH_FAIL_OPEN)
if os.environ.get("TIRITH_FAIL_OPEN") == "1":
sys.exit(0)
# Deny — print structured output so Claude Code shows a message
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "tirith: unexpected hook error — blocked for safety",
}
}
)
)
sys.exit(0)

View File

@@ -1,30 +0,0 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.ai-tools.tirith;
in
{
options.ai-tools.tirith = {
enable = lib.mkEnableOption "tirith shell security guard";
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.packages = [ pkgs.tirith ];
})
(lib.mkIf (cfg.enable && config.ai-tools.claude-code.enable) {
home.file.".claude/hooks/tirith-check.py" = {
source = ./tirith-check.py;
executable = true;
};
home.activation.tirith-claude-code = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
${pkgs.tirith}/bin/tirith setup claude-code --with-mcp --scope user --force 2>/dev/null || true
'';
})
];
}

33
home/modules/anki.nix Normal file
View File

@@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
osConfig ? null,
...
}:
let
hmSopsAvailable = config ? sops && config.sops ? secrets;
osSopsAvailable = osConfig != null && osConfig ? sops && osConfig.sops ? secrets;
sopsAvailable = hmSopsAvailable || osSopsAvailable;
sopsSecrets = if hmSopsAvailable then config.sops.secrets else osConfig.sops.secrets;
in
{
warnings = lib.optional (
!sopsAvailable && config.programs.anki.enable
) "anki is enabled but sops secrets are not available. anki sync will not be configured.";
programs.anki = {
enable = true;
addons = with pkgs.ankiAddons; [
anki-connect
puppy-reinforcement
review-heatmap
];
sync = lib.mkIf sopsAvailable {
usernameFile = "${sopsSecrets."anki_sync_user".path}";
keyFile = "${sopsSecrets."anki_sync_key".path}";
};
};
}

View File

@@ -1,41 +0,0 @@
{
config,
lib,
pkgs,
myUtils,
osConfig ? null,
inputs ? null,
...
}:
let
sops = myUtils.sopsAvailability config osConfig;
standalone = osConfig == null;
in
lib.optionalAttrs standalone {
sops.secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
anki = [
"sync-user"
"sync-key"
];
};
}
// {
warnings = lib.optional (
!sops.available && config.programs.anki.enable
) "anki is enabled but sops secrets are not available. anki sync will not be configured.";
programs.anki = {
enable = true;
package = config.nixgl.wrap pkgs.anki;
addons = with pkgs.ankiAddons; [
anki-connect
puppy-reinforcement
review-heatmap
];
profiles."User 1".sync = lib.mkIf sops.available {
usernameFile = "${sops.secrets."anki/sync-user".path}";
keyFile = "${sops.secrets."anki/sync-key".path}";
};
};
}

View File

@@ -1,7 +0,0 @@
{ osConfig, pkgs, ... }:
{
home.packages = with pkgs; [ pulsemixer ];
services.mpris-proxy.enable = osConfig.hardware.bluetooth.enable or false;
}

View File

@@ -1,4 +1,4 @@
{ config, lib, ... }: { lib, ... }:
{ {
options.browser = { options.browser = {
@@ -23,8 +23,6 @@
}; };
}; };
config.home.sessionVariables.BROWSER = config.browser.primary;
imports = [ imports = [
./firefox.nix ./firefox.nix
./librewolf.nix ./librewolf.nix

View File

@@ -1,22 +1,13 @@
{ { inputs, pkgs }:
config,
inputs,
lib,
pkgs,
...
}:
let let
bookmarks = import ./bookmarks.nix; bookmarks = import ./bookmarks.nix;
in in
{ {
nativeMessagingHosts = nativeMessagingHosts = with pkgs; [
with pkgs; tridactyl-native
[ ];
tridactyl-native
]
++ lib.optionals config.programs.keepassxc.enable [ keepassxc ];
profiles = { profiles = {
default = { default = {
settings = { settings = {
@@ -25,10 +16,8 @@ in
"extensions.autoDisableScopes" = 0; "extensions.autoDisableScopes" = 0;
}; };
extensions = { extensions = {
force = true; packages = with inputs.firefox-addons.packages.${pkgs.system}; [
packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
duckduckgo-privacy-essentials duckduckgo-privacy-essentials
firefox-color
istilldontcareaboutcookies istilldontcareaboutcookies
libredirect libredirect
keepassxc-browser keepassxc-browser

View File

@@ -1,23 +1,10 @@
{ { config, lib, inputs, pkgs, ... }:
config,
lib,
inputs,
pkgs,
...
}:
{ {
config = lib.mkIf (config.browser.primary == "firefox" || config.browser.secondary == "firefox") { config = lib.mkIf (config.browser.primary == "firefox" || config.browser.secondary == "firefox") {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
} }
// (import ./firefox-base.nix { // (import ./firefox-base.nix { inherit inputs pkgs; });
inherit
config
inputs
lib
pkgs
;
});
}; };
} }

View File

@@ -1,10 +1,4 @@
{ { config, lib, inputs, pkgs, ... }:
config,
lib,
inputs,
pkgs,
...
}:
{ {
config = config =
@@ -13,13 +7,6 @@
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;
} }
// (import ./firefox-base.nix { // (import ./firefox-base.nix { inherit inputs pkgs; });
inherit
config
inputs
lib
pkgs
;
});
}; };
} }

View File

@@ -1,7 +0,0 @@
{ config, pkgs, ... }:
{
config = {
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.bruno "--no-sandbox")) ];
};
}

View File

@@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
wl-clipboard
];
}

View File

@@ -1,12 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.cloud.azure.enable {
home.packages = with pkgs; [ azure-cli ];
};
}

View File

@@ -1,17 +0,0 @@
{ lib, ... }:
{
options.cloud = {
azure = {
enable = lib.mkEnableOption "azure CLI";
};
hetzner = {
enable = lib.mkEnableOption "hetzner CLI";
};
};
imports = [
./azure.nix
./hetzner.nix
];
}

View File

@@ -1,17 +0,0 @@
{ lib, ... }:
{
options.comms = {
signal = {
enable = lib.mkEnableOption "signal";
};
teams = {
enable = lib.mkEnableOption "teams";
};
};
imports = [
./signal.nix
./teams.nix
];
}

View File

@@ -1,12 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.comms.signal.enable {
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.signal-desktop "--no-sandbox")) ];
};
}

View File

@@ -1,12 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.comms.teams.enable {
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.teams-for-linux "--no-sandbox")) ];
};
}

View File

@@ -1,26 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
options.database = {
mssql.enable = lib.mkEnableOption "MSSQL";
postgresql.enable = lib.mkEnableOption "PostgreSQL";
redis.enable = lib.mkEnableOption "Redis";
};
config = lib.mkMerge [
(lib.mkIf config.database.mssql.enable {
home.packages = with pkgs; [ (config.nixgl.wrap dbeaver-bin) ];
})
(lib.mkIf config.database.postgresql.enable {
home.packages = with pkgs; [ (config.nixgl.wrap pgadmin4-desktopmode) ];
})
(lib.mkIf config.database.postgresql.enable {
home.packages = with pkgs; [ redis ];
})
];
}

View File

@@ -1,14 +1,21 @@
{ config, pkgs, ... }:
let
terminal = "kitty";
browser = config.browser.primary;
font = "${config.stylix.fonts.monospace.name} ${toString config.stylix.fonts.sizes.applications}";
in
{ {
dconf.settings = { dconf.settings = {
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-schedule-automatic = true;
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
"org/gnome/desktop/applications/terminal" = {
exec = "kitty";
exec-arg = "";
};
"org/gnome/desktop/background" = { "org/gnome/desktop/background" = {
color-shading-type = "solid"; color-shading-type = "solid";
picture-opacity = 100;
picture-options = "zoom"; picture-options = "zoom";
picture-uri = "none"; picture-uri = "none";
picture-uri-dark = "none"; picture-uri-dark = "none";
@@ -17,54 +24,55 @@ in
show-desktop-icons = false; show-desktop-icons = false;
}; };
"org/gnome/desktop/default-applications/office/calendar" = { # "org/gnome/desktop/input-sources" = {
exec = "${browser} https://calendar.proton.me"; # sources = [
needs-term = false; # (mkTuple [
}; # "xkb"
# "us"
"org/gnome/desktop/default-applications/office/tasks" = { # ])
exec = "task"; # ];
needs-term = true; # xkb-options = [ "caps:none" ];
}; # };
"org/gnome/desktop/default-applications/terminal" = {
exec = terminal;
exec-arg = "";
};
"org/gnome/desktop/input-sources" = {
xkb-options = [ "caps:none" ];
};
"org/gnome/desktop/interface" = {
clock-format = "24h";
clock-show-weekday = true;
color-scheme = "prefer-dark";
enable-hot-corners = false;
# font-name = font;
locate-pointer = true;
monospace-font-name = font;
};
"org/gnome/desktop/wm/keybindings" = { "org/gnome/desktop/wm/keybindings" = {
close = [ "<Shift><Super>Delete" ]; close = [ "<Shift><Super>Delete" ];
minimize = [ "<Super>h" ]; cycle-group = [ ];
move-to-monitor-down = [ "<Super><Shift>Down" ]; cycle-group-backward = [ ];
move-to-monitor-left = [ "<Super><Shift>Left" ]; cycle-panels = [ ];
move-to-monitor-right = [ "<Super><Shift>Right" ]; cycle-panels-backward = [ ];
move-to-monitor-up = [ "<Super><Shift>Up" ]; cycle-windows = [ ];
cycle-windows-backward = [ ];
maximize = [ "<Super> " ];
minimize = [ ];
move-to-workspace-1 = [ "<Super><Shift>a" ]; move-to-workspace-1 = [ "<Super><Shift>a" ];
move-to-workspace-2 = [ "<Super><Shift>s" ]; move-to-workspace-2 = [ "<Super><Shift>s" ];
move-to-workspace-3 = [ "<Super><Shift>d" ]; move-to-workspace-3 = [ "<Super><Shift>d" ];
move-to-workspace-4 = [ "<Super><Shift>f" ]; move-to-workspace-4 = [ "<Super><Shift>f" ];
move-to-workspace-5 = [ "<Super><Shift>g" ]; move-to-workspace-5 = [ "<Super><Shift>g" ];
move-to-workspace-last = [ ];
move-to-workspace-left = [ "<Super><Shift>h" ];
move-to-workspace-right = [ "<Super><Shift>l" ];
panel-run-dialog = [ ];
switch-applications = [ "<Super>j" ]; switch-applications = [ "<Super>j" ];
switch-applications-backward = [ "<Super>k" ]; switch-applications-backward = [ "<Super>k" ];
switch-group = [ ];
switch-group-backward = [ ];
switch-input-source = [ ];
switch-input-source-backward = [ ];
switch-panels = [ ];
switch-panels-backward = [ ];
switch-to-workspace-1 = [ "<Super>a" ]; switch-to-workspace-1 = [ "<Super>a" ];
switch-to-workspace-2 = [ "<Super>s" ]; switch-to-workspace-2 = [ "<Super>s" ];
switch-to-workspace-3 = [ "<Super>d" ]; switch-to-workspace-3 = [ "<Super>d" ];
switch-to-workspace-4 = [ "<Super>f" ]; switch-to-workspace-4 = [ "<Super>f" ];
switch-to-workspace-5 = [ "<Super>g" ]; switch-to-workspace-5 = [ "<Super>g" ];
switch-to-workspace-last = [ ];
switch-to-workspace-left = [ "<Super>h" ];
switch-to-workspace-right = [ "<Super>l" ];
switch-windows = [ ];
switch-windows-backward = [ ];
toggle-maximized = [ "<Super>space" ];
unmaximize = [ ];
}; };
"org/gnome/desktop/wm/preferences" = { "org/gnome/desktop/wm/preferences" = {
@@ -78,19 +86,8 @@ in
]; ];
}; };
"org/gnome/mutter" = {
center-new-windows = true;
dynamic-workspaces = false;
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-schedule-automatic = true;
};
"org/gnome/settings-daemon/plugins/media-keys" = { "org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [ custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
]; ];
}; };
@@ -103,23 +100,14 @@ in
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>Return"; binding = "<Super>Return";
command = terminal; command = "kitty";
name = "Kitty"; name = "Kitty";
}; };
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "suspend";
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = true;
};
"org/gnome/shell/keybindings" = { "org/gnome/shell/keybindings" = {
screenshot = [ "Print" ];
toggle-application-view = [ "<Super>p" ]; toggle-application-view = [ "<Super>p" ];
toggle-quick-settings = [ ]; toggle-quick-settings = [ ];
}; };
}; };
home.packages = with pkgs; [ dconf2nix ];
} }

View File

@@ -1,37 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
options = {
host.username = lib.mkOption {
type = lib.types.str;
default = config.home.username;
};
nixgl.wrap = lib.mkOption {
type = lib.types.functionTo lib.types.package;
default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id;
readOnly = true;
};
wrapApp = lib.mkOption {
type = lib.types.raw;
default =
pkg: flags:
if config.lib ? nixGL then
pkg.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/${pkg.meta.mainProgram} --add-flags "${flags}"
'';
})
else
pkg;
readOnly = true;
};
};
}

View File

@@ -48,7 +48,8 @@ layout {
} }
} }
spawn-at-startup "wlsunset -l 51.05 -L 3.72"
spawn-at-startup "waybar"
hotkey-overlay { hotkey-overlay {
skip-at-startup skip-at-startup

View File

@@ -2,7 +2,6 @@
{ {
imports = [ imports = [
../../clipboard
../../fuzzel ../../fuzzel
../../mako ../../mako
../../shikane ../../shikane
@@ -12,7 +11,7 @@
home = { home = {
file.".config/niri/config.kdl".source = ./config.kdl; file.".config/niri/config.kdl".source = ./config.kdl;
packages = with pkgs; [ packages = with pkgs; [
brightnessctl wl-clipboard
wlsunset wlsunset
]; ];
}; };

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = [ pkgs.devenv ];
}

View File

@@ -1,7 +0,0 @@
{
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
}

View File

@@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
dive
];
}

View File

@@ -3,9 +3,22 @@
enable = true; enable = true;
settings = { settings = {
main = { main = {
font = "Iosevka Term SS08";
horizontal-pad = 0; horizontal-pad = 0;
vertical-pad = 0; vertical-pad = 0;
}; };
colors = {
background = "ccccccff";
text = "111111ff";
prompt = "ccccccff";
placeholder = "aaaaaaff";
input = "111111ff";
selection = "eeeeeeff";
selection-text = "111111ff";
selection-match = "333333ff";
counter = "111111ff";
border = "111111ff";
};
border = { border = {
width = 2; width = 2;
radius = 0; radius = 0;

10
home/modules/git.nix Normal file
View File

@@ -0,0 +1,10 @@
{ dotsPath, ... }:
{
programs.git.enable = true;
home.file = {
".gitconfig".source = dotsPath + "/.gitconfig";
".gitconfig.work".source = dotsPath + "/.gitconfig.work";
".gitignore".source = dotsPath + "/.gitignore";
};
}

View File

@@ -1,26 +0,0 @@
{
config,
lib,
pkgs,
dotsPath,
...
}:
{
options.git = {
github.enable = lib.mkEnableOption "Github CLI";
gitlab.enable = lib.mkEnableOption "Gitlab CLI";
};
config = {
programs.git.enable = true;
home.file = {
".gitconfig".source = dotsPath + "/.gitconfig";
".gitconfig.work".source = dotsPath + "/.gitconfig.work";
".gitignore".source = dotsPath + "/.gitignore";
};
programs.gh.enable = config.git.github.enable;
home.packages = lib.optionals config.git.gitlab.enable [ pkgs.glab ];
};
}

View File

@@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
go
gopls
];
}

View File

@@ -1,7 +1,5 @@
{ {
config,
lib, lib,
pkgs,
osConfig ? null, osConfig ? null,
... ...
}: }:
@@ -10,11 +8,9 @@ let
isNixOS = osConfig != null; isNixOS = osConfig != null;
in in
{ {
config = lib.mkIf config.cloud.hetzner.enable { config = {
warnings = warnings =
lib.optional (!isNixOS) lib.optional (!isNixOS)
"hcloud module requires NixOS host configuration. This module will not work with standalone home-manager."; "hcloud module requires NixOS host configuration. This module will not work with standalone home-manager.";
home.packages = with pkgs; [ hcloud ];
}; };
} }

Some files were not shown because too many files have changed in this diff Show More