diff --git a/.editorconfig b/.editorconfig index 6422feb..876ec2a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,10 +4,13 @@ root = true [*] charset = utf-8 end_of_line = lf -insert_final_newline = true -indent_size = 2 +indent_size = 4 indent_style = space +insert_final_newline = true trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4c1b4c9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf +CHANGELOG.md export-ignore diff --git a/.github/.github/dependabot.yaml b/.github/.github/dependabot.yaml new file mode 100644 index 0000000..7a580d4 --- /dev/null +++ b/.github/.github/dependabot.yaml @@ -0,0 +1,14 @@ +version: 2 + +updates: + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: daily + time: '06:00' + assignees: + - 99linesofcode + commit-message: + prefix: fix + prefix-development: chore + include: scope diff --git a/.github/.github/workflows/automatic-submodule-updates.yaml b/.github/.github/workflows/automatic-submodule-updates.yaml new file mode 100644 index 0000000..cadbdc3 --- /dev/null +++ b/.github/.github/workflows/automatic-submodule-updates.yaml @@ -0,0 +1,7 @@ +name: Automatic submodule updates + +on: pull_request + +jobs: + update: + uses: 99linesofcode/.github/.github/workflows/automatic-submodule-updates.yaml@main diff --git a/.github/.github/workflows/changelog.yaml b/.github/.github/workflows/changelog.yaml new file mode 100644 index 0000000..7d22116 --- /dev/null +++ b/.github/.github/workflows/changelog.yaml @@ -0,0 +1,10 @@ +name: Generate Changelog and Release + +on: + push: + branches: + - main + +jobs: + deploy: + uses: 99linesofcode/.github/.github/workflows/changelog.yaml@main diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..7a580d4 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,14 @@ +version: 2 + +updates: + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: daily + time: '06:00' + assignees: + - 99linesofcode + commit-message: + prefix: fix + prefix-development: chore + include: scope diff --git a/.github/workflows/automatic-updates.yaml b/.github/workflows/automatic-updates.yaml new file mode 100644 index 0000000..6001aff --- /dev/null +++ b/.github/workflows/automatic-updates.yaml @@ -0,0 +1,7 @@ +name: automatic updates + +on: pull_request + +jobs: + automatic-updates: + uses: 99linesofcode/.github/.github/workflows/automatic-updates.yaml@main diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 14df506..fe83930 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -1,8 +1,5 @@ name: changelog -permissions: - contents: write - on: push: branches: diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..baec21e --- /dev/null +++ b/.ignore @@ -0,0 +1,5 @@ +.git/ + +CHANGELOG.md + +flake.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..90efb55 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "all", + "plugins": [], + "overrides": [] +} diff --git a/.sops.yaml b/.sops.yaml index ee06b0a..897056c 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,5 +1,5 @@ keys: - - &master age1fczq47wpa2wpm9ejy85qw3axw2c9v0f4qrywv5amnuqsjc87ws6qx75pfr + - &master age1hunzh8g6qs0yztln5q4akxvepd667xky4lkff4jga57kzah69ujqvpd7kt - &host_mars age1epkfxmjk0tlne8rmxqq77u06q3lnf5xfjcrwq42nuasswefndyfscw84cy - &user_shorty age1hy523tlslqas8qgs0lxgxanp9gx06fjekn608w4qf66mxkjzmucqh0g6vg creation_rules: diff --git a/dotfiles/hypr/scripts/display-toggle.sh b/dotfiles/hypr/scripts/display-toggle.sh deleted file mode 100755 index 5787844..0000000 --- a/dotfiles/hypr/scripts/display-toggle.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh - -MONITOR_STATE=$(hyprctl monitors all | awk '/Monitor/ { print $2 }') - -set -- $MONITOR_STATE - -if [ "$#" -eq '1' ]; then - echo "Only one monitor connected. Exiting early" - exit -fi - -STATE=$(awk -F '=' '/DISPLAY_STATE=/ {print $2}' ~/.config/hypr/state.conf) -FILEPATH="$HOME/.config/hypr/state.conf" - -case "$STATE" in -Primary) - sed -i 's/DISPLAY_STATE=Primary/DISPLAY_STATE=Secondary/' "$FILEPATH" - hyprctl keyword monitor "$1,highres,0x0,2" - hyprctl keyword monitor "$2,disable" - notify-send -i video-display "Primary screen only" - ;; -Secondary) - sed -i 's/DISPLAY_STATE=Secondary/DISPLAY_STATE=Extend/' "$FILEPATH" - hyprctl keyword monitor "$2,preferred,auto,auto" - hyprctl keyword monitor "$1,disable" - notify-send -i video-display "Secondary screen only" - ;; -Extend) - sed -i 's/DISPLAY_STATE=Extend/DISPLAY_STATE=Primary/' "$FILEPATH" - hyprctl keyword monitor "$1,highres,0x0,2" - notify-send -i video-display "Extend screens" - ;; -esac diff --git a/flake.lock b/flake.lock index cc70b52..69eaeee 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1760703920, - "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", + "lastModified": 1776754714, + "narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "d646af9b7d14bff08824538164af99d0c521b185", + "rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581", "type": "github" }, "original": { @@ -71,11 +71,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1764873433, - "narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", + "lastModified": 1779670703, + "narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", + "rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9", "type": "github" }, "original": { @@ -92,11 +92,11 @@ ] }, "locked": { - "lastModified": 1765835352, - "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "a34fae9c08a15ad73f295041fec82323541400a9", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "type": "github" }, "original": { @@ -134,11 +134,11 @@ ] }, "locked": { - "lastModified": 1767609335, - "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "type": "github" }, "original": { @@ -184,20 +184,18 @@ "gnome-shell": { "flake": false, "locked": { - "host": "gitlab.gnome.org", "lastModified": 1767737596, "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", "owner": "GNOME", "repo": "gnome-shell", "rev": "ef02db02bf0ff342734d525b5767814770d85b49", - "type": "gitlab" + "type": "github" }, "original": { - "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "gnome-49", "repo": "gnome-shell", - "type": "gitlab" + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "github" } }, "home-manager": { @@ -207,11 +205,11 @@ ] }, "locked": { - "lastModified": 1768240557, - "narHash": "sha256-bVqJ34yMiiUQwYhjliiiN5LBH1Y+UldbIjNTCUtDdwE=", + "lastModified": 1780679734, + "narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=", "owner": "nix-community", "repo": "home-manager", - "rev": "b3f737e70fb9eef1d2308ea6738ffed5ae080f9b", + "rev": "b2b7db486e06e098711dc291bb25db82850e1d16", "type": "github" }, "original": { @@ -227,11 +225,11 @@ ] }, "locked": { - "lastModified": 1768184343, - "narHash": "sha256-dS+Xr1UQYBn8IUWs2/pme7xwl/CGGtmwCnyyfhOQgtM=", + "lastModified": 1780718391, + "narHash": "sha256-hQOS9bTTzVXQNYaW4bi2EyXN8jqDe7ge07xPPbvUMuA=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "585d0a79468dfd5a1234b4c867fadc7cf24b6483", + "rev": "e2ccd7477aa7174e34bd32c135dc470a3f822a82", "type": "github" }, "original": { @@ -242,11 +240,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1768127708, - "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", "type": "github" }, "original": { @@ -256,20 +254,34 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1780365719, + "narHash": "sha256-QfWfccTN+70ZQ4m2qlU9PiKfz2Yppq94058iJyARNwc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ffa10e26ae11d676b2db836259889f1f571cb14f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_2", "systems": "systems" }, "locked": { - "lastModified": 1767906546, - "narHash": "sha256-AoSWS8+P+7hQ/jIdv0wBjgH1MvnerdWBFXO4GV3JoQs=", + "lastModified": 1780646548, + "narHash": "sha256-Ckyl/l1XBmEwnaHcHD8PvBZk1uph0NqwbJ//CAvB7iE=", "owner": "nix-community", "repo": "nixvim", - "rev": "7eb8f36f085b85a2aeff929aff52d0f6aa14e000", + "rev": "816a15282e58678dde831477964987d0262d4293", "type": "github" }, "original": { @@ -286,11 +298,11 @@ ] }, "locked": { - "lastModified": 1768240195, - "narHash": "sha256-tBWjR3zFzc6KftTiITuQ71Y1XylPsqN4XgSfYxtItT0=", + "lastModified": 1780743349, + "narHash": "sha256-+wlFas9ShQI/DkQUj+WSjvipn1pe+5BJ84mqMUrO9hU=", "owner": "nix-community", "repo": "NUR", - "rev": "a1bc4fd38ae4c787e18d20991c472c8f0c556bd9", + "rev": "74ebb3debc660e4398cdb99e246b19d554dca63f", "type": "github" }, "original": { @@ -311,11 +323,11 @@ ] }, "locked": { - "lastModified": 1767810917, - "narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=", + "lastModified": 1780281641, + "narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=", "owner": "nix-community", "repo": "NUR", - "rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4", + "rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01", "type": "github" }, "original": { @@ -343,11 +355,11 @@ ] }, "locked": { - "lastModified": 1768104471, - "narHash": "sha256-HdnXWQsA1EI27IJlaENUEEug58trUrh6+MT0cFiDHmY=", + "lastModified": 1780547341, + "narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=", "owner": "mic92", "repo": "sops-nix", - "rev": "94f9cbd20f680ebb2ad6cdf39da97cbcfaedf004", + "rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a", "type": "github" }, "original": { @@ -370,18 +382,17 @@ ], "nur": "nur_2", "systems": "systems_2", - "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", "tinted-tmux": "tinted-tmux", "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1768241331, - "narHash": "sha256-li0Z2Tr5qpH+wyuCMpzXSsHYRleaTukcdLTpAsGcVzY=", + "lastModified": 1780701809, + "narHash": "sha256-u7AUNs6U6eD1os4+ghbr1gH4QjPWzOdKvpeM+E+XRKM=", "owner": "danth", "repo": "stylix", - "rev": "a62840a9e95801969a03b91e49c1607b5322224c", + "rev": "3a02d9f73608641b28e08b26acb0b0b47c05f14b", "type": "github" }, "original": { @@ -392,15 +403,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1774449309, + "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", "owner": "nix-systems", "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "rev": "c29398b59d2048c4ab79345812849c9bd15e9150", "type": "github" }, "original": { "owner": "nix-systems", + "ref": "future-26.11", "repo": "default", "type": "github" } @@ -435,23 +447,6 @@ "type": "github" } }, - "tinted-foot": { - "flake": false, - "locked": { - "lastModified": 1726913040, - "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", - "type": "github" - } - }, "tinted-kitty": { "flake": false, "locked": { @@ -471,11 +466,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1767710407, - "narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=", + "lastModified": 1777806186, + "narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=", "owner": "tinted-theming", "repo": "schemes", - "rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2", + "rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795", "type": "github" }, "original": { @@ -487,11 +482,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1767489635, - "narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", + "lastModified": 1778379944, + "narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", + "rev": "fe0203a198690e71a5ff11e08812a4673de3678d", "type": "github" }, "original": { @@ -503,11 +498,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1767488740, - "narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", + "lastModified": 1778378178, + "narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", + "rev": "9cd816033ff969415b190722cddf134e78a5665f", "type": "github" }, "original": { @@ -524,11 +519,11 @@ ] }, "locked": { - "lastModified": 1753541826, - "narHash": "sha256-foGgZu8+bCNIGeuDqQ84jNbmKZpd+JvnrL2WlyU4tuU=", + "lastModified": 1770124655, + "narHash": "sha256-yHmd2B13EtBUPLJ+x0EaBwNkQr9LTne1arLVxT6hSnY=", "owner": "nix-community", "repo": "nixos-vscode-server", - "rev": "6d5f074e4811d143d44169ba4af09b20ddb6937d", + "rev": "92ce71c3ba5a94f854e02d57b14af4997ab54ef0", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 156c757..7ca0c82 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,6 @@ }; nixvim = { url = "github:nix-community/nixvim"; - inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { url = "github:mic92/sops-nix"; diff --git a/hosts/luna/users/shorty/default.nix b/hosts/luna/users/shorty/default.nix index 63b3e30..b474b65 100644 --- a/hosts/luna/users/shorty/default.nix +++ b/hosts/luna/users/shorty/default.nix @@ -11,25 +11,25 @@ with lib; beeper bitwarden-desktop bitwarden-cli - discord + etlegacy electron - # (freecad.override { withWayland = config.home.wayland.enable; }) - freecad-wayland + # freecad # FIXME: doesn't build with nixpkgs#2fc6539b481e1d2569f25f8799236694180c0993 insomnia # FOSS alternative to Postman API tester nix-prefetch-git polychromatic - # rustdesk + rustdesk-flutter scrcpy android-tools - act # run GitHub Actions locally wireshark gdb - # ghidra # FIXME: wouldnt build for 4ebc11dad54b7e5b8a46c6edb2533852e99ec566bbe10836b2d6dba89c9c2e3c + ghidra scanmem ]; + alacritty.enable = true; bluetui.enable = true; brightnessctl.enable = true; + discord.enable = true; dunst.enable = true; docker.enable = true; eza.enable = true; @@ -49,6 +49,7 @@ with lib; hyprland.enable = true; impala.enable = true; lazydocker.enable = true; + lazysql.enable = true; mpv.enable = true; nvim.enable = true; obsidian.enable = true; @@ -81,7 +82,6 @@ with lib; programs = { bat.enable = true; btop.enable = true; - chromium.enable = true; direnv = { enable = true; nix-direnv.enable = true; diff --git a/hosts/mars/users/shorty/default.nix b/hosts/mars/users/shorty/default.nix index 1f04288..80bf61a 100644 --- a/hosts/mars/users/shorty/default.nix +++ b/hosts/mars/users/shorty/default.nix @@ -11,6 +11,7 @@ with lib; nix-prefetch-git ]; + alacritty.enable = true; docker.enable = true; eza.enable = true; feh = { @@ -19,10 +20,12 @@ with lib; }; git.enable = true; lazydocker.enable = true; + lazysql.enable = true; nvim.enable = true; openssh.enable = true; rclone.enable = true; sops.enable = true; + stylix.enable = true; yazi.enable = true; zellij.enable = true; zsh.enable = true; diff --git a/hosts/shared/default.nix b/hosts/shared/default.nix index 9bd2a5a..018b49b 100644 --- a/hosts/shared/default.nix +++ b/hosts/shared/default.nix @@ -28,7 +28,7 @@ with lib; }; home = { - stateVersion = "25.05"; + stateVersion = "26.05"; packages = with pkgs; [ imagemagick ffmpeg @@ -46,13 +46,4 @@ with lib; zip ]; }; - - programs = { - alacritty = { - enable = true; - settings = { - font.offset.y = 8; - }; - }; - }; } diff --git a/hosts/shared/nix.nix b/hosts/shared/nix.nix index 7d364dd..61771e1 100644 --- a/hosts/shared/nix.nix +++ b/hosts/shared/nix.nix @@ -19,7 +19,7 @@ with lib; home = { packages = with pkgs; [ - nil + nixd nixfmt ]; }; diff --git a/hosts/shared/secrets/openrouter_api_key b/hosts/shared/secrets/openrouter_api_key index 8d47fff..853502c 100644 --- a/hosts/shared/secrets/openrouter_api_key +++ b/hosts/shared/secrets/openrouter_api_key @@ -3,16 +3,16 @@ "sops": { "age": [ { - "recipient": "age1fczq47wpa2wpm9ejy85qw3axw2c9v0f4qrywv5amnuqsjc87ws6qx75pfr", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArcnppbEtic29jMWRYWWRk\nSDkrdnd2VUthMlFNOHFTYmFFRjYwTkZLK0UwCkVLdmt3NFFjQVB1U096STd0UmVn\nT2FyNVhlLzdHNG5lMktVTlRNS1FjZU0KLS0tIFE1UU9zNFZlcHVEdTJ0dEdIa3hh\nZHBXS0tPMnBhVnpJQlJaU3lBODR5Uk0KMGRp7RvRgMlARbQJ+R6eGwS0JmpV3lHD\nrroOoBT2iac//VJGRwGBvHy8YIuA02Begu0GDGNjcfO6UPURmsCr+Q==\n-----END AGE ENCRYPTED FILE-----\n" + "recipient": "age1hunzh8g6qs0yztln5q4akxvepd667xky4lkff4jga57kzah69ujqvpd7kt", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRdUxtd0lTcCtYVUwvQzZN\nSndsb0hGN3Jta3V0Rmp2OUk5ZUJHcGRsRG53Cmp0RkJRZytVZjZ3cDR0SFczTGMv\nMzB2b2xsWUxKck1pQUtabmhTNFdEb0UKLS0tIGpGUm54aE1vZWs2UnhENXUyWDgr\nMzdVNjRXYkNRMXJ6VEdEZjNTenJqeEUKc6SG6nMbf9kWOKoTFjkb746pgQMiVXNF\n0SAAMIT9TOnLjsN6J6/e0LFpboxKq/uv0ghfA5CGTQexhwZbFIItAA==\n-----END AGE ENCRYPTED FILE-----\n" }, { "recipient": "age1epkfxmjk0tlne8rmxqq77u06q3lnf5xfjcrwq42nuasswefndyfscw84cy", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIb3lxS0pTMkpQS3QxN3E3\nNXdDZ0lUWkxxVjhNWmUvTW13Q0ZNa0wxaGtvCk1aVkd1VW9UMWFacVRxNWJRMVA1\nZ2pyTEQ2dldkdG9MOUkzakhCYU5yczAKLS0tIGVZRVV4bWpicG9sZ0pZdUF2a3lo\nMkFnS25vRTJPcElkUzEvejdES0l0SU0KK3ajTZTQoOCq9mH9Qw9ojorSMwbZbjgH\nz6VguqunOyaupgk/Bz/E3iuQi7hBIixVOnaNrcDokEs3q3tn8KhzaQ==\n-----END AGE ENCRYPTED FILE-----\n" + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIMnpzUjhuemVjbURlQ2k0\naUcxbkRzNVA3SnVVT2ZWbjgzcFpwTDhhb3lrCm9Fa1VtUzQzWEQybXZOOHZpT2Fh\nV2pVWXNUZDdjNzNvSzBBK0U1em56cmMKLS0tIFY3eGNYMnUzWmJGZ0VLeXY3ZEdu\nUUdmVWQwZUFvaWxud0FsWGFncCtPWTgKD32D6fun2Do5cIlJAsZCbQdcahCUaxzi\nyFlJuK1uoVuszANehfXGwNvskPc2IhFDS7HkY4LkyICVwzmDIVO70g==\n-----END AGE ENCRYPTED FILE-----\n" }, { "recipient": "age1hy523tlslqas8qgs0lxgxanp9gx06fjekn608w4qf66mxkjzmucqh0g6vg", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyQVZsTnIrTjNzVmJTYW42\nTFVZbGRwWTA1ZVNaRUx1Q3prZnVIRk80NmpZCmRYa1p1RitJRzd4TjNldHFFVDk5\nUVpkaE00SDcxQW4yUXc0RHVDeWtiSjgKLS0tIHRHMkc2VnFTZThHTGgzdEZ3VTkw\ndFRmNVM1VUZ6U3RRZDlraDNMZXJQVGcKM4mdeIV9PSJO5WemQkkswrW31vIDi1uA\nOMr9xnmLSHACacJjCsiiPISdMZu0qVVNBl/DCoJZVJEi5d6u5I++qw==\n-----END AGE ENCRYPTED FILE-----\n" + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWOFZneFdjeklraHlPdVdR\neFltVWh4UVlQTUhTMDVCN3pOVWZqcHk0QndZClJnRnQ0RlR5NUFvUW00R1ZGeGVN\ndVJiTDhKM2grSy9NOFI1bmIrTVFaWVkKLS0tIFFVOXllc3MzanMyeXJmSDdvNVVi\nbzY2SlhOeEhDei8vTjR5UTdCVWpLN00KLBnF2fSnEetO99rz0cwQOMWYg8pFpxHh\nrNES3yMfTBuXUXs+do+U7sOtCVFeVupGiCiFaQksaQ+TcSsHEQ+i2w==\n-----END AGE ENCRYPTED FILE-----\n" } ], "lastmodified": "2025-02-18T10:54:37Z", diff --git a/hosts/shared/secrets/rclone.conf b/hosts/shared/secrets/rclone.conf index 34499ae..065dba7 100644 --- a/hosts/shared/secrets/rclone.conf +++ b/hosts/shared/secrets/rclone.conf @@ -3,16 +3,16 @@ "sops": { "age": [ { - "recipient": "age1fczq47wpa2wpm9ejy85qw3axw2c9v0f4qrywv5amnuqsjc87ws6qx75pfr", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZNWlseGRWcmZiUUVueVpD\nODB0cHRhUnNUR3BFek9VZHZhZnV3MHVmR1RRCmxoVVFFc1AzODVhWlY3SzBvZ3Ay\naUV0dVJ2RDVQaWc4Zlg1enlPbHFLL0UKLS0tIEtoaE45SG9lVlJmWm5lWlM4YVFB\naUZMcTdvbDlHK2RYQWlTNWlkNHZTSm8K15frHfBMPXhiHN9r91d4h6WUJLPrU9+F\nv3NBJ84Dhl/VRRthJyXSg3LTMI9eN5Rq9VtzLO8Ye3GCiSBeyaUH0Q==\n-----END AGE ENCRYPTED FILE-----\n" + "recipient": "age1hunzh8g6qs0yztln5q4akxvepd667xky4lkff4jga57kzah69ujqvpd7kt", + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZNmdVL2pUb01VOVFDQ0dp\nZE8vQzEzT2w5S3VNRUtBbithUDdrcGEyaUFBCitiWnZ0RkhYenhzNURuNzJ2N1kx\neXZsK081RzBSbWhZR096NGhFRCtaMk0KLS0tIGFsNnZDVktHYjM5azczM3oyWUdn\nazNZSkJDVTcrK0Z2OUNCMHdRME1BeUkKpI4XhCCX1P/h0dqHi2OYmZA7Zcr/zRpB\nIP97L/OPlQlmfrbsznqNCtwMNYZ7lwv+FJRXU4XohqKgZ5IRrOAg/A==\n-----END AGE ENCRYPTED FILE-----\n" }, { "recipient": "age1epkfxmjk0tlne8rmxqq77u06q3lnf5xfjcrwq42nuasswefndyfscw84cy", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzNFh2WE81eUpmQ0hzaEx1\nczBweXVTTmVUbGdrNzVPeGE3bjREa1RhcjFRCmwwVEI0b0E1alprbTl2eGF0YXFi\ncDNKOVJKOHNCdDR4MzR0cFN4ZXpVYTQKLS0tIGZ2WEFySWV5V0hxdWpaeWJSNlZD\ndmF4Q2lPZjhEYTYvcllTOFpOUDRYcFEK7ZrvxKB41UgH2AafvkRgzOckv809H37g\nKiOknxWOzzngILhp3o1EvWFrE65TH/Rlh8i2f0maqJj9Dw/8UfdGbA==\n-----END AGE ENCRYPTED FILE-----\n" + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtaXN1dUVCQ0t5MHM0cG1J\nWWJ0dC9UY0k5VkZzQzhBeHNBS1ErMWdkT21BCmlyTnRJRlpzT25teU4zeW1LZ2g1\nZmpkUEFxa3JTSXUrdlA4MXdNY1hPNEUKLS0tIEZqNW5uQzlUZlB2dnJmdHhENUZU\nT2dKSmdaQmY5RmtBUFMzUHY2RHBabVEKwYvwcsHoTxU5OkBwTBow+VP4Cl/KzWmC\nWLiIeUAx+zfDmpjbsV0JHuw1jlfW4ku1JJ6fCz7LIrUID3dcwU0PvQ==\n-----END AGE ENCRYPTED FILE-----\n" }, { "recipient": "age1hy523tlslqas8qgs0lxgxanp9gx06fjekn608w4qf66mxkjzmucqh0g6vg", - "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBzN3dzeUs3dU9CVUM4b2JH\nNFk2ZGNETWEzTjUzUkgzMmVNUmN1RnFweGpJCi9EZ2w5dnBDV2dyTjcvZy9hdDFq\ncjhtcWJadE1wNEpjdUV0eWVBWkJGZkEKLS0tIHBSZkFSYy9PQ0tPb2RnWFZBTVFh\nYjRva2pEbVRPbEpWSUFNRXoyOEJJNkUKvQ3qJPwW8kmVHsB0am1ZIEYBdweDWlMu\nocLLNOTlL/rlIdTF3Y+h2oUjOzBzSZXKtWq+9QHra5vGwipL1K5zAQ==\n-----END AGE ENCRYPTED FILE-----\n" + "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0TzJiUzNxYU5udzBHY2Mv\ndWY1NkZHSGZzamtLekhsTm5HRFl4clc0b1dFClpmWi9YYWE4Y21icUJKKzhZY2VS\nalJjeFlkM2pVLzBUQjRUamxYSVg5Y2MKLS0tIDdPMzYzYkNPb3RXck5RNFBORHhM\nbVlDem5OQ1VCNExqTU9BK0RET2I2Z1UKNCt7dPryjelSLobAGgipMuMZExZzkATV\nEjh8FKJ5xSNdDYWHiirY2dI/In8i26WY+3JiobB075V7JQ9I4OLttg==\n-----END AGE ENCRYPTED FILE-----\n" } ], "lastmodified": "2025-02-12T10:44:19Z", diff --git a/modules/alacritty.nix b/modules/alacritty.nix new file mode 100644 index 0000000..56a3b4a --- /dev/null +++ b/modules/alacritty.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + ... +}: +let + cfg = config.home.alacritty; + uwsmPrefix = config.home.wayland.uwsm.prefix; +in +with lib; +{ + options = { + home.alacritty.enable = mkEnableOption "alacritty"; + }; + + config = mkIf cfg.enable { + programs = { + alacritty = { + enable = true; + settings = { + font.offset.y = 8; + }; + }; + }; + + wayland.windowManager.hyprland.settings = mkIf config.home.hyprland.enable { + bind = [ + "SUPER, Return, exec, ${uwsmPrefix} alacritty" + ]; + }; + }; +} diff --git a/modules/brightnessctl.nix b/modules/brightnessctl.nix index 2c44e3e..b3d7cbe 100644 --- a/modules/brightnessctl.nix +++ b/modules/brightnessctl.nix @@ -21,8 +21,8 @@ with lib; wayland.windowManager.hyprland.settings = mkIf config.home.hyprland.enable { bindel = [ - ", XF86MonBrightnessDown, exec, ${uwsmPrefix}brightnessctl s 10%-" - ", XF86MonBrightnessUp, exec, ${uwsmPrefix}brightnessctl s 10%+" + ", XF86MonBrightnessDown, exec, ${uwsmPrefix} brightnessctl s 10%-" + ", XF86MonBrightnessUp, exec, ${uwsmPrefix} brightnessctl s 10%+" ]; }; }; diff --git a/modules/chromium.nix b/modules/chromium.nix new file mode 100644 index 0000000..54b2681 --- /dev/null +++ b/modules/chromium.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: +let + cfg = config.home.chromium; +in +with lib; +{ + options = { + home.chromium = { + enable = mkEnableOption "chromium"; + }; + }; + + config = mkIf cfg.enable { + programs = { + chromium.enable = true; + }; + }; +} diff --git a/modules/discord.nix b/modules/discord.nix new file mode 100644 index 0000000..5838993 --- /dev/null +++ b/modules/discord.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.home.discord; +in +with lib; +{ + options = { + home.discord.enable = mkEnableOption "discord"; + }; + + config = mkIf cfg.enable { + nixpkgs.config.permittedInsecurePackages = [ + "electron-39.8.10" + ]; + + home = { + packages = with pkgs; [ + discord + ]; + }; + }; +} diff --git a/modules/feh.nix b/modules/feh.nix index d6c49eb..55ca574 100644 --- a/modules/feh.nix +++ b/modules/feh.nix @@ -41,7 +41,6 @@ with lib; config = mkIf cfg.enable { programs.feh = with pkgs; { enable = true; - # package = feh.override { imlib2 = imlib2Full; }; # FIXME: wouldnt build for 4ebc11dad54b7e5b8a46c6edb2533852e99ec566bbe10836b2d6dba89c9c2e3c }; xdg.mimeApps.defaultApplications = mkIf cfg.defaultApplication.enable ( diff --git a/modules/firefox.nix b/modules/firefox.nix index 027ef13..9d1dcfc 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -39,6 +39,7 @@ with lib; config = mkIf cfg.enable { programs.firefox = { enable = true; + configPath = "${config.xdg.configHome}/mozilla/firefox"; languagePacks = [ "en-US" "en-GB" @@ -73,7 +74,7 @@ with lib; extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ bitwarden darkreader - # fake-filler # TODO: added in a later commit + fake-filler gaoptout ublock-origin sponsorblock @@ -97,75 +98,75 @@ with lib; "bing".metaData.hidden = true; "ddg".metaData.alias = "@d"; "google".metaData.alias = "@g"; - "wikipedia (en)".metaData.alias = "@w"; + "wikipedia".metaData.alias = "@w"; - "Arch Linux Wiki" = { + "archlinux" = { urls = [ { template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } ]; icon = "https://wiki.archlinux.org/favicon.ico"; definedAliases = [ "@a" ]; }; - "Github" = { + "github" = { urls = [ { template = "https://github.com/search?q={searchTerms}"; } ]; icon = "https://github.githubassets.com/favicons/favicon.svg"; definedAliases = [ "@gh" ]; }; - "Reddit" = { + "reddit" = { urls = [ { template = "https://reddit.com/search?q={searchTerms}"; } ]; icon = "https://www.redditstatic.com/shreddit/assets/favicon/192x192.png"; definedAliases = [ "@r" ]; }; - "MyNixOS" = { + "mynixos" = { urls = [ { template = "https://mynixos.com/search?q={searchTerms}"; } ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@n" ]; }; - "NixOS Wiki" = { + "nixoswiki" = { urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ]; icon = "https://wiki.nixos.org/nixos.png"; definedAliases = [ "@nw" ]; }; - "PHP" = { + "php" = { urls = [ { template = "https://php.net/{searchTerms}"; } ]; icon = "https://www.php.net/favicon-196x196.png?v=2"; definedAliases = [ "@php" ]; }; - "ProtonDB" = { + "protondb" = { urls = [ { template = "https://protondb.com/search?q={searchTerms}"; } ]; icon = "https://protondb.com/sites/protondb/images/favicon-32x32.png"; definedAliases = [ "@p" ]; }; - "YouTube" = { + "youtube" = { urls = [ { template = "https://youtube.com/results?search_query={searchTerms}"; } ]; icon = "https://youtube.com/img/favicon_144.png"; definedAliases = [ "@yt" ]; }; - "YouTube Music" = { + "youtubemusic" = { urls = [ { template = "https://music.youtube.com/search?q={searchTerms}"; } ]; icon = "https://music.youtube.com/img/favicon_144.png"; definedAliases = [ "@ytm" ]; }; - "Rotten Tomatoes" = { + "rottentomatoes" = { urls = [ { template = "https://www.rottentomatoes.com/search?search={searchTerms}"; } ]; icon = "https://editorial.rottentomatoes.com/wp-content/uploads/2022/05/favicon.png?w=32"; definedAliases = [ "@rt" ]; }; - "Sonarr" = { + "sonarr" = { urls = [ { template = "https://sonarr.99linesofcode.nl/add/new?term={searchTerms}"; } ]; icon = "https://sonarr.99linesofcode.nl/Content/Images/Icons/favicon-32x32.png"; definedAliases = [ "@sonarr" ]; }; - "Radarr" = { + "radarr" = { urls = [ { template = "https://radarr.99linesofcode.nl/add/new?term={searchTerms}"; } ]; icon = "https://radarr.99linesofcode.nl/Content/Images/Icons/favicon-32x32.png"; definedAliases = [ "@radarr" ]; diff --git a/modules/git.nix b/modules/git.nix index 1776f43..0fae090 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,6 +1,7 @@ { config, lib, + pkgs, specialArgs, ... }: @@ -15,6 +16,20 @@ with lib; }; config = mkIf cfg.enable { + home = { + packages = with pkgs; [ + act # run GitHub Actions locally + git-filter-repo + ]; + + file = { + ".actrc".text = # sh + '' + --container-options -v $SSH_AUTH_SOCK:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent + ''; + }; + }; + programs = { gh = { enable = true; @@ -26,7 +41,7 @@ with lib; git = { enable = true; settings = { - aliases = { + alias = { fix = "commit --fixup"; pufowile = "push --force-with-lease"; sl = "log --oneline --decorate --graph"; @@ -72,22 +87,23 @@ with lib; }; }; zsh = mkIf config.programs.zsh.enable { - initContent = '' - # automatically prune branches both local and remote - function gpb() { - git checkout "$(git_main_branch)" - git fetch - git remote prune origin - git branch --merged | grep -vE "$(git_main_branch)|$(git_develop_branch)" | xargs -r git branch -d - } + initContent = # sh + '' + # automatically prune branches both local and remote + function gpb() { + git checkout "$(git_main_branch)" + git fetch + git remote prune origin + git branch --merged | grep -vE "$(git_main_branch)|$(git_develop_branch)" | xargs -r git branch -d + } - # git remove submodule - function grms() { - git rm $PWD/$1 - rm -rf $PWD/.git/modules/$1 - git config --remove-section submodule.$1 - } - ''; + # git remove submodule + function grms() { + git rm $PWD/$1 + rm -rf $PWD/.git/modules/$1 + git config --remove-section submodule.$1 + } + ''; shellAliases = { gl = "git sla"; gfix = "git fix"; diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 0511588..80b33d8 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -21,6 +21,7 @@ with lib; config = mkIf shouldConfigure { wayland.windowManager.hyprland = { enable = true; + configType = "hyprlang"; # TODO: figure out whether lua requires changes to the hyprland module configuration # see: https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#using-the-home-manager-module-with-nixos package = null; portalPackage = null; diff --git a/modules/hyprland/binds.nix b/modules/hyprland/binds.nix index e18ec13..4084d90 100644 --- a/modules/hyprland/binds.nix +++ b/modules/hyprland/binds.nix @@ -18,18 +18,17 @@ in "SUPER_ALT_CTRL, S, pass, ^(com\.obsproject\.Studio)$" # Hotkeys - "SUPER, Return, exec, ${uwsmPrefix}alacritty" "SUPER, Space, exec, rofi -show-icons -show drun -l 10" "SUPER, V, exec, cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy" - "SUPER_ALT, M, exec, ${uwsmPrefix}wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - "SUPER_ALT, B, exec, ${uwsmPrefix}~/.config/hypr/scripts/bluetooth-toggle.sh" + "SUPER_ALT, M, exec, ${uwsmPrefix} wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + "SUPER_ALT, B, exec, ${uwsmPrefix} ~/.config/hypr/scripts/bluetooth-toggle.sh" # Manipulate windows "SUPER, W, killactive" "SUPER, F, fullscreen" "SUPER_CTRL, F, togglefloating" - "SUPER_CTRL, S, togglesplit" + "SUPER_CTRL, S, layoutmsg, togglesplit" # Focus window "SUPER, H, movefocus, l" @@ -97,9 +96,9 @@ in ]; bindel = [ - ", XF86AudioMute, exec, ${uwsmPrefix}wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioLowerVolume, exec, ${uwsmPrefix}wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86AudioRaiseVolume, exec, ${uwsmPrefix}wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioMute, exec, ${uwsmPrefix} wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioLowerVolume, exec, ${uwsmPrefix} wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioRaiseVolume, exec, ${uwsmPrefix} wpctl set-volume -l 1.25 @DEFAULT_AUDIO_SINK@ 5%+" ]; bindm = [ diff --git a/modules/hyprland/hyprmon.nix b/modules/hyprland/hyprmon.nix index 13e5323..8bee5b7 100644 --- a/modules/hyprland/hyprmon.nix +++ b/modules/hyprland/hyprmon.nix @@ -21,7 +21,7 @@ with lib; wayland.windowManager.hyprland.settings = { bind = [ - "SUPER, P, exec, ${uwsmPrefix}alacritty -e hyprmon" # F4 + "SUPER, P, exec, ${uwsmPrefix} alacritty -e hyprmon" # F4 ]; }; }; diff --git a/modules/hyprland/hyprpicker.nix b/modules/hyprland/hyprpicker.nix index d010bbc..66e8744 100644 --- a/modules/hyprland/hyprpicker.nix +++ b/modules/hyprland/hyprpicker.nix @@ -21,7 +21,7 @@ with lib; wayland.windowManager.hyprland.settings = { bind = [ - "SUPER, D, exec, ${uwsmPrefix}hyprpicker -na" + "SUPER, D, exec, ${uwsmPrefix} hyprpicker -na" ]; }; }; diff --git a/modules/hyprland/settings.nix b/modules/hyprland/settings.nix index 0739836..77cc615 100644 --- a/modules/hyprland/settings.nix +++ b/modules/hyprland/settings.nix @@ -5,7 +5,7 @@ in { wayland.windowManager.hyprland.settings = { exec-once = [ - "${uwsmPrefix} wl-paste -w cliphist store" # TODO: switch to clipse or stick with rofi and cliphist? + "${uwsmPrefix} wl-paste -w cliphist store" # TODO: switch to clipse or stick with rofi and cliphist? ]; monitor = [ @@ -34,7 +34,6 @@ in }; }; dwindle = { - pseudotile = true; preserve_split = true; }; diff --git a/modules/lazysql.nix b/modules/lazysql.nix new file mode 100644 index 0000000..f54d9ad --- /dev/null +++ b/modules/lazysql.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.home.lazysql; +in +with lib; +{ + options = { + home.lazysql.enable = mkEnableOption "lazysql"; + }; + + config = mkIf cfg.enable { + programs.lazysql = { + enable = true; + }; + }; +} diff --git a/modules/nvim.nix b/modules/nvim.nix index 6f1ebc4..81569ae 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -2,6 +2,7 @@ config, inputs, lib, + pkgs, ... }: let @@ -20,7 +21,18 @@ with lib; # TODO: write autocommand to open helpfiles in vertical split config = mkIf cfg.enable { - home.file."${config.xdg.cacheHome}/nvim/.gitkeep".text = ""; + home = { + file."${config.xdg.cacheHome}/nvim/.gitkeep".text = ""; + packages = with pkgs; [ + hadolint + prettier + shellcheck-minimal + shfmt + vale + valeStyles.alex + valeStyles.proselint + ]; + }; programs = { fd.enable = true; @@ -29,16 +41,29 @@ with lib; enable = true; defaultEditor = true; extraConfigLuaPre = "if not vim.g.vscode then"; + extraConfigLua = # lua + '' + vim.filetype.add({ + pattern = { + ["%.env%..+"] = "dotenv"; + ["%.env"] = "dotenv"; + } + }) + ''; extraConfigLuaPost = "end"; viAlias = true; vimAlias = true; vimdiffAlias = true; - globals.mapleader = " "; - globals.maplocalleader = "\\"; + + globals = { + mapleader = " "; + maplocalleader = "\\"; + }; opts = { autowrite = true; # write the contents of the file automatically on certain commands clipboard = "unnamedplus"; # use system clipboard + colorcolumn = "80,120,160"; # color line length columns completeopt = "menu,menuone,noselect"; confirm = true; # confirm to save changes before exiting modified buffer cursorline = true; # enable highlighting of the current line diff --git a/modules/nvim/cmp.nix b/modules/nvim/cmp.nix index 58d7aba..d48e347 100644 --- a/modules/nvim/cmp.nix +++ b/modules/nvim/cmp.nix @@ -28,22 +28,23 @@ }; performance = { debounce = 60; - fetchingTimeout = 200; - maxViewEntries = 30; + fetching_timeout = 200; + max_view_entries = 30; }; snippet.expand = "luasnip"; sources = [ - { name = "emoji"; } { name = "buffer"; } { name = "cmdline"; } { name = "dap"; } { name = "luasnip"; } { name = "nvim_lsp"; } + # { name = "nvim_lsp_document_symbol"; } # FIXME: incorrectly listed as an unfree package as of 05d48760cd7b5f05a60e772220d377a10c02eddf4ec12e3f333e8cad1ac5ce3e + { name = "nvim_lsp_signature_help"; } { name = "path"; } + { name = "treesitter"; } ]; }; }; - cmp-nvim-lsp.enable = true; }; }; } diff --git a/modules/nvim/conform.nix b/modules/nvim/conform.nix index 8de5bd2..c03e989 100644 --- a/modules/nvim/conform.nix +++ b/modules/nvim/conform.nix @@ -39,124 +39,105 @@ ''; formatters_by_ft = { - "_" = [ - "squeeze_blanks" - "trim_whitespace" - "trim_newlines" - ]; sh = [ - "shellcheck" "shfmt" ]; bash = [ - "shellcheck" "shellharden" "shfmt" ]; - blade = [ - "superhtml" - "blade-formatter" - "eslint_d" - "prettierd" - "prettier" - ]; + blade = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + __unkeyed-4 = "blade-formatter"; + stop_after_first = true; + }; c = [ "clang-format" ]; - css = [ - "stylelint" - "eslint_d" - "prettierd" - "prettier" - ]; - html = [ - "superhtml" - "eslint_d" - "prettierd" - "prettier" - ]; - javascript = [ - "eslint_d" - "prettierd" - "prettier" - ]; - javascriptreact = [ - "eslint_d" - "prettierd" - "prettier" - ]; - json = [ - "jq" - "eslint_d" - "prettierd" - "prettier" - ]; + css = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; + }; + html = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; + }; + javascript = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; + }; + javascriptreact = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; + }; + json = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + __unkeyed-4 = "jq"; + stop_after_first = true; + }; lua = [ "stylua" ]; - markdown = [ - "markdownlint-cli2" - "eslint_d" - "prettierd" - "prettier" - ]; + markdown = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; + }; nix = [ "nixfmt" ]; - php = [ - "pint" - "php_cs_fixer" - ]; + php = { + __unkeyed-1 = "pint"; + __unkeyed-2 = "php_cs_fixer"; + stop_after_first = true; + }; python = [ - "black" - "isort" + "ruff_format" + ]; + ruby = [ + "rubocop" ]; rust = [ "rustfmt" ]; - typescript = [ - "eslint_d" - "prettierd" - "prettier" - ]; - typescriptreact = [ - "eslint_d" - "prettierd" - "prettier" - ]; - yaml = [ - "yq" - "eslint_d" - "prettierd" - "prettier" + sql = [ + "sqruff" ]; - }; - - formatters = with pkgs; { - isort = { - command = lib.getExe isort; - }; - jq = { - command = lib.getExe jq; + typescript = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; }; - nixfmt = { - command = lib.getExe nixfmt; + typescriptreact = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + stop_after_first = true; }; - shellcheck = { - command = lib.getExe shellcheck; - }; - shellharden = { - command = lib.getExe shellharden; - }; - shfmt = { - command = lib.getExe shfmt; - }; - stylua = { - command = lib.getExe stylua; - }; - squeeze_blanks = { - command = lib.getExe' pkgs.coreutils "cat"; + yaml = { + __unkeyed-1 = "prettierd"; + __unkeyed-2 = "prettier"; + __unkeyed-3 = "eslint_d"; + __unkeyed-4 = "yq"; + stop_after_first = true; }; + }; + + formatters = with pkgs; { yq = { command = lib.getExe yq-go; }; diff --git a/modules/nvim/dap.nix b/modules/nvim/dap.nix index bec0f5d..6da56a9 100644 --- a/modules/nvim/dap.nix +++ b/modules/nvim/dap.nix @@ -39,7 +39,7 @@ in adapters = with pkgs; { executables = { php = { - command = lib.getExe' nodePackages.nodejs "node"; + command = lib.getExe' nodejs "node"; args = [ "${vscode-extensions.xdebug.php-debug}/share/vscode/extensions/xdebug.php-debug/out/phpDebug.js" ]; diff --git a/modules/nvim/lsp.nix b/modules/nvim/lsp.nix index 3de4da7..a134c51 100644 --- a/modules/nvim/lsp.nix +++ b/modules/nvim/lsp.nix @@ -10,8 +10,8 @@ inlayHints = true; servers = { bashls.enable = true; + cssls.enable = true; emmet_ls.enable = true; - eslint.enable = true; helm_ls.enable = true; html.enable = true; intelephense = { @@ -21,18 +21,17 @@ jsonls.enable = true; lua_ls.enable = true; marksman.enable = true; - nil_ls.enable = true; - pest_ls.enable = true; - pyright.enable = true; + nixd.enable = true; ruby_lsp.enable = true; + ruff.enable = true; # python rust_analyzer = { enable = true; installCargo = false; installRustc = false; }; - superhtml.enable = true; + sqruff.enable = true; # sql tailwindcss.enable = true; - ts_ls.enable = true; + ts_ls.enable = true; # javascript/typescript vue_ls.enable = true; yamlls.enable = true; }; @@ -90,6 +89,7 @@ }; }; lspkind.enable = true; # vscode-like pictograms for lsp + lsp-lines.enable = true; # diagnostics in virtual line lsp-signature.enable = true; # method signatures }; }; diff --git a/modules/nvim/mini.nix b/modules/nvim/mini.nix index 20e8e22..91de6a3 100644 --- a/modules/nvim/mini.nix +++ b/modules/nvim/mini.nix @@ -5,6 +5,8 @@ ]; plugins = { + mini-align.enable = true; + mini-splitjoin.enable = true; mini = { enable = true; mockDevIcons = true; @@ -21,7 +23,9 @@ }; }; }; - icons = { }; + icons = { + style = "glyph"; + }; pairs = { modes = { insert = true; diff --git a/modules/nvim/neo-tree.nix b/modules/nvim/neo-tree.nix index 5fb2937..cc31c9d 100644 --- a/modules/nvim/neo-tree.nix +++ b/modules/nvim/neo-tree.nix @@ -15,16 +15,16 @@ plugins.neo-tree = { enable = true; settings = { - closeIfLastWindow = true; - defaultComponentConfigs = { + close_if_last_window = true; + default_component_configs = { indent = { - withExpanders = true; - expanderCollapsed = "󰅂"; - expanderExpanded = "󰅀"; - expanderHighlight = "NeoTreeExpander"; + with_expanders = true; + expander_collapsed = "󰅂"; + expander_expanded = "󰅀"; + expander_highlight = "NeoTreeExpander"; }; - gitStatus = { + git_status = { symbols = { added = " "; conflict = "󰩌 "; @@ -39,14 +39,21 @@ }; }; filesystem = { - bindToCwd = false; + bind_to_cwd = false; follow_current_file = { enabled = true; + leave_dirs_open = true; }; filtered_items = { hide_dotfiles = false; hide_gitignored = false; + hide_ignored = false; + ignore_files = [ + ".ignore" + ".rignore" + ]; }; + hijack_netrw_behavior = "open_default"; }; sources = [ "filesystem" diff --git a/modules/nvim/nvim-lint.nix b/modules/nvim/nvim-lint.nix index 7d23c74..1afa13a 100644 --- a/modules/nvim/nvim-lint.nix +++ b/modules/nvim/nvim-lint.nix @@ -8,33 +8,21 @@ lint = { enable = true; lintersByFt = { + bash = [ + "shellcheck" + ]; dockerfile = [ "hadolint" ]; - json = [ - "jsonlint" - ]; markdown = [ "vale" ]; - php = [ - "phpstan" - ]; - rst = [ - "vale" - ]; - ruby = [ - "ruby" - ]; - rust = [ - "rustfmt" + sh = [ + "shellcheck" ]; text = [ "vale" ]; - yaml = [ - "yq" - ]; }; }; }; diff --git a/modules/nvim/telescope.nix b/modules/nvim/telescope.nix index e4c6c53..c244896 100644 --- a/modules/nvim/telescope.nix +++ b/modules/nvim/telescope.nix @@ -37,7 +37,26 @@ }; settings = { defaults = { + file_ignore_patterns = [ + "%.git/" + ]; sorting_strategy = "ascending"; + vimgrep_arguments = [ + "rg" + "--color=never" + "--no-heading" + "--with-filename" + "--line-number" + "--column" + "--smart-case" + "--hidden" + "--glob=!.git/" + ]; + }; + pickers = { + find_files = { + hidden = true; + }; }; }; keymaps = { diff --git a/modules/nvim/treesitter.nix b/modules/nvim/treesitter.nix index ee2b76e..2c6cdd5 100644 --- a/modules/nvim/treesitter.nix +++ b/modules/nvim/treesitter.nix @@ -19,7 +19,6 @@ trim_scope = "outer"; }; }; - # treesitter-refactor.enable = true; # FIXME: wouldnt build for 4ebc11dad54b7e5b8a46c6edb2533852e99ec566bbe10836b2d6dba89c9c2e3c treesitter-textobjects = { enable = true; settings = { diff --git a/modules/playerctl.nix b/modules/playerctl.nix index 3452e8d..3f3ce67 100644 --- a/modules/playerctl.nix +++ b/modules/playerctl.nix @@ -21,11 +21,11 @@ with lib; wayland.windowManager.hyprland.settings = mkIf config.home.hyprland.enable { bindl = [ - ", XF86AudioPrev, exec, ${uwsmPrefix}playerctl previous" - ", XF86AudioPlay, exec, ${uwsmPrefix}playerctl play-pause" - ", XF86AudioNext, exec, ${uwsmPrefix}playerctl next" - ", XF86AudioMedia, exec, ${uwsmPrefix}playerctl play-pause" - ", XF86AudioStop, exec, ${uwsmPrefix}playerctl stop" + ", XF86AudioPrev, exec, ${uwsmPrefix} playerctl previous" + ", XF86AudioPlay, exec, ${uwsmPrefix} playerctl play-pause" + ", XF86AudioNext, exec, ${uwsmPrefix} playerctl next" + ", XF86AudioMedia, exec, ${uwsmPrefix} playerctl play-pause" + ", XF86AudioStop, exec, ${uwsmPrefix} playerctl stop" ]; }; }; diff --git a/modules/sops.nix b/modules/sops.nix index f73be2e..f873a42 100644 --- a/modules/sops.nix +++ b/modules/sops.nix @@ -3,10 +3,12 @@ inputs, lib, pkgs, + specialArgs, ... }: let cfg = config.home.sops; + inherit (specialArgs) username; in with lib; { @@ -29,6 +31,7 @@ with lib; defaultSopsFile = ../.sops.yaml; age = { generateKey = false; + keyFile = "/home/${username}/.config/sops/age/keys.txt"; sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ]; }; }; diff --git a/modules/syncthing.nix b/modules/syncthing.nix index 09c821a..d4d7800 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -21,9 +21,6 @@ with lib; settings = { options.urAccepted = -1; # do not submit anonymous usage data devices = { - "note" = { - id = "4CYUMEQ-DYNLFQ6-ASNQ7MX-TB6WRBA-4JPEOHJ-C5YA27Q-PVQ72CQ-AUU77Q6"; - }; "boox" = { id = "O7JFX2O-SXQ2PGL-JGEPNM4-L42XPWW-A45NXOO-SSFRFJK-UIAGCC7-C5MRBQP"; }; @@ -32,7 +29,6 @@ with lib; "Obsidian" = mkIf (config.home.google-drive.enable && config.home.obsidian.enable) { path = "/home/${username}/Documents/Google Drive/Obsidian"; devices = [ - "note" "boox" ]; }; diff --git a/modules/waybar.nix b/modules/waybar.nix index cb14e20..27463c2 100644 --- a/modules/waybar.nix +++ b/modules/waybar.nix @@ -117,7 +117,7 @@ with lib; " " ]; }; - "on-click" = "${uwsmPrefix}pwvucontrol"; + "on-click" = "${uwsmPrefix} pwvucontrol"; }; "network" = { @@ -131,7 +131,7 @@ with lib; "tooltip-format-ethernet" = " {ifname} ({ipaddr}/{cidr})"; "tooltip-format-disconnected" = "Disconnected"; "max-length" = 50; - "on-click" = "${uwsmPrefix}alacritty -e impala"; + "on-click" = "${uwsmPrefix} alacritty -e impala"; }; "bluetooth" = { @@ -142,7 +142,7 @@ with lib; "tooltip-format" = "{device_alias}"; "tooltip-format-connected" = "󰂰 {device_enumerate}"; "tooltip-format-enumerate-connected" = "{device_alias}"; - "on-click" = "${uwsmPrefix}alacritty -e bluetui"; + "on-click" = "${uwsmPrefix} alacritty -e bluetui"; }; "battery" = { diff --git a/modules/wayland.nix b/modules/wayland.nix index 23a9453..003597a 100644 --- a/modules/wayland.nix +++ b/modules/wayland.nix @@ -6,7 +6,7 @@ }: let cfg = config.home.wayland; - uwsmPrefix = "uwsm app -- "; + uwsmPrefix = "uwsm app --"; in with lib; { @@ -14,7 +14,7 @@ with lib; home.wayland = { enable = mkEnableOption "wayland"; uwsm.prefix = mkOption { - default = "${uwsmPrefix}"; + default = "${uwsmPrefix} "; type = with types; str; description = "UWSM prefix"; }; diff --git a/modules/wlogout.nix b/modules/wlogout.nix index cc510d6..d24a6ef 100644 --- a/modules/wlogout.nix +++ b/modules/wlogout.nix @@ -20,7 +20,7 @@ with lib; layout = [ { "label" = "lock"; - "action" = "which hyprlock &>/dev/null && ${uwsmPrefix}hyprlock || loginctl lock-session"; + "action" = "which hyprlock &>/dev/null && ${uwsmPrefix} hyprlock || loginctl lock-session"; "text" = "[L] ock"; "keybind" = "l"; } diff --git a/modules/yazi.nix b/modules/yazi.nix index 616c3c3..e649643 100644 --- a/modules/yazi.nix +++ b/modules/yazi.nix @@ -22,7 +22,7 @@ with lib; programs.yazi = { enable = true; settings = { - manager = { + mgr = { linemode = "none"; ratio = [ 1 @@ -59,6 +59,7 @@ with lib; micro_workers = 5; }; }; + shellWrapperName = "y"; plugins = { # TODO: add ouch.yazi for compressing and decompressing archives }; @@ -66,7 +67,32 @@ with lib; wayland.windowManager.hyprland.settings = mkIf config.home.hyprland.enable { bind = [ - "SUPER, E, exec, ${uwsmPrefix}alacritty -e 'yazi'" + "SUPER, E, exec, ${uwsmPrefix} alacritty -e yazi" + ]; + + windowrule = [ + { + name = "yazi"; + "match:title" = "^(Yazi:.*)$"; + float = "on"; + center = "on"; + } + { + name = "ueberzug"; + "match:class" = "^(ueberzugpp_.*)$"; + no_initial_focus = "on"; + no_anim = "on"; + no_shadow = "on"; + float = "on"; + center = "on"; + size = "500"; + } + { + name = "zathura"; + "match:class" = "^(org.pwmt.zathura)$"; + float = "on"; + center = "on"; + } ]; }; }; diff --git a/modules/zellij.nix b/modules/zellij.nix index 9465798..ad89902 100644 --- a/modules/zellij.nix +++ b/modules/zellij.nix @@ -14,17 +14,11 @@ with lib; config = mkIf cfg.enable { programs = { - alacritty = mkIf config.programs.alacritty.enable { - settings = { - terminal.shell = "zellij"; - }; - }; zellij = { enable = true; enableZshIntegration = config.programs.zsh.enable; settings = { show_startup_tips = false; - default_layout = "compact"; # NOTE: https://github.com/zellij-org/zellij/blob/main/zellij-utils/assets/config/default.kdl keybinds = { "normal clear-defaults=true" = { diff --git a/modules/zsh.nix b/modules/zsh.nix index 20dffd6..aeb50ed 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -41,27 +41,36 @@ with lib; "rm *" ]; }; - initContent = '' - fastfetch + initContent = # sh + '' + fastfetch - function p() { - if [ -f docker-compose.yml ] || [ -f docker-compose.yaml ]; then - if docker ps -f "name=php" -f "publish=80" --format "{{.ID}}" | grep -q .; then - docker compose exec php $@ - return + function a() { + if [ -f artisan ]; then + p php artisan $@ + else + p php ./vendor/bin/testbench $@ + fi + } + + function p() { + if [ -f docker-compose.yml ] || [ -f docker-compose.yaml ]; then + if docker ps -f "name=php" -f "publish=80" --format "{{.ID}}" | grep -q .; then + docker compose exec php $@ + return + fi fi - fi - # TODO: local PHP should probably take precedence when dnsmasq is setup correctly - if command -v php >/dev/null 2>&1; then - $@ - return - fi + # TODO: local PHP should probably take precedence when dnsmasq is setup correctly + if command -v php >/dev/null 2>&1; then + $@ + return + fi - echo "Failed to run $@. Could not find PHP or PHP docker container." - return 1 - } - ''; + echo "Failed to run $@. Could not find PHP or PHP docker container." + return 1 + } + ''; oh-my-zsh = { enable = true; plugins = [ @@ -76,14 +85,15 @@ with lib; ]; theme = "juanghurtado"; }; - profileExtra = mkIf config.home.wayland.enable '' - if uwsm check may-start; then - exec uwsm start default - fi - ''; + profileExtra = + mkIf config.home.wayland.enable # sh + '' + if uwsm check may-start; then + exec uwsm start default + fi + ''; syntaxHighlighting.enable = true; shellAliases = { - a = "p php artisan"; artisan = "a"; cat = "bat --paging=never"; c = "p composer";