From 5452727ea2f65322a6a44344b7d13f6e1b181e34 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 5 Dec 2024 13:16:03 +0100 Subject: [PATCH 01/55] [WIP] Update everything --- nix/flake.lock | 133 +++++++++---------------------------- nix/flake.nix | 17 ++--- nix/home/packages.nix | 6 +- nix/home/zsh.nix | 1 + nix/overlays/lix.nix | 3 + nix/system/default.nix | 2 + nix/system/homebrew.nix | 12 +++- nix/system/nix.nix | 6 +- nix/system/preferences.nix | 4 +- 9 files changed, 66 insertions(+), 118 deletions(-) diff --git a/nix/flake.lock b/nix/flake.lock index 0b74a57..28406a9 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1720469887, - "narHash": "sha256-BwPsGQ/EMqCreUc5j9Efj+wx13AjREtuHhbyHZygcE4=", + "lastModified": 1733351379, + "narHash": "sha256-MTMsAhXxMMVHVN99jT8E0afOAOtt3JQWjYpTja94PAU=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "fabc653517106127e2ed435fb52e7e8854354428", + "rev": "55d07816a0944f06a9df5ef174999a72fa4060c7", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "dotfiles": { "flake": false, "locked": { - "lastModified": 1717202661, - "narHash": "sha256-yRqcINrAjRhW7JGE2qoAvQv1hirZLGZwmxayAMdtCU0=", + "lastModified": 1722930651, + "narHash": "sha256-nPIXYsbVrXBZRD9VppUGZMlgb622MJHZXuXNrlvCQe8=", "ref": "refs/heads/master", - "rev": "66b760491c829609e016688beaa121d3aa1d2188", - "revCount": 473, + "rev": "bfe8d9ed9f632c952901bc64bc5142ea85c8313d", + "revCount": 483, "submodules": true, "type": "git", "url": "https://github.com/lexisother/dotfiles" @@ -38,39 +38,6 @@ "url": "https://github.com/lexisother/dotfiles" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flakey-profile": { - "locked": { - "lastModified": 1712898590, - "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", - "owner": "lf-", - "repo": "flakey-profile", - "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", - "type": "github" - }, - "original": { - "owner": "lf-", - "repo": "flakey-profile", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -78,64 +45,43 @@ ] }, "locked": { - "lastModified": 1720042825, - "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", + "lastModified": 1733050161, + "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", + "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } }, - "lix": { - "inputs": { - "flake-utils": "flake-utils", - "flakey-profile": "flakey-profile", - "lix": "lix_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719353937, - "narHash": "sha256-86NBqDxAP20ET/UoKX0WvSItblNQ97czXb2q7lkMrwk=", - "ref": "refs/heads/main", - "rev": "5d9d94089fb1ca96222a34bfe245ef5c5ebefd37", - "revCount": 92, - "type": "git", - "url": "https://git.lix.systems/lix-project/nixos-module" - }, - "original": { - "type": "git", - "url": "https://git.lix.systems/lix-project/nixos-module" - } - }, - "lix_2": { - "flake": false, - "locked": { - "lastModified": 1718767907, - "narHash": "sha256-gpd+mGQxqVHw2kO6rSPQel8TkChHh9UpqxjsmQi0QJM=", - "rev": "85f282ef572577899b3d80ba8def1b920a386218", - "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/85f282ef572577899b3d80ba8def1b920a386218.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" - } - }, "nixpkgs": { "locked": { - "lastModified": 1720492477, - "narHash": "sha256-PV6LKJpj43tuKAMEfmXiKZjlOW1IqZORUJ8WYcdLtGE=", + "lastModified": 1733326450, + "narHash": "sha256-hBG6Ix5ZzXCJoanrPOLtQRalYv6nnDu9AZeamRfjKJ8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "64f145f456b7a3953f191cad9e257cd88412044e", + "rev": "f9ef77eb704d063bfbff7f04531a0b325cc1a18f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-24.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-old": { + "locked": { + "lastModified": 1730891215, + "narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c128e44a249d6180740d0a979b6480d5b795c013", "type": "github" }, "original": { @@ -150,23 +96,8 @@ "darwin": "darwin", "dotfiles": "dotfiles", "home-manager": "home-manager", - "lix": "lix", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs", + "nixpkgs-old": "nixpkgs-old" } } }, diff --git a/nix/flake.nix b/nix/flake.nix index cf246b6..36ec971 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -2,10 +2,11 @@ description = "flake of the lyxer..."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; - home-manager.url = "github:nix-community/home-manager/release-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; + nixpkgs-old.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; darwin.url = "github:lnl7/nix-darwin"; - lix.url = "git+https://git.lix.systems/lix-project/nixos-module"; + # lix.url = "git+https://git.lix.systems/lix-project/nixos-module"; dotfiles = { url = "https://github.com/lexisother/dotfiles"; type = "git"; @@ -15,11 +16,11 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; darwin.inputs.nixpkgs.follows = "nixpkgs"; - lix.inputs.nixpkgs.follows = "nixpkgs"; + # lix.inputs.nixpkgs.follows = "nixpkgs"; }; # add the inputs declared above to the argument attribute set - outputs = { self, nixpkgs, lix, home-manager, dotfiles, darwin }: let + outputs = { self, nixpkgs, nixpkgs-old, /*lix,*/ home-manager, dotfiles, darwin } @ inputs: let system = "x86_64-darwin"; importAll = path: map (p: import (path + ("/" + p))) @@ -37,14 +38,14 @@ in { darwinConfigurations."alymac" = darwin.lib.darwinSystem { inherit system; - specialArgs = libs; + specialArgs = libs // inputs; modules = [ ./system - lix.nixosModules.default + # lix.nixosModules.default home-manager.darwinModules.home-manager { home-manager = { - extraSpecialArgs = { inherit self; inherit dotfiles; } // libs; + extraSpecialArgs = { inherit dotfiles; } // libs // inputs; useGlobalPkgs = true; useUserPackages = true; users.alyxia.imports = [ ./home ]; diff --git a/nix/home/packages.nix b/nix/home/packages.nix index 3563604..877a0ff 100644 --- a/nix/home/packages.nix +++ b/nix/home/packages.nix @@ -14,7 +14,7 @@ let base = [ act bat - bitwarden-cli + # bitwarden-cli cachix cloudflared delta @@ -25,7 +25,7 @@ let git-crypt gitui gnupg - jq + # jq kubectl kubelogin-oidc mosh @@ -59,7 +59,7 @@ let kotlin-language-server lua-language-server nil - nodejs_20 + nodejs_22 python2 ruby_3_1 sbcl diff --git a/nix/home/zsh.nix b/nix/home/zsh.nix index 777c0a6..f9922b1 100644 --- a/nix/home/zsh.nix +++ b/nix/home/zsh.nix @@ -18,6 +18,7 @@ export FRENYARD_SCALE=2.40 export RETHINK_API="https://rethink.alyxia.dev" export KUBECONFIG="$HOME/.kube/config.yaml" + export SDKROOT="$(xcrun --show-sdk-path)" function violent-update() { # diff --git a/nix/overlays/lix.nix b/nix/overlays/lix.nix index f44f23b..8f1a30f 100644 --- a/nix/overlays/lix.nix +++ b/nix/overlays/lix.nix @@ -5,6 +5,9 @@ --replace-fail "(Lix, like Nix)" "but for lesbians" ''; + # + buildInputs = oldAttrs.buildInputs ++ [ prev.apple-sdk_11 ]; + # WARNING: This greatly assumes that lix will never merge a CL that breaks # the tests. But I choose to disable them anyway because the build time is faster doCheck = false; diff --git a/nix/system/default.nix b/nix/system/default.nix index 018abe3..1b80095 100644 --- a/nix/system/default.nix +++ b/nix/system/default.nix @@ -3,6 +3,8 @@ { imports = importAll [] ./.; + system.stateVersion = 5; + networking = { computerName = "Alyxia's MacBook Pro"; hostName = "alymac"; diff --git a/nix/system/homebrew.nix b/nix/system/homebrew.nix index 99b0fd4..9429c6a 100644 --- a/nix/system/homebrew.nix +++ b/nix/system/homebrew.nix @@ -13,6 +13,7 @@ "drud/ddev" "homebrew/cask-versions" "int128/kubelogin" + "the-wineskin-project/wineskin" ]; # Please do not the brew. @@ -34,6 +35,7 @@ "poetry" "rustup" "sdl2" + "spicetify-cli" # Fyra crap, but from Homebrew because someone doesn't know how to # package libraries in nixpkgs @@ -51,18 +53,23 @@ "1password-cli" "alt-tab" "android-studio" + "anydesk" "audacity" "background-music" "browserstacklocal" "db-browser-for-sqlite" "discord" - "discord-ptb" + # "discord-ptb" + "discord@ptb" "docker" "dolphin@dev" "firefox" - "firefox-developer-edition" + # "firefox-developer-edition" + "firefox@developer-edition" "goland" "google-chrome" + "imhex" + "insomnia" "intellij-idea" "itch" "iterm2" @@ -88,6 +95,7 @@ "typora" "visual-studio-code" "wine-stable" + "wineskin" ]; }; } diff --git a/nix/system/nix.nix b/nix/system/nix.nix index 43f97f2..b9c7689 100644 --- a/nix/system/nix.nix +++ b/nix/system/nix.nix @@ -1,9 +1,11 @@ -{ pkgs, ... }: +{ inputs, pkgs, ... }: { services.nix-daemon.enable = true; nix = { + package = inputs.nixpkgs-old.legacyPackages.${pkgs.system}.lix; + settings = { # enable flakes and the `nix` command experimental-features = [ "nix-command" "flakes" ]; @@ -15,7 +17,7 @@ }; # "apply the free optimisations" - auto-optimise-store = true; + # auto-optimise-store = true; # we need to create some trusted and allwed users so that we can use # some features like substituters diff --git a/nix/system/preferences.nix b/nix/system/preferences.nix index 7d52f4c..1a81b3c 100644 --- a/nix/system/preferences.nix +++ b/nix/system/preferences.nix @@ -14,8 +14,8 @@ NSNavPanelExpandedStateForSaveMode = true; NSNavPanelExpandedStateForSaveMode2 = true; - KeyRepeat = 1; - InitialKeyRepeat = 10; + KeyRepeat = 6; + InitialKeyRepeat = 25; }; LaunchServices.LSQuarantine = false; From ea70fa6e222d49b545973d23bc20b71a568c5198 Mon Sep 17 00:00:00 2001 From: isabel Date: Thu, 5 Dec 2024 16:37:43 +0000 Subject: [PATCH 02/55] fix: inherit correctly --- nix/flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/flake.nix b/nix/flake.nix index 36ec971..2113034 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -38,14 +38,14 @@ in { darwinConfigurations."alymac" = darwin.lib.darwinSystem { inherit system; - specialArgs = libs // inputs; + specialArgs = libs // { inherit inputs; }; modules = [ ./system # lix.nixosModules.default home-manager.darwinModules.home-manager { home-manager = { - extraSpecialArgs = { inherit dotfiles; } // libs // inputs; + extraSpecialArgs = { inherit self dotfiles; } // libs; useGlobalPkgs = true; useUserPackages = true; users.alyxia.imports = [ ./home ]; From b0361ef80ce4f05f1b5ce4b5eecf51d29fa3af5e Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 10 Dec 2024 10:48:32 +0100 Subject: [PATCH 03/55] [nix] Say goodbye to Lix, for now --- nix/flake.lock | 19 +------------------ nix/flake.nix | 15 ++++++--------- nix/overlays/.gitkeep | 0 nix/overlays/lix.nix | 15 --------------- nix/system/homebrew.nix | 3 --- nix/system/nix.nix | 2 +- 6 files changed, 8 insertions(+), 46 deletions(-) create mode 100644 nix/overlays/.gitkeep delete mode 100644 nix/overlays/lix.nix diff --git a/nix/flake.lock b/nix/flake.lock index 28406a9..bbcbb81 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -75,29 +75,12 @@ "type": "github" } }, - "nixpkgs-old": { - "locked": { - "lastModified": 1730891215, - "narHash": "sha256-i85DPrhDuvzgvIWCpJlbfM2UFtNYbapo20MtQXsvay4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c128e44a249d6180740d0a979b6480d5b795c013", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-24.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "darwin": "darwin", "dotfiles": "dotfiles", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "nixpkgs-old": "nixpkgs-old" + "nixpkgs": "nixpkgs" } } }, diff --git a/nix/flake.nix b/nix/flake.nix index 2113034..9128411 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -3,10 +3,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; - nixpkgs-old.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; home-manager.url = "github:nix-community/home-manager/release-24.11"; darwin.url = "github:lnl7/nix-darwin"; - # lix.url = "git+https://git.lix.systems/lix-project/nixos-module"; dotfiles = { url = "https://github.com/lexisother/dotfiles"; type = "git"; @@ -16,18 +14,18 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; darwin.inputs.nixpkgs.follows = "nixpkgs"; - # lix.inputs.nixpkgs.follows = "nixpkgs"; }; # add the inputs declared above to the argument attribute set - outputs = { self, nixpkgs, nixpkgs-old, /*lix,*/ home-manager, dotfiles, darwin } @ inputs: let + outputs = { self, nixpkgs, home-manager, dotfiles, darwin } @ inputs: let system = "x86_64-darwin"; - importAll = path: map - (p: import (path + ("/" + p))) - (builtins.attrNames (builtins.readDir path)); + # NOTE: uncomment for overlays if we ever need any + # importAll = path: map + # (p: import (path + ("/" + p))) + # (builtins.attrNames (builtins.readDir path)); pkgs = import nixpkgs { inherit system; - overlays = importAll ./overlays; + # overlays = importAll ./overlays; }; libs = with builtins; listToAttrs (map (path: { @@ -41,7 +39,6 @@ specialArgs = libs // { inherit inputs; }; modules = [ ./system - # lix.nixosModules.default home-manager.darwinModules.home-manager { home-manager = { diff --git a/nix/overlays/.gitkeep b/nix/overlays/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/nix/overlays/lix.nix b/nix/overlays/lix.nix deleted file mode 100644 index 8f1a30f..0000000 --- a/nix/overlays/lix.nix +++ /dev/null @@ -1,15 +0,0 @@ -(final: prev: { - lix = prev.lix.overrideAttrs (oldAttrs: { - postPatch = (oldAttrs.postPatch or "") + '' - substituteInPlace src/libmain/shared.cc \ - --replace-fail "(Lix, like Nix)" "but for lesbians" - ''; - - # - buildInputs = oldAttrs.buildInputs ++ [ prev.apple-sdk_11 ]; - - # WARNING: This greatly assumes that lix will never merge a CL that breaks - # the tests. But I choose to disable them anyway because the build time is faster - doCheck = false; - }); -}) diff --git a/nix/system/homebrew.nix b/nix/system/homebrew.nix index 9429c6a..813a106 100644 --- a/nix/system/homebrew.nix +++ b/nix/system/homebrew.nix @@ -35,7 +35,6 @@ "poetry" "rustup" "sdl2" - "spicetify-cli" # Fyra crap, but from Homebrew because someone doesn't know how to # package libraries in nixpkgs @@ -59,12 +58,10 @@ "browserstacklocal" "db-browser-for-sqlite" "discord" - # "discord-ptb" "discord@ptb" "docker" "dolphin@dev" "firefox" - # "firefox-developer-edition" "firefox@developer-edition" "goland" "google-chrome" diff --git a/nix/system/nix.nix b/nix/system/nix.nix index b9c7689..69c3c21 100644 --- a/nix/system/nix.nix +++ b/nix/system/nix.nix @@ -4,7 +4,7 @@ services.nix-daemon.enable = true; nix = { - package = inputs.nixpkgs-old.legacyPackages.${pkgs.system}.lix; + # package = inputs.nixpkgs-old.legacyPackages.${pkgs.system}.lix; settings = { # enable flakes and the `nix` command From 8aa4f3b1f6bd5fb93e2b27b713d1b8d2e132ab64 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 10 Dec 2024 11:34:49 +0100 Subject: [PATCH 04/55] [nix] Make PHP nix-managed --- nix/home/packages.nix | 8 ++++++++ nix/system/homebrew.nix | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/home/packages.nix b/nix/home/packages.nix index 877a0ff..032a8d2 100644 --- a/nix/home/packages.nix +++ b/nix/home/packages.nix @@ -1,6 +1,12 @@ { pkgs, ... }: let + phpEnv = pkgs.php.buildEnv { + extensions = ({ enabled, all }: enabled ++ (with all; [ + imagick + ])); + }; + packageSets = with pkgs; { system = [ gnutls @@ -60,6 +66,8 @@ let lua-language-server nil nodejs_22 + phpEnv + phpEnv.packages.composer python2 ruby_3_1 sbcl diff --git a/nix/system/homebrew.nix b/nix/system/homebrew.nix index 813a106..d3ead5b 100644 --- a/nix/system/homebrew.nix +++ b/nix/system/homebrew.nix @@ -20,7 +20,6 @@ brews = [ "bear" "coder" - "composer" "croc" "ddev" "deno" From faae548ae4dbbd9fa7a6adbf4bc409d34a861f29 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 17 Jan 2025 11:25:35 +0100 Subject: [PATCH 05/55] Homebrew cleanup & git delta config --- nix/home/git.nix | 9 ++++++++- nix/system/homebrew.nix | 17 ++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/nix/home/git.nix b/nix/home/git.nix index a429f70..86f5c4e 100644 --- a/nix/home/git.nix +++ b/nix/home/git.nix @@ -19,9 +19,16 @@ delta = { enable = true; options = { + navigate = true; line-numbers = true; features = "decorations"; - syntax-theme = "ansi"; + + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-style = "bold yellow ul"; + file-decoration-style = "none"; + hunk-header-decoration-style = "yellow box"; + }; }; }; diff --git a/nix/system/homebrew.nix b/nix/system/homebrew.nix index d3ead5b..9da93a1 100644 --- a/nix/system/homebrew.nix +++ b/nix/system/homebrew.nix @@ -37,13 +37,13 @@ # Fyra crap, but from Homebrew because someone doesn't know how to # package libraries in nixpkgs - "appstream-glib" - "glib" - "gobject-introspection" - "gsettings-desktop-schemas" - "gtk4" - "gtksourceview5" - "libgee" + # "appstream-glib" + # "glib" + # "gobject-introspection" + # "gsettings-desktop-schemas" + # "gtk4" + # "gtksourceview5" + # "libgee" ]; casks = [ @@ -59,9 +59,9 @@ "discord" "discord@ptb" "docker" - "dolphin@dev" "firefox" "firefox@developer-edition" + "fleet" "goland" "google-chrome" "imhex" @@ -74,7 +74,6 @@ "obs" "orbstack" "phpstorm" - "plexamp" "qbittorrent" "raycast" "readdle-spark" From 62fe63eea2a93431bd2a345b56b31eb554b1144a Mon Sep 17 00:00:00 2001 From: isabel Date: Fri, 17 Jan 2025 13:34:38 +0000 Subject: [PATCH 06/55] refactor: nix mostly small changes to move to a module based strucutre such that you can add more hosts at a later date --- nix/darwin-configuration.nix.bak | 220 ------------------ nix/flake.nix | 84 ++++--- nix/home/alyxia/default.nix | 7 + nix/home/alyxia/git.nix | 51 ++++ nix/home/{ => alyxia}/nvim.nix | 6 +- nix/home/{ => alyxia}/packages.nix | 13 +- nix/home/{ => alyxia}/zsh.nix | 1 - nix/home/default.nix | 18 +- nix/home/git.nix | 49 ---- nix/{system => hosts/alymac}/default.nix | 9 - nix/lib/default.nix | 17 ++ nix/lib/importAll.nix | 36 ++- nix/modules/common/default.nix | 4 + nix/{system => modules/common}/nix.nix | 11 +- nix/modules/common/users.nix | 7 + nix/modules/darwin/default.nix | 4 + nix/{system => modules/darwin}/homebrew.nix | 2 - .../darwin}/preferences.nix | 2 - nix/overlays/.gitkeep | 0 19 files changed, 189 insertions(+), 352 deletions(-) delete mode 100644 nix/darwin-configuration.nix.bak create mode 100644 nix/home/alyxia/default.nix create mode 100644 nix/home/alyxia/git.nix rename nix/home/{ => alyxia}/nvim.nix (89%) rename nix/home/{ => alyxia}/packages.nix (91%) rename nix/home/{ => alyxia}/zsh.nix (99%) delete mode 100644 nix/home/git.nix rename nix/{system => hosts/alymac}/default.nix (80%) create mode 100644 nix/lib/default.nix create mode 100644 nix/modules/common/default.nix rename nix/{system => modules/common}/nix.nix (95%) create mode 100644 nix/modules/common/users.nix create mode 100644 nix/modules/darwin/default.nix rename nix/{system => modules/darwin}/homebrew.nix (99%) rename nix/{system => modules/darwin}/preferences.nix (99%) delete mode 100644 nix/overlays/.gitkeep diff --git a/nix/darwin-configuration.nix.bak b/nix/darwin-configuration.nix.bak deleted file mode 100644 index c73922e..0000000 --- a/nix/darwin-configuration.nix.bak +++ /dev/null @@ -1,220 +0,0 @@ -{ config, pkgs, ... }: - -{ - networking = { - hostName = "alymac"; - }; - - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep wget - environment.systemPackages = with pkgs; [ - # System tools - libtool - pcre - pkg-config - patchelf - gnutls - gsasl - - # CLI tools - act - bat - bitwarden-cli - cloudflared - delta - exa - ffmpeg - fzf - gh - git - git-crypt - gitui - gnupg - jq - kubectl - kubelogin-oidc - mosh - neovim - nixpkgs-fmt - ripgrep - sops - vim - wget - - # Charm tools - skate - soft-serve - - # Programs - jetbrains.idea-ultimate - jetbrains.phpstorm - jetbrains.rider - rectangle - slack - tailscale - - # Programming languages - crystal - deno - dotnet-sdk - go - jdk - nil - nodejs_20 - ruby_3_1 - sbcl - shards - zig - - # Libraries - nodePackages.http-server - nodePackages.pnpm - nodePackages.prettier - nodePackages.yarn - openssl - - # Fyra vala crap - glib - glib-networking - gobject-introspection - gtk4 - libgee - meson - ninja - vala - ]; - - homebrew = { - enable = true; - # If only this didn't break. - onActivation.cleanup = "zap"; - - taps = [ - "drud/ddev" - "homebrew/cask" - "homebrew/cask-versions" - ]; - - # Please do not the brew. - brews = [ - "composer" - "ddev" - "mkcert" - "pkg-config" - "sdl2" - ]; - - casks = [ - "1password" - "1password-cli" - "alt-tab" - "amethyst" - "android-studio" - "audacity" - "background-music" - "db-browser-for-sqlite" - "discord" - "discord-ptb" - "docker" - "emacs" - "fig" - "firefox" - "google-chrome" - "itch" - "iterm2" - "obs" - "raycast" - "sequel-ace" - "shortcat" - "shottr" - "spotify" - "thunderbird" - "visual-studio-code" - ]; - }; - - # Auto upgrade nix package and the daemon service. - services.nix-daemon.enable = true; - - # Configuration for nix itself. - nix = { - package = pkgs.nix; - settings = { - experimental-features = [ "nix-command" "flakes" ]; - build-users-group = "nixbld"; - }; - gc = { - automatic = true; - options = "--delete-older-than 8d"; - }; - }; - - # Create /etc/zshrc that loads the nix-darwin environment. - # I wish I had access to inputs. - programs.zsh = { - enable = true; - promptInit = " - source ~/.dotfiles/zsh/zshrc - "; - }; - - # Used for backwards compatibility, please read the changelog before changing. - # $ darwin-rebuild changelog - system.stateVersion = 4; - - # Absolutely proprietary. - nixpkgs.config.allowUnfree = true; -} - - -# services.yabai = { -# enable = true; -# enableScriptingAddition = true; -# config = { -# layout = "bsp"; -# window_placement = "first_child"; -# auto_balance = "on"; -# -# focus_follows_mouse = "autoraise"; -# -# window_topmost = "on"; -# -# window_opacity = "on"; -# active_window_opacity = "1.0"; -# normal_window_opacity = "0.9"; -# }; -# -# extraConfig = " -# yabai -m signal --add event=dock_did_restart action=\"sudo yabai --load-sa\" -# sudo yabai --load-sa -# "; -# }; -# -# services.skhd = { -# enable = true; -# skhdConfig = " -# # Toggle split -# shift + cmd - enter : /run/current-system/sw/bin/yabai -m window --toggle split -# -# # Focus window -# ctrl + cmd - up : /run/current-system/sw/bin/yabai -m window --focus north -# ctrl + cmd - right : /run/current-system/sw/bin/yabai -m window --focus east -# ctrl + cmd - down : /run/current-system/sw/bin/yabai -m window --focus south -# ctrl + cmd - left : /run/current-system/sw/bin/yabai -m window --focus west -# -# # Move windows -# shift + cmd - left : /run/current-system/sw/bin/yabai -m window --warp west -# shift + cmd - right : /run/current-system/sw/bin/yabai -m window --warp east -# -# # Focus monitor -# ctrl + alt - z : /run/current-system/sw/bin/yabai -m display --focus prev -# -# # Increase window size -# shift + alt - a : /run/current-system/sw/bin/yabai -m window --resize left:-20:0 -# shift + alt - w : /run/current-system/sw/bin/yabai -m window --resize top:0:-20 -# -# # Decrease window size -# shift + cmd - s : /run/current-system/sw/bin/yabai -m window --resize bottom:0:-20 -# shift + cmd - w : /run/current-system/sw/bin/yabai -m window --resize top:0:20 -# "; -# }; diff --git a/nix/flake.nix b/nix/flake.nix index 9128411..6bc803c 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -2,53 +2,49 @@ description = "flake of the lyxer..."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; - darwin.url = "github:lnl7/nix-darwin"; - dotfiles = { - url = "https://github.com/lexisother/dotfiles"; - type = "git"; - submodules = true; - flake = false; - }; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - darwin.inputs.nixpkgs.follows = "nixpkgs"; + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + darwin = { + url = "github:lnl7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + dotfiles = { + url = "https://github.com/lexisother/dotfiles"; + type = "git"; + submodules = true; + flake = false; + }; }; # add the inputs declared above to the argument attribute set - outputs = { self, nixpkgs, home-manager, dotfiles, darwin } @ inputs: let - system = "x86_64-darwin"; - # NOTE: uncomment for overlays if we ever need any - # importAll = path: map - # (p: import (path + ("/" + p))) - # (builtins.attrNames (builtins.readDir path)); - pkgs = import nixpkgs { - inherit system; - # overlays = importAll ./overlays; + outputs = + { + self, + darwin, + ... + }@inputs: + let + lib = import ./lib { inherit inputs; }; + in + { + inherit lib; + + darwinConfigurations.alymac = darwin.lib.darwinSystem { + specialArgs = { inherit lib self inputs; }; + modules = [ + ./modules/common + ./modules/darwin + + ./home + + ./hosts/alymac + ]; + }; }; - libs = with builtins; listToAttrs (map - (path: { - name = replaceStrings [".nix"] [""] path; - value = (import (pkgs.lib.path.append ./lib path)) { inherit pkgs; }; - }) - (attrNames (readDir ./lib))); - in { - darwinConfigurations."alymac" = darwin.lib.darwinSystem { - inherit system; - specialArgs = libs // { inherit inputs; }; - modules = [ - ./system - home-manager.darwinModules.home-manager - { - home-manager = { - extraSpecialArgs = { inherit self dotfiles; } // libs; - useGlobalPkgs = true; - useUserPackages = true; - users.alyxia.imports = [ ./home ]; - }; - } - ]; - }; - }; } diff --git a/nix/home/alyxia/default.nix b/nix/home/alyxia/default.nix new file mode 100644 index 0000000..5dea2d8 --- /dev/null +++ b/nix/home/alyxia/default.nix @@ -0,0 +1,7 @@ +{ lib, ... }: + +{ + imports = lib.importAll [ ] ./.; + + home.stateVersion = "24.05"; +} diff --git a/nix/home/alyxia/git.nix b/nix/home/alyxia/git.nix new file mode 100644 index 0000000..f69e8f6 --- /dev/null +++ b/nix/home/alyxia/git.nix @@ -0,0 +1,51 @@ +{ pkgs, ... }: + +{ + programs = { + git = { + enable = true; + package = pkgs.gitAndTools.gitFull; # contains git send-email et al + + userName = "Alyxia Sother"; + userEmail = "alyxia@riseup.net"; + signing = { + key = "01E16C4E775A37E4"; + signByDefault = true; + }; + + ignores = [ + ".DS_Store" + ]; + + delta = { + enable = true; + options = { + navigate = true; + line-numbers = true; + features = "decorations"; + + decorations = { + commit-decoration-style = "bold yellow box ul"; + file-style = "bold yellow ul"; + file-decoration-style = "none"; + hunk-header-decoration-style = "yellow box"; + }; + }; + }; + + extraConfig = { + init.defaultBranch = "master"; + }; + }; + + gh = { + enable = true; + # Why the *fuck* are these packages as opposed to GitHub links??? + extensions = with pkgs; [ + gh-actions-cache + ]; + }; + + gitui.enable = true; + }; +} diff --git a/nix/home/nvim.nix b/nix/home/alyxia/nvim.nix similarity index 89% rename from nix/home/nvim.nix rename to nix/home/alyxia/nvim.nix index efbb5b5..e051cdc 100644 --- a/nix/home/nvim.nix +++ b/nix/home/alyxia/nvim.nix @@ -1,5 +1,4 @@ { self, pkgs, ... }: - { programs.neovim = { enable = true; @@ -29,7 +28,10 @@ command = "rescript-language-server"; args = [ "--node-ipc" ]; filetypes = [ "rescript" ]; - rootPatterns = [ "rescript.json" "bsconfig.json" ]; + rootPatterns = [ + "rescript.json" + "bsconfig.json" + ]; }; }; }; diff --git a/nix/home/packages.nix b/nix/home/alyxia/packages.nix similarity index 91% rename from nix/home/packages.nix rename to nix/home/alyxia/packages.nix index 032a8d2..857b934 100644 --- a/nix/home/packages.nix +++ b/nix/home/alyxia/packages.nix @@ -2,13 +2,16 @@ let phpEnv = pkgs.php.buildEnv { - extensions = ({ enabled, all }: enabled ++ (with all; [ - imagick - ])); + extensions = + { enabled, all }: + enabled + ++ (with all; [ + imagick + ]); }; packageSets = with pkgs; { - system = [ + system = [ gnutls gsasl libtool @@ -95,8 +98,8 @@ let distro ]; }; - everything = builtins.concatLists (builtins.attrValues packageSets); + everything = builtins.concatLists (builtins.attrValues packageSets); in { home.packages = everything; diff --git a/nix/home/zsh.nix b/nix/home/alyxia/zsh.nix similarity index 99% rename from nix/home/zsh.nix rename to nix/home/alyxia/zsh.nix index f9922b1..8dd4a48 100644 --- a/nix/home/zsh.nix +++ b/nix/home/alyxia/zsh.nix @@ -1,5 +1,4 @@ { self, ... }: - { programs.zsh = { enable = true; diff --git a/nix/home/default.nix b/nix/home/default.nix index 14146e1..b772934 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -1,7 +1,17 @@ -{ importAll, ... }: - +{ inputs, self, ... }: { - imports = importAll [] ./.; + imports = [ inputs.home-manager.darwinModules.home-manager ]; - home.stateVersion = "24.05"; + config = { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + + extraSpecialArgs = { + inherit self inputs; + }; + + users.alyxia = ./home; + }; + }; } diff --git a/nix/home/git.nix b/nix/home/git.nix deleted file mode 100644 index 86f5c4e..0000000 --- a/nix/home/git.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ pkgs, ... }: - -{ - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; # contains git send-email et al - - userName = "Alyxia Sother"; - userEmail = "alyxia@riseup.net"; - signing = { - key = "01E16C4E775A37E4"; - signByDefault = true; - }; - - ignores = [ - ".DS_Store" - ]; - - delta = { - enable = true; - options = { - navigate = true; - line-numbers = true; - features = "decorations"; - - decorations = { - commit-decoration-style = "bold yellow box ul"; - file-style = "bold yellow ul"; - file-decoration-style = "none"; - hunk-header-decoration-style = "yellow box"; - }; - }; - }; - - extraConfig = { - init.defaultBranch = "master"; - }; - }; - - programs.gh = { - enable = true; - # Why the *fuck* are these packages as opposed to GitHub links??? - extensions = with pkgs; [ - gh-actions-cache - ]; - }; - - programs.gitui.enable = true; -} diff --git a/nix/system/default.nix b/nix/hosts/alymac/default.nix similarity index 80% rename from nix/system/default.nix rename to nix/hosts/alymac/default.nix index 1b80095..be0d18a 100644 --- a/nix/system/default.nix +++ b/nix/hosts/alymac/default.nix @@ -1,8 +1,4 @@ -{ importAll, ... }: - { - imports = importAll [] ./.; - system.stateVersion = 5; networking = { @@ -11,11 +7,6 @@ localHostName = "alymac"; }; - users.users.alyxia = { - name = "alyxia"; - home = "/Users/alyxia"; - }; - # enable the gpg agent by default programs.gnupg.agent.enable = true; diff --git a/nix/lib/default.nix b/nix/lib/default.nix new file mode 100644 index 0000000..58d9962 --- /dev/null +++ b/nix/lib/default.nix @@ -0,0 +1,17 @@ +{ inputs }: +let + lib0 = inputs.nixpkgs.lib; + + myLib = lib0.makeExtensible ( + self: + let + callLib = file: import file { lib = self; }; + in + { + importAll = callLib ./importAll.nix; + } + ); + + lib = myLib.extend (_: _: lib0); +in +lib diff --git a/nix/lib/importAll.nix b/nix/lib/importAll.nix index 2db75b0..770bbe6 100644 --- a/nix/lib/importAll.nix +++ b/nix/lib/importAll.nix @@ -1,15 +1,31 @@ -{ pkgs, ... }: +{ lib }: +let + inherit (lib) + map + filter + path + attrNames + filterAttrs + pathExists + elem + match + ; -exclude: cwd: with builtins; with pkgs.lib; filter - (e: !elem e exclude) - (map - (p: path.append cwd p) - (attrNames (attrsets.filterAttrs - (p: t: + inherit (builtins) readDir baseNameOf; +in +exclude: cwd: +filter (e: !elem e exclude) ( + map (p: path.append cwd p) ( + attrNames ( + filterAttrs ( + p: t: let d = t == "directory"; b = baseNameOf p; in - d && pathExists (path.append cwd (p + "/default.nix")) || - !d && match ''.*\.nix'' b != null && b != "default.nix") - (readDir cwd)))) + d && pathExists (path.append cwd (p + "/default.nix")) + || !d && match ''.*\.nix'' b != null && b != "default.nix" + ) (readDir cwd) + ) + ) +) diff --git a/nix/modules/common/default.nix b/nix/modules/common/default.nix new file mode 100644 index 0000000..8bdc9b3 --- /dev/null +++ b/nix/modules/common/default.nix @@ -0,0 +1,4 @@ +{ lib, ... }: +{ + imports = lib.importAll [ ] ./.; +} diff --git a/nix/system/nix.nix b/nix/modules/common/nix.nix similarity index 95% rename from nix/system/nix.nix rename to nix/modules/common/nix.nix index 69c3c21..fe3bce3 100644 --- a/nix/system/nix.nix +++ b/nix/modules/common/nix.nix @@ -1,5 +1,4 @@ -{ inputs, pkgs, ... }: - +{ pkgs, ... }: { services.nix-daemon.enable = true; @@ -8,7 +7,10 @@ settings = { # enable flakes and the `nix` command - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; # disable the flake registry since it worsens perf flake-registry = pkgs.writers.writeJSON "flakes-empty.json" { @@ -19,7 +21,7 @@ # "apply the free optimisations" # auto-optimise-store = true; - # we need to create some trusted and allwed users so that we can use + # we need to create some trusted and allwed users so that we can use # some features like substituters allowed-users = [ "@wheel" # allow sudo users to mark the following values as trusted @@ -66,6 +68,7 @@ "lexisother.cachix.org-1:/JtVjLzEue9SHlXK0O4ogtZpRpzeLqTwfZpfTIN/N2s=" ]; }; + gc = { automatic = true; options = "--delete-older-than 3d"; diff --git a/nix/modules/common/users.nix b/nix/modules/common/users.nix new file mode 100644 index 0000000..cf7317b --- /dev/null +++ b/nix/modules/common/users.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: +{ + users.users.alyxia = { + name = "alyxia"; + home = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/alyxia" else "/home/alyxia"; + }; +} diff --git a/nix/modules/darwin/default.nix b/nix/modules/darwin/default.nix new file mode 100644 index 0000000..8bdc9b3 --- /dev/null +++ b/nix/modules/darwin/default.nix @@ -0,0 +1,4 @@ +{ lib, ... }: +{ + imports = lib.importAll [ ] ./.; +} diff --git a/nix/system/homebrew.nix b/nix/modules/darwin/homebrew.nix similarity index 99% rename from nix/system/homebrew.nix rename to nix/modules/darwin/homebrew.nix index 9da93a1..a2b19df 100644 --- a/nix/system/homebrew.nix +++ b/nix/modules/darwin/homebrew.nix @@ -1,5 +1,3 @@ -{ ... }: - { homebrew = { enable = true; diff --git a/nix/system/preferences.nix b/nix/modules/darwin/preferences.nix similarity index 99% rename from nix/system/preferences.nix rename to nix/modules/darwin/preferences.nix index 1a81b3c..c56c187 100644 --- a/nix/system/preferences.nix +++ b/nix/modules/darwin/preferences.nix @@ -1,5 +1,3 @@ -{ ... }: - { system.defaults = { ActivityMonitor = { diff --git a/nix/overlays/.gitkeep b/nix/overlays/.gitkeep deleted file mode 100644 index e69de29..0000000 From c6c04ec51e071ae10680d4a4f7bc7bb24ae73090 Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 20 Jan 2025 13:31:28 +0000 Subject: [PATCH 07/55] fix: misc --- nix/home/default.nix | 2 +- nix/hosts/alymac/default.nix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/home/default.nix b/nix/home/default.nix index b772934..170bacc 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -11,7 +11,7 @@ inherit self inputs; }; - users.alyxia = ./home; + users.alyxia = ./alyxia; }; }; } diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index be0d18a..dab5f82 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -16,4 +16,7 @@ # tailscaled isn't automatically registered as a service that should run on installation. services.tailscale.enable = true; + + # set nixpkgs system + nixpkgs.hostPlatform = "x86_64-darwin"; } From f46850b96496cbca929917c8db0a9ca426c68a6f Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 20 Jan 2025 13:46:26 +0000 Subject: [PATCH 08/55] chore: don't build docs since it causes failures --- nix/home/alyxia/docs.nix | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 nix/home/alyxia/docs.nix diff --git a/nix/home/alyxia/docs.nix b/nix/home/alyxia/docs.nix new file mode 100644 index 0000000..22c8c7f --- /dev/null +++ b/nix/home/alyxia/docs.nix @@ -0,0 +1,8 @@ +{ lib, ... }: +{ + manual = lib.mapAttrs (_: lib.mkForce) { + html.enable = false; + json.enable = false; + manpages.enable = false; + }; +} From 8a22bbd9fdeb3fe2bad5583fc7f8af8ac1899877 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 20 Jan 2025 15:03:28 +0100 Subject: [PATCH 09/55] [nix] Install CLion --- nix/modules/darwin/homebrew.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/modules/darwin/homebrew.nix b/nix/modules/darwin/homebrew.nix index a2b19df..444a62e 100644 --- a/nix/modules/darwin/homebrew.nix +++ b/nix/modules/darwin/homebrew.nix @@ -53,6 +53,7 @@ "audacity" "background-music" "browserstacklocal" + "clion" "db-browser-for-sqlite" "discord" "discord@ptb" From e8a7ffbbde8e6a57f155a4816865aa00c2ab38fd Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 17 Apr 2025 19:38:57 +0200 Subject: [PATCH 10/55] [nix] Some misc updates --- nix/flake.lock | 27 ++++++++++++++------------- nix/flake.nix | 2 +- nix/home/alyxia/packages.nix | 5 +++-- nix/home/alyxia/syncthing.nix | 9 +++++++++ nix/modules/darwin/homebrew.nix | 3 +++ 5 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 nix/home/alyxia/syncthing.nix diff --git a/nix/flake.lock b/nix/flake.lock index bbcbb81..81f346d 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -7,15 +7,16 @@ ] }, "locked": { - "lastModified": 1733351379, - "narHash": "sha256-MTMsAhXxMMVHVN99jT8E0afOAOtt3JQWjYpTja94PAU=", + "lastModified": 1743127615, + "narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "55d07816a0944f06a9df5ef174999a72fa4060c7", + "rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c", "type": "github" }, "original": { "owner": "lnl7", + "ref": "nix-darwin-24.11", "repo": "nix-darwin", "type": "github" } @@ -23,11 +24,11 @@ "dotfiles": { "flake": false, "locked": { - "lastModified": 1722930651, - "narHash": "sha256-nPIXYsbVrXBZRD9VppUGZMlgb622MJHZXuXNrlvCQe8=", + "lastModified": 1737381808, + "narHash": "sha256-8iX9gv7R/bpmwr5aedF8Dl6tgKo+bKNyXV2MLp8AyGE=", "ref": "refs/heads/master", - "rev": "bfe8d9ed9f632c952901bc64bc5142ea85c8313d", - "revCount": 483, + "rev": "8a22bbd9fdeb3fe2bad5583fc7f8af8ac1899877", + "revCount": 494, "submodules": true, "type": "git", "url": "https://github.com/lexisother/dotfiles" @@ -45,11 +46,11 @@ ] }, "locked": { - "lastModified": 1733050161, - "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", + "lastModified": 1744743431, + "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", "owner": "nix-community", "repo": "home-manager", - "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", + "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", "type": "github" }, "original": { @@ -61,11 +62,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733326450, - "narHash": "sha256-hBG6Ix5ZzXCJoanrPOLtQRalYv6nnDu9AZeamRfjKJ8=", + "lastModified": 1744492897, + "narHash": "sha256-qqKO4FOo/vPmNIaRPcLqwfudUlQ29iNdI1IbCZfjmxs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f9ef77eb704d063bfbff7f04531a0b325cc1a18f", + "rev": "86484f6076aac9141df2bfcddbf7dcfce5e0c6bb", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index 6bc803c..a656bc2 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -10,7 +10,7 @@ }; darwin = { - url = "github:lnl7/nix-darwin"; + url = "github:lnl7/nix-darwin/nix-darwin-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/nix/home/alyxia/packages.nix b/nix/home/alyxia/packages.nix index 857b934..07f15c1 100644 --- a/nix/home/alyxia/packages.nix +++ b/nix/home/alyxia/packages.nix @@ -23,7 +23,6 @@ let base = [ act bat - # bitwarden-cli cachix cloudflared delta @@ -34,10 +33,11 @@ let git-crypt gitui gnupg - # jq + imagemagick kubectl kubelogin-oidc mosh + nix-init nixd nixpkgs-fmt pandoc @@ -62,6 +62,7 @@ let dhall dhall-json dhall-lsp-server + ghostscript go jdk kotlin diff --git a/nix/home/alyxia/syncthing.nix b/nix/home/alyxia/syncthing.nix new file mode 100644 index 0000000..9c5cae9 --- /dev/null +++ b/nix/home/alyxia/syncthing.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + services = { + syncthing = { + enable = true; + }; + }; +} diff --git a/nix/modules/darwin/homebrew.nix b/nix/modules/darwin/homebrew.nix index 444a62e..beb98d9 100644 --- a/nix/modules/darwin/homebrew.nix +++ b/nix/modules/darwin/homebrew.nix @@ -23,7 +23,9 @@ "deno" "dotnet" "ferium" + "gcc@12" "gradle" + "ijq" "kubelogin" "mkcert" "nss" @@ -71,6 +73,7 @@ "lens" "minecraft" "obs" + "obsidian" "orbstack" "phpstorm" "qbittorrent" From 592f10ba622ba98f56e8a14471d14872f9815325 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 17 Apr 2025 19:39:18 +0200 Subject: [PATCH 11/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 6676f24..c5f89fc 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 6676f249fb50421a457da1cddd2682c80b8669ab +Subproject commit c5f89fc7e9babd29b2cce9c0e6e399b548420d10 From 1742107413f025dff54750d930527260bca31f64 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 17 Apr 2025 19:39:48 +0200 Subject: [PATCH 12/55] [nvim] Move coc-languages and fix lualine theme --- nvim/{ => dotfiles}/coc-languages/go.vim | 0 .../coc-languages/javascript.vim | 0 nvim/{ => dotfiles}/coc-languages/lisp.vim | 0 nvim/{ => dotfiles}/coc-languages/lua.vim | 0 nvim/{ => dotfiles}/coc-languages/php.vim | 0 nvim/{ => dotfiles}/coc-languages/sh.vim | 0 nvim/{ => dotfiles}/coc-languages/tex.vim | 0 nvim/plugin/lualine.lua | 25 +++++++++---------- 8 files changed, 12 insertions(+), 13 deletions(-) rename nvim/{ => dotfiles}/coc-languages/go.vim (100%) rename nvim/{ => dotfiles}/coc-languages/javascript.vim (100%) rename nvim/{ => dotfiles}/coc-languages/lisp.vim (100%) rename nvim/{ => dotfiles}/coc-languages/lua.vim (100%) rename nvim/{ => dotfiles}/coc-languages/php.vim (100%) rename nvim/{ => dotfiles}/coc-languages/sh.vim (100%) rename nvim/{ => dotfiles}/coc-languages/tex.vim (100%) diff --git a/nvim/coc-languages/go.vim b/nvim/dotfiles/coc-languages/go.vim similarity index 100% rename from nvim/coc-languages/go.vim rename to nvim/dotfiles/coc-languages/go.vim diff --git a/nvim/coc-languages/javascript.vim b/nvim/dotfiles/coc-languages/javascript.vim similarity index 100% rename from nvim/coc-languages/javascript.vim rename to nvim/dotfiles/coc-languages/javascript.vim diff --git a/nvim/coc-languages/lisp.vim b/nvim/dotfiles/coc-languages/lisp.vim similarity index 100% rename from nvim/coc-languages/lisp.vim rename to nvim/dotfiles/coc-languages/lisp.vim diff --git a/nvim/coc-languages/lua.vim b/nvim/dotfiles/coc-languages/lua.vim similarity index 100% rename from nvim/coc-languages/lua.vim rename to nvim/dotfiles/coc-languages/lua.vim diff --git a/nvim/coc-languages/php.vim b/nvim/dotfiles/coc-languages/php.vim similarity index 100% rename from nvim/coc-languages/php.vim rename to nvim/dotfiles/coc-languages/php.vim diff --git a/nvim/coc-languages/sh.vim b/nvim/dotfiles/coc-languages/sh.vim similarity index 100% rename from nvim/coc-languages/sh.vim rename to nvim/dotfiles/coc-languages/sh.vim diff --git a/nvim/coc-languages/tex.vim b/nvim/dotfiles/coc-languages/tex.vim similarity index 100% rename from nvim/coc-languages/tex.vim rename to nvim/dotfiles/coc-languages/tex.vim diff --git a/nvim/plugin/lualine.lua b/nvim/plugin/lualine.lua index d281582..662fc4e 100644 --- a/nvim/plugin/lualine.lua +++ b/nvim/plugin/lualine.lua @@ -3,10 +3,9 @@ local theme = require'dotfiles.colorscheme' -- https://github.com/dmitmel/dotfiles/commit/bf96e553764e3a166286f5a6a8017e01dadcf6f9 -- https://ptb.discord.com/channels/382339402338402315/382339402338402317/885864846892077086 -function get_color(index) +local function get_color(index) local color = theme.base16_colors[index] - local r, g, b = unpack(color, 1, 3) - return string.format('#%02x%02x%02x', r, g, b) + return color.gui end -- Structure of themes is as follows: @@ -14,21 +13,21 @@ end -- b: secondary components, such git branch info -- c: Middle components, basically everything in the middle -dotfiles_gruv.normal.a.bg = get_color(12) +dotfiles_gruv.normal.a.bg = get_color(11) -dotfiles_gruv.insert.a.bg = get_color(14) -dotfiles_gruv.insert.c.bg = get_color(2) +dotfiles_gruv.insert.a.bg = get_color(13) +dotfiles_gruv.insert.c.bg = get_color(1) -dotfiles_gruv.visual.a.bg = get_color(15) -dotfiles_gruv.visual.c.bg = get_color(2) -dotfiles_gruv.visual.c.fg = get_color(7) +dotfiles_gruv.visual.a.bg = get_color(14) +dotfiles_gruv.visual.c.bg = get_color(1) +dotfiles_gruv.visual.c.fg = get_color(6) -dotfiles_gruv.command.a.bg = get_color(16) +dotfiles_gruv.command.a.bg = get_color(15) dotfiles_gruv.command.c.bg = get_color(2) -dotfiles_gruv.command.c.fg = get_color(7) +dotfiles_gruv.command.c.fg = get_color(6) -dotfiles_gruv.replace.a.bg = get_color(9) -dotfiles_gruv.replace.c.bg = get_color(2) +dotfiles_gruv.replace.a.bg = get_color(8) +dotfiles_gruv.replace.c.bg = get_color(1) -- Displays the currently selected Arduino board local function showBoard() From 37b24e287d5c216aa02e66ed26cc52d10a2e6d0c Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 17 Apr 2025 19:40:07 +0200 Subject: [PATCH 13/55] [zsh] Add a craft alias if DDEV is installed --- zsh/aliases.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index f765f91..60688fc 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -3,6 +3,12 @@ alias markdown2htmldoc="$K_ZSH_DOTFILES/../scripts/markdown2htmldoc" alias mediawiki-preview="$K_ZSH_DOTFILES/../scripts/mediawiki-preview" alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail' +if command_exists ddev; then + function craft() { + [ -f craft ] && ddev craft $@ || return 1 + } +fi + if (( _is_macos )); then if command_exists exa; then alias ls="exa --classify --group-directories-first" From cf36a1a6e50defb74a69edc7cf4fdc98194cce80 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 15:37:17 +0200 Subject: [PATCH 14/55] [common] Add my Brewfile --- common/Brewfile | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 common/Brewfile diff --git a/common/Brewfile b/common/Brewfile new file mode 100644 index 0000000..5b787ad --- /dev/null +++ b/common/Brewfile @@ -0,0 +1,102 @@ +# Taps {{{ + tap "ddev/ddev" + tap "the-wineskin-project/wineskin" +# }}} + +# Background services {{{ + brew "syncthing", restart_service: :changed + brew "tailscale", restart_service: :changed +# }}} + +# Brews {{{ + # System {{{ + brew "gcc@12" + brew "mkcert" + brew "nss" + brew "pinentry-mac" + brew "pkg-config" + brew "sdl2" + # }}} + + # Languages {{{ + brew "bash-language-server" + brew "dotnet" + brew "gradle" + brew "node" + brew "poetry" + brew "dhall" + brew "dhall-json" + brew "dhall-lsp-server" + brew "go" + brew "openjdk" + brew "kotlin" + brew "lua-language-server" + brew "php" + brew "composer" + brew "ruby" + # }}} + + # Tools {{{ + brew "bat" + brew "bear" + brew "coder" + brew "croc" + brew "ddev/ddev/ddev" + brew "ijq" + brew "neovim" + brew "git-delta" + brew "act" + brew "eza" + brew "ffmpeg" + brew "fzf" + brew "gh" + brew "git-crypt" + brew "gitui" + brew "gnupg" + brew "imagemagick" + brew "kubernetes-cli" + brew "pandoc" + brew "ripgrep" + brew "sops" + brew "wget" + # }}} +# }}} + +# Casks {{{ +cask "1password" +cask "1password-cli" +cask "alt-tab" +cask "android-studio" +cask "browserstacklocal" +cask "db-browser-for-sqlite" +cask "discord" +cask "discord@ptb" +cask "firefox@developer-edition" +cask "fleet" +cask "font-jetbrains-mono-nerd-font" +cask "font-ibm-plex" +cask "goland" +cask "imhex" +cask "insomnia" +cask "intellij-idea" +cask "iterm2" +cask "kitty" +cask "lens" +cask "obs" +cask "obsidian" +cask "orbstack" +cask "phpstorm" +cask "qbittorrent" +cask "raycast" +cask "rider" +cask "rubymine" +cask "sequel-ace" +cask "shottr" +cask "slack" +cask "spotify" +cask "steam" +cask "thunderbird" +cask "transmit" +cask "visual-studio-code" +cask "rectangle" +# }}} From 64a9781eb7aec19e42e8d5776bba200876f11c0a Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 15:38:06 +0200 Subject: [PATCH 15/55] [zsh] Add a function for restoring backed up .envs --- zsh/functions.zsh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index c47c5e6..e87cbb6 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -1,3 +1,29 @@ #!/usr/bin/env zsh -# + silence() { $1 &>/dev/null } + +# Utility for recovering environment variable files when moving devices, +# provided they are in a central backup dir +function recover-env() { + local PWD="$(pwd)" + local backup_dir="$HOME/Documents/envs" + + if ! [ -d "$backup_dir" ]; then + echo "No backup dir found. Bailing." + return 1 + fi + + local project="$1" + if [ "$#" -eq 0 ] || [ -z "$1" ]; then + echo "No arguments specified, using current folder as project name." + local project="$(basename "$PWD")" + fi + + if ! [ -f "$backup_dir/$project.env" ]; then + echo "No .env file for this project found. Bailing." + return 1 + fi + + cp "$backup_dir/$project.env" "$PWD/.env" + echo "$project.env restored to .env" +} From 3e53a55465cc82803523c8237495274049748929 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 16:43:14 +0200 Subject: [PATCH 16/55] [common] Refactor the Brewfile to be nicer --- common/Brewfile | 225 +++++++++++++++++++++++++++--------------------- 1 file changed, 126 insertions(+), 99 deletions(-) diff --git a/common/Brewfile b/common/Brewfile index 5b787ad..2d7a4c1 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -1,102 +1,129 @@ -# Taps {{{ - tap "ddev/ddev" - tap "the-wineskin-project/wineskin" +# Utils {{{ +def flatten_brews(brews) + brews.flat_map do |category, brew_list| + brew_list.map do |brew| + if brew.is_a?(Hash) + brew.to_a.first # Extract the package name and options from the hash + else + [brew, {}] # No options, so use an empty hash + end + end + end +end + +def liftoff(root) + root[:taps].each do |name| + tap name + end + + flatten_brews(root[:brews]).each do |pkg, opts| + brew(pkg, opts) + end + + root[:casks].each do |name| + cask name + end +end # }}} -# Background services {{{ - brew "syncthing", restart_service: :changed - brew "tailscale", restart_service: :changed -# }}} +packages = { + taps: [ + "ddev/ddev", + "the-wineskin-project/wineskin" + ], + brews: { # {{{ + services: [ + { "syncthing" => { restart_service: :changed } }, + { "tailscale" => { restart_service: :changed } } + ], + system: [ + "gcc@12", + "mkcert", + "nss", + "pinentry-mac", + "pkg-config", + "sdl2" + ], + languages: [ + "bash-language-server" + "dotnet" + "gradle" + "node" + "poetry" + "dhall" + "dhall-json" + "dhall-lsp-server" + "go" + "openjdk" + "kotlin" + "lua-language-server" + "php" + "composer" + "ruby" + ], + tools: [ + "bat" + "bear" + "coder" + "croc" + "ddev/ddev/ddev" + "ijq" + "neovim" + "git-delta" + "act" + "eza" + "ffmpeg" + "fzf" + "gh" + "git-crypt" + "gitui" + "gnupg" + "imagemagick" + "kubernetes-cli" + "pandoc" + "ripgrep" + "sops" + "wget" + ] + }, # }}} + casks: [ # {{{ + "1password" + "1password-cli" + "alt-tab" + "android-studio" + "browserstacklocal" + "db-browser-for-sqlite" + "discord" + "discord@ptb" + "firefox@developer-edition" + "fleet" + "font-jetbrains-mono-nerd-font" + "font-ibm-plex" + "goland" + "imhex" + "insomnia" + "intellij-idea" + "iterm2" + "kitty" + "lens" + "obs" + "obsidian" + "orbstack" + "phpstorm" + "qbittorrent" + "raycast" + "rider" + "rubymine" + "sequel-ace" + "shottr" + "slack" + "spotify" + "steam" + "thunderbird" + "transmit" + "visual-studio-code" + "rectangle" + ] # }}} +} -# Brews {{{ - # System {{{ - brew "gcc@12" - brew "mkcert" - brew "nss" - brew "pinentry-mac" - brew "pkg-config" - brew "sdl2" - # }}} - - # Languages {{{ - brew "bash-language-server" - brew "dotnet" - brew "gradle" - brew "node" - brew "poetry" - brew "dhall" - brew "dhall-json" - brew "dhall-lsp-server" - brew "go" - brew "openjdk" - brew "kotlin" - brew "lua-language-server" - brew "php" - brew "composer" - brew "ruby" - # }}} - - # Tools {{{ - brew "bat" - brew "bear" - brew "coder" - brew "croc" - brew "ddev/ddev/ddev" - brew "ijq" - brew "neovim" - brew "git-delta" - brew "act" - brew "eza" - brew "ffmpeg" - brew "fzf" - brew "gh" - brew "git-crypt" - brew "gitui" - brew "gnupg" - brew "imagemagick" - brew "kubernetes-cli" - brew "pandoc" - brew "ripgrep" - brew "sops" - brew "wget" - # }}} -# }}} - -# Casks {{{ -cask "1password" -cask "1password-cli" -cask "alt-tab" -cask "android-studio" -cask "browserstacklocal" -cask "db-browser-for-sqlite" -cask "discord" -cask "discord@ptb" -cask "firefox@developer-edition" -cask "fleet" -cask "font-jetbrains-mono-nerd-font" -cask "font-ibm-plex" -cask "goland" -cask "imhex" -cask "insomnia" -cask "intellij-idea" -cask "iterm2" -cask "kitty" -cask "lens" -cask "obs" -cask "obsidian" -cask "orbstack" -cask "phpstorm" -cask "qbittorrent" -cask "raycast" -cask "rider" -cask "rubymine" -cask "sequel-ace" -cask "shottr" -cask "slack" -cask "spotify" -cask "steam" -cask "thunderbird" -cask "transmit" -cask "visual-studio-code" -cask "rectangle" -# }}} +liftoff packages From 52d0f41563d6bca1d493514ca8bcf08a5b69b8b0 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 17:12:20 +0200 Subject: [PATCH 17/55] [*] Namespacing changes --- nvim/after/ftplugin/dream.vim | 2 +- nvim/init.vim | 6 +++--- zsh/aliases.zsh | 6 +++--- zsh/zshrc | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nvim/after/ftplugin/dream.vim b/nvim/after/ftplugin/dream.vim index 50703e1..51638a8 100644 --- a/nvim/after/ftplugin/dream.vim +++ b/nvim/after/ftplugin/dream.vim @@ -1 +1 @@ -execute 'source' fnameescape(g:k_dotfiles_dir) . '/dmitmel-dotfiles/nvim/after/ftplugin/text.vim' +execute 'source' fnameescape(g:a_dotfiles_dir) . '/dmitmel-dotfiles/nvim/after/ftplugin/text.vim' diff --git a/nvim/init.vim b/nvim/init.vim index d16d87e..4d9ab88 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,6 +1,6 @@ -let g:k_nvim_dotfiles_dir = expand(':p:h') -let g:k_dotfiles_dir = expand(':p:h:h') -let &runtimepath = g:k_nvim_dotfiles_dir.','.&runtimepath.','.g:k_nvim_dotfiles_dir.'/after' +let g:a_nvim_dotfiles_dir = expand(':p:h') +let g:a_dotfiles_dir = expand(':p:h:h') +let &runtimepath = g:a_nvim_dotfiles_dir.','.&runtimepath.','.g:a_nvim_dotfiles_dir.'/after' let g:vim_ide = 1 let g:dotfiles_rainbow_indent_opacity = 0.5 diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 60688fc..a575520 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -1,6 +1,6 @@ -alias welcome="welcome --extra-logos-dir $K_ZSH_DOTFILES/../script-resources/welcome/logos" -alias markdown2htmldoc="$K_ZSH_DOTFILES/../scripts/markdown2htmldoc" -alias mediawiki-preview="$K_ZSH_DOTFILES/../scripts/mediawiki-preview" +alias welcome="welcome --extra-logos-dir $A_ZSH_DOTFILES/../script-resources/welcome/logos" +alias markdown2htmldoc="$A_ZSH_DOTFILES/../scripts/markdown2htmldoc" +alias mediawiki-preview="$A_ZSH_DOTFILES/../scripts/mediawiki-preview" alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail' if command_exists ddev; then diff --git a/zsh/zshrc b/zsh/zshrc index 4a43f8a..db1afc0 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -5,15 +5,15 @@ DOTFILES_DISABLE_WELCOME=1 DOTFILES_SYNC_LAST_WORKING_DIR=1 # Get this file's current directory and source Dima's zshrc from there -K_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" -source $K_ZSH_DOTFILES/../dmitmel-dotfiles/zsh/zshrc +A_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" +source $A_ZSH_DOTFILES/../dmitmel-dotfiles/zsh/zshrc for script in functions plugins aliases; do - source "$K_ZSH_DOTFILES/$script.zsh" + source "$A_ZSH_DOTFILES/$script.zsh" done -if [[ -d "$K_ZSH_DOTFILES/custom" ]]; then - for script in $K_ZSH_DOTFILES/custom/*.zsh; do +if [[ -d "$A_ZSH_DOTFILES/custom" ]]; then + for script in $A_ZSH_DOTFILES/custom/*.zsh; do source "$script" done fi From b7fca107f7b53327ecf71ea61ed9ae2d6f426128 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 17:12:45 +0200 Subject: [PATCH 18/55] [nvim] Do a full pass of the plugin list --- nvim/dotfiles/plugins-list.vim | 42 +++++++++++++--------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index 259f3e4..c2d76ab 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -1,5 +1,3 @@ -let s:plug = funcref('dotfiles#plugman#register') - " UI {{{ if has('nvim') call s:plug('romgrk/barbar.nvim') @@ -9,9 +7,11 @@ let s:plug = funcref('dotfiles#plugman#register') " Navigation {{{ if has('nvim') - call s:plug('nvim-telescope/telescope.nvim') " dependencies {{{ - call s:plug('nvim-lua/plenary.nvim') - " }}} + call s:plug('nvim-telescope/telescope.nvim', { +\ 'requires': [ +\ 'nvim-lua/plenary.nvim' +\ ] +\ }) endif " }}} @@ -26,32 +26,28 @@ let s:plug = funcref('dotfiles#plugman#register') " Language specific {{{ if has('nvim') - call s:plug('xiyaowong/coc-nvim-lua') - call s:plug('alaviss/nim.nvim') if has('unix') - call s:plug('nvim-neorg/neorg') " dependencies {{{ - call s:plug('nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }) - " }}} + call s:plug('nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }) endif endif call s:plug('lervag/vimtex') call s:plug('stevearc/vim-arduino') - call s:plug('luke-gru/vim-riml') - call s:plug('guns/vim-sexp') - call s:plug('vim-scripts/newlisp') call s:plug('m-pilia/vim-mediawiki') call s:plug('aquach/vim-mediawiki-editor') - call s:plug('noahfrederick/vim-laravel') " dependencies {{{ - call s:plug('noahfrederick/vim-composer') - call s:plug('tpope/vim-projectionist') - call s:plug('tpope/vim-dispatch') - " }}} - call s:plug('rescript-lang/vim-rescript') + call s:plug('noahfrederick/vim-laravel', { +\ 'requires': [ +\ 'noahfrederick/vim-composer', +\ 'tpope/vim-projectionist', +\ 'tpope/vim-dispatch' +\ ] +\ }) " }}} " coc {{{ if g:dotfiles_build_coc_from_source - call s:plug('https://github.com/UltiRequiem/coc-cl', { 'do': 'yarn install --frozen-lockfile && yarn build' }) + call s:plug('https://github.com/UltiRequiem/coc-cl', { +\ 'do': 'yarn install --frozen-lockfile && yarn build' +\ }) endif " }}} @@ -60,12 +56,6 @@ let s:plug = funcref('dotfiles#plugman#register') " }}} " Misc {{{ - if has('nvim') - call s:plug('andweeb/presence.nvim') - if has('nvim-0.6.0') - call s:plug('github/copilot.vim') - endif - endif call s:plug('junegunn/vader.vim') call s:plug('wakatime/vim-wakatime') " }}} From 632fdb23ce86573c2541a6f61773a2a46cf28209 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 17:13:04 +0200 Subject: [PATCH 19/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index c5f89fc..c00fdcc 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit c5f89fc7e9babd29b2cce9c0e6e399b548420d10 +Subproject commit c00fdcc89f419df4c8c257422fd6e3422ebe0bc1 From 8d80b387bacc272caefaeb2b395c8c39177bb120 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 21 Apr 2025 17:16:30 +0200 Subject: [PATCH 20/55] [nvim] Move the plugin list to the new syntax --- nvim/dotfiles/plugins-list.vim | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index c2d76ab..82a0d67 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -1,61 +1,61 @@ " UI {{{ if has('nvim') - call s:plug('romgrk/barbar.nvim') - call s:plug('hoob3rt/lualine.nvim') + Plug 'romgrk/barbar.nvim' + Plug 'hoob3rt/lualine.nvim' endif " }}} " Navigation {{{ if has('nvim') - call s:plug('nvim-telescope/telescope.nvim', { + Plug 'nvim-telescope/telescope.nvim', { \ 'requires': [ \ 'nvim-lua/plenary.nvim' \ ] -\ }) +\ } endif " }}} " Files {{{ if has('nvim') - call s:plug('kyazdani42/nvim-web-devicons') - call s:plug('akinsho/nvim-toggleterm.lua') + Plug 'kyazdani42/nvim-web-devicons' + Plug 'akinsho/nvim-toggleterm.lua' endif - call s:plug('preservim/nerdtree') - call s:plug('antoyo/vim-licenses') + Plug 'preservim/nerdtree' + Plug 'antoyo/vim-licenses' " }}} " Language specific {{{ if has('nvim') if has('unix') - call s:plug('nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }) + Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' } endif endif - call s:plug('lervag/vimtex') - call s:plug('stevearc/vim-arduino') - call s:plug('m-pilia/vim-mediawiki') - call s:plug('aquach/vim-mediawiki-editor') - call s:plug('noahfrederick/vim-laravel', { + Plug 'lervag/vimtex' + Plug 'stevearc/vim-arduino' + Plug 'm-pilia/vim-mediawiki' + Plug 'aquach/vim-mediawiki-editor' + Plug 'noahfrederick/vim-laravel', { \ 'requires': [ \ 'noahfrederick/vim-composer', \ 'tpope/vim-projectionist', \ 'tpope/vim-dispatch' \ ] -\ }) +\ } " }}} " coc {{{ if g:dotfiles_build_coc_from_source - call s:plug('https://github.com/UltiRequiem/coc-cl', { + Plug 'https://github.com/UltiRequiem/coc-cl', { \ 'do': 'yarn install --frozen-lockfile && yarn build' -\ }) +\ } endif " }}} " mini.nvim {{{ - call s:plug('echasnovski/mini.pairs') + Plug 'echasnovski/mini.pairs' " }}} " Misc {{{ - call s:plug('junegunn/vader.vim') - call s:plug('wakatime/vim-wakatime') + Plug 'junegunn/vader.vim' + Plug 'wakatime/vim-wakatime' " }}} From 6ab8344329a9e8409d92f3021929133cead762bd Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 11:11:39 +0200 Subject: [PATCH 21/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index c00fdcc..4324fda 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit c00fdcc89f419df4c8c257422fd6e3422ebe0bc1 +Subproject commit 4324fda70d2b4b166ee9bb813222acc649c9b87f From 776e54867ea38d98ac4127910b380f0ae03a7535 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 11:17:41 +0200 Subject: [PATCH 22/55] [nvim] Apply suggestions --- nvim/dotfiles/plugins-list.vim | 8 -------- nvim/ftdetect/dotfiles.vim | 8 ++------ nvim/ftplugin/PKGBUILD.vim | 1 + nvim/init.vim | 4 ++-- 4 files changed, 5 insertions(+), 16 deletions(-) create mode 100644 nvim/ftplugin/PKGBUILD.vim diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index 82a0d67..a42d27b 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -43,14 +43,6 @@ \ } " }}} -" coc {{{ - if g:dotfiles_build_coc_from_source - Plug 'https://github.com/UltiRequiem/coc-cl', { -\ 'do': 'yarn install --frozen-lockfile && yarn build' -\ } - endif -" }}} - " mini.nvim {{{ Plug 'echasnovski/mini.pairs' " }}} diff --git a/nvim/ftdetect/dotfiles.vim b/nvim/ftdetect/dotfiles.vim index c120a2d..e00f340 100644 --- a/nvim/ftdetect/dotfiles.vim +++ b/nvim/ftdetect/dotfiles.vim @@ -2,9 +2,5 @@ function! s:genSrcInfo() :call system('rm -rf .SRCINFO; makepkg --printsrcinfo > .SRCINFO') endfunction -augroup dotfilesftdetect - autocmd BufWritePost PKGBUILD :call s:genSrcInfo() - - autocmd BufNewFile,BufRead *.dream setf dream - autocmd BufNewFile,BufRead *.newlisp setf newlisp -augroup END +autocmd BufNewFile,BufRead *.dream setf dream +autocmd BufNewFile,BufRead *.newlisp setf newlisp diff --git a/nvim/ftplugin/PKGBUILD.vim b/nvim/ftplugin/PKGBUILD.vim new file mode 100644 index 0000000..0bddb4a --- /dev/null +++ b/nvim/ftplugin/PKGBUILD.vim @@ -0,0 +1 @@ +autocmd BufWritePost PKGBUILD :call s:genSrcInfo() diff --git a/nvim/init.vim b/nvim/init.vim index 4d9ab88..150d7ea 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -8,10 +8,10 @@ let g:dotfiles_rainbow_indent_opacity = 0.5 " Inhibited plugins {{{ " I'd love to use dotfiles#plugman#inhibit in my plugins-list.vim but by that " point it is already too late. - let g:dotfiles#plugman#inhibited_plugins = {} + let g:dotplug#inhibited_plugins = {} " Does not do its job properly anymore, I'm afraid. - let g:dotfiles#plugman#inhibited_plugins["delimitMate"] = 1 + let g:dotplug#inhibited_plugins["delimitMate"] = 1 " }}} source :p:h/../dmitmel-dotfiles/nvim/init.vim From b34dad4093048a814dc3576806f3c5416fa26ce4 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 11:18:30 +0200 Subject: [PATCH 23/55] [zsh] Use _dotfiles_customizations --- zsh/zshrc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index db1afc0..f167b25 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,23 +1,21 @@ #!/usr/bin/env zsh -# Options for Dima's config -DOTFILES_DISABLE_WELCOME=1 -DOTFILES_SYNC_LAST_WORKING_DIR=1 - # Get this file's current directory and source Dima's zshrc from there A_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" -source $A_ZSH_DOTFILES/../dmitmel-dotfiles/zsh/zshrc -for script in functions plugins aliases; do - source "$A_ZSH_DOTFILES/$script.zsh" -done +# Options for Dima's config +DOTFILES_SYNC_LAST_WORKING_DIR=1 -if [[ -d "$A_ZSH_DOTFILES/custom" ]]; then - for script in $A_ZSH_DOTFILES/custom/*.zsh; do - source "$script" +_dotfiles_customizations() { + for script in functions plugins aliases; do + source "$A_ZSH_DOTFILES/$script.zsh" done -fi -if [[ -z "$KDOTFILES_DISABLE_WELCOME" && -z "$POETRY_ACTIVE" ]]; then - welcome -fi + if [[ -d "$A_ZSH_DOTFILES/custom" ]]; then + for script in $A_ZSH_DOTFILES/custom/*.zsh; do + source "$script" + done + fi +} + +source $A_ZSH_DOTFILES/../dmitmel-dotfiles/zsh/zshrc From 070b1af5763231177b05e03318c725ca2cf26d06 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 11:26:43 +0200 Subject: [PATCH 24/55] [zsh] Re-add the working directory syncing I do not use Kitty on all devices --- zsh/functions.zsh | 23 +++++++++++++++++++++++ zsh/zshrc | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index e87cbb6..84d653c 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -27,3 +27,26 @@ function recover-env() { cp "$backup_dir/$project.env" "$PWD/.env" echo "$project.env restored to .env" } + +# https://github.com/dmitmel/dotfiles/blob/a174ef1556c440ca8cb7ee23bf1731290b9d22ce/zsh/functions.zsh#L114-L134 +SYNC_WORKING_DIR_STORAGE="${ZSH_CACHE_DIR}/last-working-dir" + +autoload -Uz add-zsh-hook +add-zsh-hook chpwd sync_working_dir_chpwd_hook +sync_working_dir_chpwd_hook() { + if [[ "$ZSH_SUBSHELL" == 0 ]]; then + sync_working_dir_save + fi +} + +sync_working_dir_save() { + pwd >| "$SYNC_WORKING_DIR_STORAGE" +} + +sync_working_dir_load() { + local dir + if dir="$(<"$SYNC_WORKING_DIR_STORAGE")" 2>/dev/null && [[ -n "$dir" ]]; then + cd -- "$dir" + fi +} +alias cds="sync_working_dir_load" diff --git a/zsh/zshrc b/zsh/zshrc index f167b25..6caba59 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -3,7 +3,6 @@ # Get this file's current directory and source Dima's zshrc from there A_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" -# Options for Dima's config DOTFILES_SYNC_LAST_WORKING_DIR=1 _dotfiles_customizations() { @@ -16,6 +15,10 @@ _dotfiles_customizations() { source "$script" done fi + + if [[ -n "$DOTFILES_SYNC_LAST_WORKING_DIR" ]]; then + sync_working_dir_load + fi } source $A_ZSH_DOTFILES/../dmitmel-dotfiles/zsh/zshrc From 76d1e5c7346b5e0c316d385f9338774f82b94bb5 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 11:29:47 +0200 Subject: [PATCH 25/55] [kitty] Add some of the local settings --- kitty/kitty.conf | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kitty/kitty.conf b/kitty/kitty.conf index c9b2d05..944c79b 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,14 +1,10 @@ -# Include Dima's config. include ../dmitmel-dotfiles/misc/kitty.conf -# I sure do love ligatures. -font_family Fira Code +font_family JetBrainsMonoNFM-Regular -# Remember previous window size. (which will probably always be maximized) remember_window_size yes - -# Disable the stupid bell. enable_audio_bell no - -# The block confuses me, shush. cursor_shape beam + +# Mac bindings +map cmd+t launch --type=tab From 40fef829988b248f33daba46ce692088ce812f80 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 12:09:25 +0200 Subject: [PATCH 26/55] fixup! [nvim] Apply suggestions --- nvim/ftdetect/dotfiles.vim | 4 ---- nvim/ftplugin/PKGBUILD.vim | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nvim/ftdetect/dotfiles.vim b/nvim/ftdetect/dotfiles.vim index e00f340..b6b5926 100644 --- a/nvim/ftdetect/dotfiles.vim +++ b/nvim/ftdetect/dotfiles.vim @@ -1,6 +1,2 @@ -function! s:genSrcInfo() - :call system('rm -rf .SRCINFO; makepkg --printsrcinfo > .SRCINFO') -endfunction - autocmd BufNewFile,BufRead *.dream setf dream autocmd BufNewFile,BufRead *.newlisp setf newlisp diff --git a/nvim/ftplugin/PKGBUILD.vim b/nvim/ftplugin/PKGBUILD.vim index 0bddb4a..6f28e47 100644 --- a/nvim/ftplugin/PKGBUILD.vim +++ b/nvim/ftplugin/PKGBUILD.vim @@ -1 +1,5 @@ +function! s:genSrcInfo() + :call system('rm -rf .SRCINFO; makepkg --printsrcinfo > .SRCINFO') +endfunction + autocmd BufWritePost PKGBUILD :call s:genSrcInfo() From 780882d339833e76cdeebf05b28a665c2791da71 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 12:27:36 +0200 Subject: [PATCH 27/55] [nvim] Add the IDEAVim config --- nvim/ideavimrc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 nvim/ideavimrc diff --git a/nvim/ideavimrc b/nvim/ideavimrc new file mode 100644 index 0000000..3108e96 --- /dev/null +++ b/nvim/ideavimrc @@ -0,0 +1,47 @@ +" .ideavimrc is a configuration file for IdeaVim plugin. It uses +" the same commands as the original .vimrc configuration. +" You can find a list of commands here: https://jb.gg/h38q75 +" Find more examples here: https://jb.gg/share-ideavimrc + + +" Show a few lines of context around the cursor. Note that this makes the +" text scroll if you mouse-click near the start or end of the window. +set scrolloff=5 + +" Do incremental searching. +set incsearch + +set number " show current line number +set relativenumber " show relative line numbers + +" Don't use Ex mode, use Q for formatting. +map Q gq + +" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins +" Highlight copied text +Plug 'machakann/vim-highlightedyank' +" Commentary plugin +Plug 'tpope/vim-commentary' + +Plug 'terryma/vim-multiple-cursors' +" vim-multiple-cursors default mappings {{{ +" Remap multiple-cursors shortcuts to match terryma/vim-multiple-cursors +nmap NextWholeOccurrence +xmap NextWholeOccurrence +nmap g NextOccurrence +xmap g NextOccurrence +xmap SkipOccurrence +xmap RemoveOccurrence + +" Note that the default and g shortcuts don't work on Mac due to dead keys. +" is used to enter accented text e.g. ñ +" Feel free to pick your own mappings that are not affected. I like to use +nmap AllWholeOccurrences +xmap AllWholeOccurrences +nmap g AllOccurrences +xmap g AllOccurrences +" }}} + + +"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t +map \r (ReformatCode) From 7b3b5a0534f32883f8abcd810835cc904984cd92 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 16:16:20 +0200 Subject: [PATCH 28/55] [common] Fix the malformed Brewfile --- common/Brewfile | 143 ++++++++++++++++++++++++------------------------ 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/common/Brewfile b/common/Brewfile index 2d7a4c1..62bc34a 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -45,84 +45,85 @@ packages = { "sdl2" ], languages: [ - "bash-language-server" - "dotnet" - "gradle" - "node" - "poetry" - "dhall" - "dhall-json" - "dhall-lsp-server" - "go" - "openjdk" - "kotlin" - "lua-language-server" - "php" - "composer" - "ruby" + "bash-language-server", + "composer", + "dhall", + "dhall-json", + "dhall-lsp-server", + "dotnet", + "go", + "gradle", + "kotlin", + "lua-language-server", + "node", + "openjdk", + "php", + "poetry", + "ruby", + "stylua" ], tools: [ - "bat" - "bear" - "coder" - "croc" - "ddev/ddev/ddev" - "ijq" - "neovim" - "git-delta" - "act" - "eza" - "ffmpeg" - "fzf" - "gh" - "git-crypt" - "gitui" - "gnupg" - "imagemagick" - "kubernetes-cli" - "pandoc" - "ripgrep" - "sops" + "act", + "bat", + "bear", + "coder", + "croc", + "ddev/ddev/ddev", + "eza", + "ffmpeg", + "fzf", + "gh", + "git-crypt", + "git-delta", + "gitui", + "gnupg", + "ijq", + "imagemagick", + "kubernetes-cli", + "neovim", + "pandoc", + "ripgrep", + "sops", "wget" ] }, # }}} casks: [ # {{{ - "1password" - "1password-cli" - "alt-tab" - "android-studio" - "browserstacklocal" - "db-browser-for-sqlite" - "discord" - "discord@ptb" - "firefox@developer-edition" - "fleet" - "font-jetbrains-mono-nerd-font" - "font-ibm-plex" - "goland" - "imhex" - "insomnia" - "intellij-idea" - "iterm2" - "kitty" - "lens" - "obs" - "obsidian" - "orbstack" - "phpstorm" - "qbittorrent" - "raycast" - "rider" - "rubymine" - "sequel-ace" - "shottr" - "slack" - "spotify" - "steam" - "thunderbird" - "transmit" + "1password", + "1password-cli", + "alt-tab", + "android-studio", + "browserstacklocal", + "db-browser-for-sqlite", + "discord", + "discord@ptb", + "firefox@developer-edition", + "fleet", + "font-ibm-plex", + "font-jetbrains-mono-nerd-font", + "goland", + "imhex", + "insomnia", + "intellij-idea", + "iterm2", + "kitty", + "lens", + "obs", + "obsidian", + "orbstack", + "phpstorm", + "qbittorrent", + "raycast", + "rectangle", + "rider", + "rubymine", + "sequel-ace", + "shottr", + "slack", + "spotify", + "steam", + "thunderbird", + "transmit", "visual-studio-code" - "rectangle" ] # }}} } From fbe0cdfeccce13537eecea298d4b91b289578412 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Apr 2025 16:30:32 +0200 Subject: [PATCH 29/55] [nvim] Clean up some stuff --- nvim/dotfiles/coc-languages/lua.vim | 7 ++---- nvim/dotfiles/plugins-list.vim | 5 ---- nvim/lua/kdotfiles/utils.lua | 28 ---------------------- nvim/plugin/neorg.lua | 21 ---------------- nvim/plugin/treesitter.lua | 37 ----------------------------- 5 files changed, 2 insertions(+), 96 deletions(-) delete mode 100644 nvim/lua/kdotfiles/utils.lua delete mode 100644 nvim/plugin/neorg.lua delete mode 100644 nvim/plugin/treesitter.lua diff --git a/nvim/dotfiles/coc-languages/lua.vim b/nvim/dotfiles/coc-languages/lua.vim index c8c8489..4e85c7f 100644 --- a/nvim/dotfiles/coc-languages/lua.vim +++ b/nvim/dotfiles/coc-languages/lua.vim @@ -2,9 +2,6 @@ if !has('nvim-0.2.1') | finish | endif call extend(g:dotfiles_coc_extensions, {'coc-stylua': 1}) let g:coc_user_config['coc.preferences.formatOnSaveFiletypes'] = ['lua'] -" We're using Nix here, so point to the right path... -if has('macunix') - let g:coc_user_config['stylua.styluaPath'] = "/etc/profiles/per-user/alyxia/bin/stylua" -else - let g:coc_user_config['stylua.styluaPath'] = "/usr/bin/stylua" +if exepath('stylua') + let g:coc_user_config['stylua.styluaPath'] = exepath('stylua') endif diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index a42d27b..6ac2e8c 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -25,11 +25,6 @@ " }}} " Language specific {{{ - if has('nvim') - if has('unix') - Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' } - endif - endif Plug 'lervag/vimtex' Plug 'stevearc/vim-arduino' Plug 'm-pilia/vim-mediawiki' diff --git a/nvim/lua/kdotfiles/utils.lua b/nvim/lua/kdotfiles/utils.lua deleted file mode 100644 index 17e4ef7..0000000 --- a/nvim/lua/kdotfiles/utils.lua +++ /dev/null @@ -1,28 +0,0 @@ -local M = require('dotfiles.autoload')('kdotfiles.utils') - -function M.file_exists(file) - local f = io.open(file, "rb") - if f then f:close() end - return f ~= nil -end - -function M.lines_from(file) - if not M.file_exists(file) then return {} end - lines = {} - for line in io.lines(file) do - lines[#lines + 1] = line - end - return lines -end - -function M.get_os(lines) - os_name = "Unknown" - for k,v in pairs(lines) do - if string.match(v, "^ID=") then - os_name = string.sub(v, 4) - end - end - return os_name -end - -return M diff --git a/nvim/plugin/neorg.lua b/nvim/plugin/neorg.lua deleted file mode 100644 index e655840..0000000 --- a/nvim/plugin/neorg.lua +++ /dev/null @@ -1,21 +0,0 @@ -local ok, neorg = pcall(require, 'neorg') -if not ok then return end; - -local ok, cmp = pcall(require, 'cmp') -if not ok then return end; - -local cmp_config = cmp.get_config() -table.insert(cmp_config.sources, { name = "neorg" }) -cmp.setup(cmp_config) - -require('neorg').setup { - load = { - ["core.defaults"] = {}, - ["core.norg.concealer"] = {}, - ["core.norg.completion"] = { - config = { - engine = "nvim-cmp" - } - } - } -} diff --git a/nvim/plugin/treesitter.lua b/nvim/plugin/treesitter.lua deleted file mode 100644 index bcdfe6f..0000000 --- a/nvim/plugin/treesitter.lua +++ /dev/null @@ -1,37 +0,0 @@ -local ok, parser_configs = pcall(require, 'nvim-treesitter.parsers') -if not ok then return end - --- Should only really run on my Macbook, as it is my only macOS device. --- Apple's C compilers seem to not want to compile any of Treesitter's --- dialects. --- That is, `cc`, `gcc`, `g++`, andsoforth. Funnily enough, they are all --- aliases to the same program. --- So, the nix-darwin configuration specifies the installation of zig as a --- replacement compiler solely so the Treesitter dialects compile. Very --- intuitive. --- Sadly, the solution only works on my old MacBook pro, which is a 13 inch --- model. So my only option is to lock it down to that device. -if vim.loop.os_uname().sysname == 'Darwin' then - local meta = vim.fn.system({"system_profiler", "SPHardwareDataType"}); - if not string.match(meta, "MacBookPro13,1") then - return - end - - local opts = require('nvim-treesitter.install') - opts.compilers = { "zig" } - opts.command_extra_args = { "--help" } -end - -local parser_configs = parser_configs.get_parser_configs() - -parser_configs.norg = { - install_info = { - url = "https://github.com/nvim-neorg/tree-sitter-norg", - files = { "src/parser.c", "src/scanner.cc" }, - branch = "main" - }, -} - -require('nvim-treesitter.configs').setup { - ensure_installed = { "norg" } -} From 75db168451d2e40818852bac261b4e7a2c2634de Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 6 May 2025 12:53:25 +0200 Subject: [PATCH 30/55] [nvim] Some minor changes --- nvim/dotfiles/coc-languages/vue.vim | 2 ++ nvim/ideavimrc | 1 + nvim/plugin/keybinds.vim | 7 ++++--- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 nvim/dotfiles/coc-languages/vue.vim diff --git a/nvim/dotfiles/coc-languages/vue.vim b/nvim/dotfiles/coc-languages/vue.vim new file mode 100644 index 0000000..d92f91b --- /dev/null +++ b/nvim/dotfiles/coc-languages/vue.vim @@ -0,0 +1,2 @@ +call extend(g:dotfiles_coc_extensions, {'@yaegassy/coc-volar': 1}) +call extend(g:dotfiles_coc_filetypes, {'vue': 1}) diff --git a/nvim/ideavimrc b/nvim/ideavimrc index 3108e96..203469c 100644 --- a/nvim/ideavimrc +++ b/nvim/ideavimrc @@ -1,3 +1,4 @@ +" vim: set ft=vim " .ideavimrc is a configuration file for IdeaVim plugin. It uses " the same commands as the original .vimrc configuration. " You can find a list of commands here: https://jb.gg/h38q75 diff --git a/nvim/plugin/keybinds.vim b/nvim/plugin/keybinds.vim index d6dbc8d..de14308 100644 --- a/nvim/plugin/keybinds.vim +++ b/nvim/plugin/keybinds.vim @@ -3,16 +3,17 @@ nnoremap :NERDTreeToggle " Completion {{{ function! s:check_back_space() abort let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' + return !col || getline('.')[col - 1] =~# '\s' endfunction nmap (coc-codeaction-line) xmap (coc-codeaction-selected) - inoremap coc#pum#visible() ? coc#pum#confirm() : "\" + inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" inoremap - \ coc#pum#visible() ? coc#pum#next(1): + \ coc#pum#visible() ? coc#pum#next(1) : \ check_back_space() ? "\" : \ coc#refresh() inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" From 8d067c5a9b64d558757f7a2256edb3d6c6551dfe Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 9 May 2025 23:16:37 +0200 Subject: [PATCH 31/55] [zsh] Enable KSH globbing --- zsh/zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh/zshrc b/zsh/zshrc index 6caba59..951ef40 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,5 +1,8 @@ #!/usr/bin/env zsh +# enable KSH globbing, which gives access to things such as !(1|2|3) +setopt ksh_glob + # Get this file's current directory and source Dima's zshrc from there A_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" From 0b1aee29cf5bd819803fd91bd15350ac718786ef Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 7 Jul 2025 11:31:25 +0200 Subject: [PATCH 32/55] [nvim] Update for upstream changes --- nvim/dotfiles/coc-languages/go.vim | 3 +-- nvim/dotfiles/coc-languages/javascript.vim | 1 + nvim/dotfiles/coc-languages/lisp.vim | 3 +-- nvim/dotfiles/coc-languages/lua.vim | 2 +- nvim/dotfiles/coc-languages/php.vim | 5 +++-- nvim/dotfiles/coc-languages/sh.vim | 3 +-- nvim/dotfiles/coc-languages/tex.vim | 3 +-- nvim/dotfiles/coc-languages/vue.vim | 3 +-- nvim/plugin/lualine.lua | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) diff --git a/nvim/dotfiles/coc-languages/go.vim b/nvim/dotfiles/coc-languages/go.vim index d838559..da5dbaa 100644 --- a/nvim/dotfiles/coc-languages/go.vim +++ b/nvim/dotfiles/coc-languages/go.vim @@ -1,2 +1 @@ -call extend(g:dotfiles_coc_extensions, {'coc-go': 1}) -call extend(g:dotfiles_coc_filetypes, {'go': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-go') diff --git a/nvim/dotfiles/coc-languages/javascript.vim b/nvim/dotfiles/coc-languages/javascript.vim index 6996f0d..2c0651a 100644 --- a/nvim/dotfiles/coc-languages/javascript.vim +++ b/nvim/dotfiles/coc-languages/javascript.vim @@ -1 +1,2 @@ +let g:coc_user_config['prettier'] = {} let g:coc_user_config['prettier']['printWidth'] = 80 diff --git a/nvim/dotfiles/coc-languages/lisp.vim b/nvim/dotfiles/coc-languages/lisp.vim index bb594d3..ff878de 100644 --- a/nvim/dotfiles/coc-languages/lisp.vim +++ b/nvim/dotfiles/coc-languages/lisp.vim @@ -1,2 +1 @@ -call extend(g:dotfiles_coc_extensions, {'coc-cl': 1}) -call extend(g:dotfiles_coc_filetypes, {'lisp': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-cl') diff --git a/nvim/dotfiles/coc-languages/lua.vim b/nvim/dotfiles/coc-languages/lua.vim index 4e85c7f..1cc50df 100644 --- a/nvim/dotfiles/coc-languages/lua.vim +++ b/nvim/dotfiles/coc-languages/lua.vim @@ -1,5 +1,5 @@ if !has('nvim-0.2.1') | finish | endif -call extend(g:dotfiles_coc_extensions, {'coc-stylua': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-stylua') let g:coc_user_config['coc.preferences.formatOnSaveFiletypes'] = ['lua'] if exepath('stylua') diff --git a/nvim/dotfiles/coc-languages/php.vim b/nvim/dotfiles/coc-languages/php.vim index ad91d65..f7996a7 100644 --- a/nvim/dotfiles/coc-languages/php.vim +++ b/nvim/dotfiles/coc-languages/php.vim @@ -1,2 +1,3 @@ -call extend(g:dotfiles_coc_extensions, {'coc-phpls': 1, 'coc-blade': 1, 'coc-tighten-lint': 1}) -call extend(g:dotfiles_coc_filetypes, {'php': 1, 'blade': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-phpls') +call dotutils#add_unique(g:coc_global_extensions, 'coc-blade') +call dotutils#add_unique(g:coc_global_extensions, 'coc-tighten-lint') diff --git a/nvim/dotfiles/coc-languages/sh.vim b/nvim/dotfiles/coc-languages/sh.vim index c85456d..6e1d1bd 100644 --- a/nvim/dotfiles/coc-languages/sh.vim +++ b/nvim/dotfiles/coc-languages/sh.vim @@ -1,2 +1 @@ -call extend(g:dotfiles_coc_extensions, {'coc-sh': 1}) -call extend(g:dotfiles_coc_filetypes, {'sh': 1, 'zsh': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-sh') diff --git a/nvim/dotfiles/coc-languages/tex.vim b/nvim/dotfiles/coc-languages/tex.vim index a64c73e..759acf2 100644 --- a/nvim/dotfiles/coc-languages/tex.vim +++ b/nvim/dotfiles/coc-languages/tex.vim @@ -1,2 +1 @@ -call extend(g:dotfiles_coc_extensions, {'coc-vimtex': 1}) -call extend(g:dotfiles_coc_filetypes, {'tex': 1, 'cls': 1}) +call dotutils#add_unique(g:coc_global_extensions, 'coc-vimtex') diff --git a/nvim/dotfiles/coc-languages/vue.vim b/nvim/dotfiles/coc-languages/vue.vim index d92f91b..066c3a6 100644 --- a/nvim/dotfiles/coc-languages/vue.vim +++ b/nvim/dotfiles/coc-languages/vue.vim @@ -1,2 +1 @@ -call extend(g:dotfiles_coc_extensions, {'@yaegassy/coc-volar': 1}) -call extend(g:dotfiles_coc_filetypes, {'vue': 1}) +call dotutils#add_unique(g:coc_global_extensions, '@yaegassy/coc-volar') diff --git a/nvim/plugin/lualine.lua b/nvim/plugin/lualine.lua index 662fc4e..adc2345 100644 --- a/nvim/plugin/lualine.lua +++ b/nvim/plugin/lualine.lua @@ -5,7 +5,7 @@ local theme = require'dotfiles.colorscheme' -- https://ptb.discord.com/channels/382339402338402315/382339402338402317/885864846892077086 local function get_color(index) local color = theme.base16_colors[index] - return color.gui + return string.format('%06x', color.gui) end -- Structure of themes is as follows: From baa8e8422bd87cb786592c22a79260ed81252f61 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:05:44 +0200 Subject: [PATCH 33/55] [nvim] Migrate to vim_lsp 2 --- dmitmel-dotfiles | 2 +- nvim/dotfiles/plugins-list.vim | 21 ++++++--------------- nvim/ideavimrc | 2 +- nvim/init.lua | 11 +---------- nvim/init.vim | 2 +- nvim/plugin/keybinds.vim | 28 +++++++++++++++------------- nvim/plugin/lualine.lua | 5 ++++- 7 files changed, 29 insertions(+), 42 deletions(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 4324fda..ec61f7d 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 4324fda70d2b4b166ee9bb813222acc649c9b87f +Subproject commit ec61f7db6ed515b4bd2e85e45d812f465eb63e4e diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index 6ac2e8c..3c53bbb 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -1,7 +1,9 @@ +exe dotplug#define_plug_here() + " UI {{{ if has('nvim') - Plug 'romgrk/barbar.nvim' - Plug 'hoob3rt/lualine.nvim' + " Plug 'romgrk/barbar.nvim' + " Plug 'hoob3rt/lualine.nvim' endif " }}} @@ -26,23 +28,12 @@ " Language specific {{{ Plug 'lervag/vimtex' - Plug 'stevearc/vim-arduino' Plug 'm-pilia/vim-mediawiki' Plug 'aquach/vim-mediawiki-editor' - Plug 'noahfrederick/vim-laravel', { -\ 'requires': [ -\ 'noahfrederick/vim-composer', -\ 'tpope/vim-projectionist', -\ 'tpope/vim-dispatch' -\ ] -\ } -" }}} - -" mini.nvim {{{ - Plug 'echasnovski/mini.pairs' " }}} " Misc {{{ - Plug 'junegunn/vader.vim' Plug 'wakatime/vim-wakatime' " }}} + +delcommand Plug diff --git a/nvim/ideavimrc b/nvim/ideavimrc index 203469c..433f430 100644 --- a/nvim/ideavimrc +++ b/nvim/ideavimrc @@ -1,4 +1,4 @@ -" vim: set ft=vim +" vim:ft=vim " .ideavimrc is a configuration file for IdeaVim plugin. It uses " the same commands as the original .vimrc configuration. " You can find a list of commands here: https://jb.gg/h38q75 diff --git a/nvim/init.lua b/nvim/init.lua index a9decd1..6eba8d8 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,14 +1,5 @@ -- Disable airline to use barbar -vim.g.loaded_airline = 1 - --- TODO: Refactor to Lua --- This has stopped working...? --- let g:dotfiles_plugin_manager_inhibited_plugins = { --- \ 'vim-airline': 1, --- \ } - --- Small plugin configs -vim.g.dashboard_default_executive ='fzf' +-- vim.g.loaded_airline = 1 -- Styling vim.o.termguicolors = true diff --git a/nvim/init.vim b/nvim/init.vim index 150d7ea..a855b6b 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -2,7 +2,7 @@ let g:a_nvim_dotfiles_dir = expand(':p:h') let g:a_dotfiles_dir = expand(':p:h:h') let &runtimepath = g:a_nvim_dotfiles_dir.','.&runtimepath.','.g:a_nvim_dotfiles_dir.'/after' -let g:vim_ide = 1 +let g:vim_ide = 2 let g:dotfiles_rainbow_indent_opacity = 0.5 " Inhibited plugins {{{ diff --git a/nvim/plugin/keybinds.vim b/nvim/plugin/keybinds.vim index de14308..517ac49 100644 --- a/nvim/plugin/keybinds.vim +++ b/nvim/plugin/keybinds.vim @@ -1,22 +1,24 @@ nnoremap :NERDTreeToggle " Completion {{{ - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction + if (dotplug#has('coc.nvim') && g:vim_ide == 1) + function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' + endfunction - nmap (coc-codeaction-line) - xmap (coc-codeaction-selected) + nmap (coc-codeaction-line) + xmap (coc-codeaction-selected) - inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" + inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" - inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ check_back_space() ? "\" : - \ coc#refresh() - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" + inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ check_back_space() ? "\" : + \ coc#refresh() + inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" + endif " }}} " Copy to clipboard register and paste from clipboard register {{{ diff --git a/nvim/plugin/lualine.lua b/nvim/plugin/lualine.lua index adc2345..70ad855 100644 --- a/nvim/plugin/lualine.lua +++ b/nvim/plugin/lualine.lua @@ -1,3 +1,6 @@ +local ok, lualine = pcall(require, 'lualine') +if not ok then return end; + local dotfiles_gruv = require'lualine.themes.gruvbox' local theme = require'dotfiles.colorscheme' @@ -36,7 +39,7 @@ local function showBoard() end end -require('lualine').setup{ +lualine.setup{ options = { theme = dotfiles_gruv } From 9e9bec6282610131906bf5ee89fb6ab626f48726 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:06:41 +0200 Subject: [PATCH 34/55] [common] Install cmark packages --- common/Brewfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Brewfile b/common/Brewfile index 62bc34a..49ccad9 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -37,6 +37,8 @@ packages = { { "tailscale" => { restart_service: :changed } } ], system: [ + "cmark", + "cmark-gfm", "gcc@12", "mkcert", "nss", From ba0c99b7018a9999a0e71a6e7482c2de5175f698 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:07:57 +0200 Subject: [PATCH 35/55] [common] Sync the Brewfile --- common/Brewfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/common/Brewfile b/common/Brewfile index 49ccad9..8edea9d 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -34,7 +34,6 @@ packages = { brews: { # {{{ services: [ { "syncthing" => { restart_service: :changed } }, - { "tailscale" => { restart_service: :changed } } ], system: [ "cmark", @@ -62,7 +61,8 @@ packages = { "php", "poetry", "ruby", - "stylua" + "stylua", + "uv" ], tools: [ "act", @@ -70,10 +70,12 @@ packages = { "bear", "coder", "croc", - "ddev/ddev/ddev", + "ddev", + "dua-cli", "eza", "ffmpeg", "fzf", + "gawk", "gh", "git-crypt", "git-delta", @@ -86,6 +88,7 @@ packages = { "pandoc", "ripgrep", "sops", + "tealdeer", "wget" ] }, # }}} @@ -95,14 +98,15 @@ packages = { "alt-tab", "android-studio", "browserstacklocal", + "crossover", "db-browser-for-sqlite", "discord", "discord@ptb", "firefox@developer-edition", - "fleet", "font-ibm-plex", "font-jetbrains-mono-nerd-font", "goland", + "google-chrome", "imhex", "insomnia", "intellij-idea", @@ -113,6 +117,7 @@ packages = { "obsidian", "orbstack", "phpstorm", + "prismlauncher", "qbittorrent", "raycast", "rectangle", @@ -122,7 +127,8 @@ packages = { "shottr", "slack", "spotify", - "steam", + # "steam", + "tailscale", "thunderbird", "transmit", "visual-studio-code" From cdfaf985a5bbf872184bc704fc721a2c8c59ea62 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:50:43 +0200 Subject: [PATCH 36/55] [nvim] Add some of the linting .rc files --- .luarc.json | 4 ---- nvim/.luarc.json | 9 +++++++++ nvim/.stylua.toml | 9 +++++++++ nvim/.vintrc.yml | 7 +++++++ 4 files changed, 25 insertions(+), 4 deletions(-) delete mode 100644 .luarc.json create mode 100644 nvim/.luarc.json create mode 100644 nvim/.stylua.toml create mode 100644 nvim/.vintrc.yml diff --git a/.luarc.json b/.luarc.json deleted file mode 100644 index 18eefe7..0000000 --- a/.luarc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "workspace.checkThirdParty": false, - "workspace.library": ["${3rd}/luassert/library", "${3rd}/luv/library"] -} diff --git a/nvim/.luarc.json b/nvim/.luarc.json new file mode 100644 index 0000000..49ac582 --- /dev/null +++ b/nvim/.luarc.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "runtime.version": "LuaJIT", + "diagnostics.globals": ["vim"], + "diagnostics.disable": ["empty-block", "duplicate-set-field", "inject-field"], + "diagnostics.unusedLocalExclude": ["_*"], + "workspace.checkThirdParty": false, + "workspace.library": ["${3rd}/luassert/library", "${3rd}/luv/library", "./dmitmel-dotfiles/nvim"] +} diff --git a/nvim/.stylua.toml b/nvim/.stylua.toml new file mode 100644 index 0000000..4573b87 --- /dev/null +++ b/nvim/.stylua.toml @@ -0,0 +1,9 @@ +syntax = "LuaJIT" +column_width = 100 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "Always" +space_after_function_names = "Never" +collapse_simple_statement = "Always" diff --git a/nvim/.vintrc.yml b/nvim/.vintrc.yml new file mode 100644 index 0000000..64f8063 --- /dev/null +++ b/nvim/.vintrc.yml @@ -0,0 +1,7 @@ +cmdargs: + severity: style_problem + env: + neovim: true +policies: + ProhibitSetNoCompatible: + enabled: false From 8fad0d40356a2017e510659a655ce64257f141d7 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:51:09 +0200 Subject: [PATCH 37/55] [nvim] Set up intelephense --- nvim/after/lsp/php.lua | 9 +++++++++ nvim/plugin/nlsp.lua | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 nvim/after/lsp/php.lua create mode 100644 nvim/plugin/nlsp.lua diff --git a/nvim/after/lsp/php.lua b/nvim/after/lsp/php.lua new file mode 100644 index 0000000..2dc863a --- /dev/null +++ b/nvim/after/lsp/php.lua @@ -0,0 +1,9 @@ +-- + +---@type dotfiles.lsp.Config +return { + cmd = { "intelephense", "--stdio" }, + filetypes = { "php" }, + + settings_sections = { "intelephense" }, +} diff --git a/nvim/plugin/nlsp.lua b/nvim/plugin/nlsp.lua new file mode 100644 index 0000000..af16a4c --- /dev/null +++ b/nvim/plugin/nlsp.lua @@ -0,0 +1,8 @@ +local has_lsp, lsp = pcall(require, "vim.lsp") +if not (has_lsp and lsp.config ~= nil and vim.g.vim_ide == 2) then + return +end + +require("dotfiles.lsp_ignition").enable({ + "php", +}) From 1b3e6fced6250730c5f1deeae4865cefd39a8341 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 22 Jul 2025 11:54:24 +0200 Subject: [PATCH 38/55] [nvim] Swap out intelephense for phpactor --- nvim/.luarc.json => .luarc.json | 0 nvim/after/lsp/php.lua | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename nvim/.luarc.json => .luarc.json (100%) diff --git a/nvim/.luarc.json b/.luarc.json similarity index 100% rename from nvim/.luarc.json rename to .luarc.json diff --git a/nvim/after/lsp/php.lua b/nvim/after/lsp/php.lua index 2dc863a..f85e3c5 100644 --- a/nvim/after/lsp/php.lua +++ b/nvim/after/lsp/php.lua @@ -2,8 +2,8 @@ ---@type dotfiles.lsp.Config return { - cmd = { "intelephense", "--stdio" }, - filetypes = { "php" }, - - settings_sections = { "intelephense" }, + cmd = { 'phpactor', 'language-server' }, + filetypes = { 'php' }, + root_markers = { '.git', 'composer.json', '.phpactor.json', '.phpactor.yml' }, + workspace_required = true, } From 9b08598582cf742a1a6cfa63fc368c467da29ae9 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Wed, 23 Jul 2025 11:31:29 +0200 Subject: [PATCH 39/55] [nvim] Bring back barbar --- .luarc.json => nvim/.luarc.json | 4 +--- nvim/dotfiles/plugins-list.vim | 2 +- nvim/init.lua | 5 ----- nvim/init.vim | 21 ++++++++------------- nvim/plugin/barbar.lua | 14 ++++++++------ 5 files changed, 18 insertions(+), 28 deletions(-) rename .luarc.json => nvim/.luarc.json (57%) delete mode 100644 nvim/init.lua diff --git a/.luarc.json b/nvim/.luarc.json similarity index 57% rename from .luarc.json rename to nvim/.luarc.json index 49ac582..8c8dd32 100644 --- a/.luarc.json +++ b/nvim/.luarc.json @@ -3,7 +3,5 @@ "runtime.version": "LuaJIT", "diagnostics.globals": ["vim"], "diagnostics.disable": ["empty-block", "duplicate-set-field", "inject-field"], - "diagnostics.unusedLocalExclude": ["_*"], - "workspace.checkThirdParty": false, - "workspace.library": ["${3rd}/luassert/library", "${3rd}/luv/library", "./dmitmel-dotfiles/nvim"] + "diagnostics.unusedLocalExclude": ["_*"] } diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index 3c53bbb..2640c72 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -2,7 +2,7 @@ exe dotplug#define_plug_here() " UI {{{ if has('nvim') - " Plug 'romgrk/barbar.nvim' + Plug 'romgrk/barbar.nvim' " Plug 'hoob3rt/lualine.nvim' endif " }}} diff --git a/nvim/init.lua b/nvim/init.lua deleted file mode 100644 index 6eba8d8..0000000 --- a/nvim/init.lua +++ /dev/null @@ -1,5 +0,0 @@ --- Disable airline to use barbar --- vim.g.loaded_airline = 1 - --- Styling -vim.o.termguicolors = true diff --git a/nvim/init.vim b/nvim/init.vim index a855b6b..591d16f 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,26 +1,21 @@ +" Add my paths to the rtp let g:a_nvim_dotfiles_dir = expand(':p:h') let g:a_dotfiles_dir = expand(':p:h:h') let &runtimepath = g:a_nvim_dotfiles_dir.','.&runtimepath.','.g:a_nvim_dotfiles_dir.'/after' +" dotfiles configuration let g:vim_ide = 2 let g:dotfiles_rainbow_indent_opacity = 0.5 +let g:dotfiles_treesitter_highlighting = v:true +let g:dotfiles_highlight_url_under_cursor = v:true -" Inhibited plugins {{{ - " I'd love to use dotfiles#plugman#inhibit in my plugins-list.vim but by that - " point it is already too late. - let g:dotplug#inhibited_plugins = {} - - " Does not do its job properly anymore, I'm afraid. - let g:dotplug#inhibited_plugins["delimitMate"] = 1 -" }}} +" Disables Airline's tabline to use barbar instead +let g:airline#extensions#tabline#enabled = 1 source :p:h/../dmitmel-dotfiles/nvim/init.vim -if has('nvim') - luafile :p:h/init.lua -else - set termguicolors -endif +" Doesn't hurt to try and set again. +set termguicolors " Arrow key fix kanged from {{{ if exists("g:HELP_MY_ARROW_KEYS_ARE_BROKEN") diff --git a/nvim/plugin/barbar.lua b/nvim/plugin/barbar.lua index cbaa758..6b8a3fa 100644 --- a/nvim/plugin/barbar.lua +++ b/nvim/plugin/barbar.lua @@ -1,14 +1,16 @@ local ok, barbar = pcall(require, 'barbar') -if not ok then return end; +if not ok then return end -barbar.setup { +---@diagnostic disable: missing-fields + +barbar.setup({ icons = { buffer_index = true, filetype = { - enabled = true - } - } -} + enabled = true, + }, + }, +}) --[[@as barbar.config.options]] local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } From 2728d6da3ae7fdc83de22f5751d1ab49cacaecbe Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Wed, 23 Jul 2025 11:32:55 +0200 Subject: [PATCH 40/55] [nvim] Enable vimls --- nvim/plugin/nlsp.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nvim/plugin/nlsp.lua b/nvim/plugin/nlsp.lua index af16a4c..2f1c1de 100644 --- a/nvim/plugin/nlsp.lua +++ b/nvim/plugin/nlsp.lua @@ -1,8 +1,7 @@ -local has_lsp, lsp = pcall(require, "vim.lsp") -if not (has_lsp and lsp.config ~= nil and vim.g.vim_ide == 2) then - return -end +local has_lsp, lsp = pcall(require, 'vim.lsp') +if not (has_lsp and lsp.config ~= nil and vim.g.vim_ide == 2) then return end -require("dotfiles.lsp_ignition").enable({ - "php", +require('dotfiles.lsp_ignition').enable({ + 'php', + 'vimls', }) From f2acaac218b24504f699ca17616c9652b3920399 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 29 Jul 2025 11:16:38 +0200 Subject: [PATCH 41/55] [nvim] Shuffle some stuff around --- dmitmel-dotfiles | 2 +- nvim/after/plugin/keybinds.vim | 4 ---- nvim/dotfiles/coc-languages/go.vim | 1 - nvim/dotfiles/coc-languages/javascript.vim | 2 -- nvim/dotfiles/coc-languages/lisp.vim | 1 - nvim/dotfiles/coc-languages/lua.vim | 7 ------- nvim/dotfiles/coc-languages/php.vim | 3 --- nvim/dotfiles/coc-languages/sh.vim | 1 - nvim/dotfiles/coc-languages/tex.vim | 1 - nvim/dotfiles/coc-languages/vue.vim | 1 - nvim/dotfiles/lspconfigs/dart.lua | 4 ---- nvim/dotfiles/lspconfigs/php.lua | 4 ---- nvim/dotfiles/plugins-list.vim | 2 +- nvim/init.vim | 7 ++++--- nvim/plugin/airline.vim | 1 + nvim/plugin/commands.vim | 4 +++- nvim/plugin/completion.vim | 23 ++++++++++++++++++++++ nvim/plugin/keybinds.vim | 5 +++++ 18 files changed, 38 insertions(+), 35 deletions(-) delete mode 100644 nvim/after/plugin/keybinds.vim delete mode 100644 nvim/dotfiles/coc-languages/go.vim delete mode 100644 nvim/dotfiles/coc-languages/javascript.vim delete mode 100644 nvim/dotfiles/coc-languages/lisp.vim delete mode 100644 nvim/dotfiles/coc-languages/lua.vim delete mode 100644 nvim/dotfiles/coc-languages/php.vim delete mode 100644 nvim/dotfiles/coc-languages/sh.vim delete mode 100644 nvim/dotfiles/coc-languages/tex.vim delete mode 100644 nvim/dotfiles/coc-languages/vue.vim delete mode 100644 nvim/dotfiles/lspconfigs/dart.lua delete mode 100644 nvim/dotfiles/lspconfigs/php.lua create mode 100644 nvim/plugin/airline.vim create mode 100644 nvim/plugin/completion.vim diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index ec61f7d..4193eb2 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit ec61f7db6ed515b4bd2e85e45d812f465eb63e4e +Subproject commit 4193eb2e46a11d1ddcedf5b988e7ba1cbf43bc8a diff --git a/nvim/after/plugin/keybinds.vim b/nvim/after/plugin/keybinds.vim deleted file mode 100644 index 46efcf3..0000000 --- a/nvim/after/plugin/keybinds.vim +++ /dev/null @@ -1,4 +0,0 @@ -nnoremap ff Telescope find_files -nnoremap fg Telescope live_grep -nnoremap fb Telescope buffers -nnoremap fh Telescope help_tags diff --git a/nvim/dotfiles/coc-languages/go.vim b/nvim/dotfiles/coc-languages/go.vim deleted file mode 100644 index da5dbaa..0000000 --- a/nvim/dotfiles/coc-languages/go.vim +++ /dev/null @@ -1 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, 'coc-go') diff --git a/nvim/dotfiles/coc-languages/javascript.vim b/nvim/dotfiles/coc-languages/javascript.vim deleted file mode 100644 index 2c0651a..0000000 --- a/nvim/dotfiles/coc-languages/javascript.vim +++ /dev/null @@ -1,2 +0,0 @@ -let g:coc_user_config['prettier'] = {} -let g:coc_user_config['prettier']['printWidth'] = 80 diff --git a/nvim/dotfiles/coc-languages/lisp.vim b/nvim/dotfiles/coc-languages/lisp.vim deleted file mode 100644 index ff878de..0000000 --- a/nvim/dotfiles/coc-languages/lisp.vim +++ /dev/null @@ -1 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, 'coc-cl') diff --git a/nvim/dotfiles/coc-languages/lua.vim b/nvim/dotfiles/coc-languages/lua.vim deleted file mode 100644 index 1cc50df..0000000 --- a/nvim/dotfiles/coc-languages/lua.vim +++ /dev/null @@ -1,7 +0,0 @@ -if !has('nvim-0.2.1') | finish | endif -call dotutils#add_unique(g:coc_global_extensions, 'coc-stylua') -let g:coc_user_config['coc.preferences.formatOnSaveFiletypes'] = ['lua'] - -if exepath('stylua') - let g:coc_user_config['stylua.styluaPath'] = exepath('stylua') -endif diff --git a/nvim/dotfiles/coc-languages/php.vim b/nvim/dotfiles/coc-languages/php.vim deleted file mode 100644 index f7996a7..0000000 --- a/nvim/dotfiles/coc-languages/php.vim +++ /dev/null @@ -1,3 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, 'coc-phpls') -call dotutils#add_unique(g:coc_global_extensions, 'coc-blade') -call dotutils#add_unique(g:coc_global_extensions, 'coc-tighten-lint') diff --git a/nvim/dotfiles/coc-languages/sh.vim b/nvim/dotfiles/coc-languages/sh.vim deleted file mode 100644 index 6e1d1bd..0000000 --- a/nvim/dotfiles/coc-languages/sh.vim +++ /dev/null @@ -1 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, 'coc-sh') diff --git a/nvim/dotfiles/coc-languages/tex.vim b/nvim/dotfiles/coc-languages/tex.vim deleted file mode 100644 index 759acf2..0000000 --- a/nvim/dotfiles/coc-languages/tex.vim +++ /dev/null @@ -1 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, 'coc-vimtex') diff --git a/nvim/dotfiles/coc-languages/vue.vim b/nvim/dotfiles/coc-languages/vue.vim deleted file mode 100644 index 066c3a6..0000000 --- a/nvim/dotfiles/coc-languages/vue.vim +++ /dev/null @@ -1 +0,0 @@ -call dotutils#add_unique(g:coc_global_extensions, '@yaegassy/coc-volar') diff --git a/nvim/dotfiles/lspconfigs/dart.lua b/nvim/dotfiles/lspconfigs/dart.lua deleted file mode 100644 index d7674ef..0000000 --- a/nvim/dotfiles/lspconfigs/dart.lua +++ /dev/null @@ -1,4 +0,0 @@ -local ignition = require("dotfiles.lsp.ignition") -local dartls_config = require("lspconfig.server_configurations.dartls").default_config - -ignition.setup_config("dartls", dartls_config) diff --git a/nvim/dotfiles/lspconfigs/php.lua b/nvim/dotfiles/lspconfigs/php.lua deleted file mode 100644 index 2effbad..0000000 --- a/nvim/dotfiles/lspconfigs/php.lua +++ /dev/null @@ -1,4 +0,0 @@ -local ignition = require("dotfiles.lsp.ignition") -local phpactor_config = require("lspconfig.server_configurations.phpactor").default_config - -ignition.setup_config("phpactor", phpactor_config) diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index 2640c72..c9fb199 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -3,7 +3,7 @@ exe dotplug#define_plug_here() " UI {{{ if has('nvim') Plug 'romgrk/barbar.nvim' - " Plug 'hoob3rt/lualine.nvim' + Plug 'hoob3rt/lualine.nvim' endif " }}} diff --git a/nvim/init.vim b/nvim/init.vim index 591d16f..2cc6d7e 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -9,11 +9,12 @@ let g:dotfiles_rainbow_indent_opacity = 0.5 let g:dotfiles_treesitter_highlighting = v:true let g:dotfiles_highlight_url_under_cursor = v:true -" Disables Airline's tabline to use barbar instead -let g:airline#extensions#tabline#enabled = 1 - source :p:h/../dmitmel-dotfiles/nvim/init.vim +" Disables Airline's tabline to use barbar instead +" let g:airline#extensions#tabline#enabled = 0 +" let g:airline#extensions#tabline#show_tabs = 0 + " Doesn't hurt to try and set again. set termguicolors diff --git a/nvim/plugin/airline.vim b/nvim/plugin/airline.vim new file mode 100644 index 0000000..32cb251 --- /dev/null +++ b/nvim/plugin/airline.vim @@ -0,0 +1 @@ +call remove(g:airline_extensions, index(g:airline_extensions, 'tabline')) diff --git a/nvim/plugin/commands.vim b/nvim/plugin/commands.vim index 7842ea6..f38449c 100644 --- a/nvim/plugin/commands.vim +++ b/nvim/plugin/commands.vim @@ -1 +1,3 @@ -command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') +if !(dotplug#has('coc.nvim') && g:vim_ide == 1) + command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport') +endif diff --git a/nvim/plugin/completion.vim b/nvim/plugin/completion.vim new file mode 100644 index 0000000..824849f --- /dev/null +++ b/nvim/plugin/completion.vim @@ -0,0 +1,23 @@ +if !(dotplug#has('coc.nvim') && g:vim_ide == 1) | finish | endif + +" Additional extensions {{{ +" Go +call dotutils#add_unique(g:coc_global_extensions, 'coc-go') +" Common Lisp +call dotutils#add_unique(g:coc_global_extensions, 'coc-cl') +" PHP +call dotutils#add_unique(g:coc_global_extensions, 'coc-phpls') +call dotutils#add_unique(g:coc_global_extensions, 'coc-blade') +call dotutils#add_unique(g:coc_global_extensions, 'coc-tighten-lint') +" Shell +call dotutils#add_unique(g:coc_global_extensions, 'coc-sh') +" TeX +call dotutils#add_unique(g:coc_global_extensions, 'coc-vimtex') +" Vue +call dotutils#add_unique(g:coc_global_extensions, '@yaegassy/coc-volar') +" }}} + +" Config {{{ +let g:coc_user_config['prettier'] = {} +let g:coc_user_config['prettier']['printWidth'] = 80 +" }}} diff --git a/nvim/plugin/keybinds.vim b/nvim/plugin/keybinds.vim index 517ac49..2adb72e 100644 --- a/nvim/plugin/keybinds.vim +++ b/nvim/plugin/keybinds.vim @@ -21,6 +21,11 @@ nnoremap :NERDTreeToggle endif " }}} +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags + " Copy to clipboard register and paste from clipboard register {{{ " Taken from https://unix.stackexchange.com/a/23437 nnoremap "+y From fdce81f86d2632d72ae082cc448cf85a913a8565 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 29 Jul 2025 11:50:14 +0200 Subject: [PATCH 42/55] [nvim] Add shift bindings to blink.nvim --- nvim/dotfiles/plugins-list.lua | 5 +++++ nvim/lua/adotfiles/plugins/blink.lua | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 nvim/dotfiles/plugins-list.lua create mode 100644 nvim/lua/adotfiles/plugins/blink.lua diff --git a/nvim/dotfiles/plugins-list.lua b/nvim/dotfiles/plugins-list.lua new file mode 100644 index 0000000..56cb46a --- /dev/null +++ b/nvim/dotfiles/plugins-list.lua @@ -0,0 +1,5 @@ +-- Not really part of the "plugins list" per-se, for the actual plugin list see `plugins-list.vim`. + +dotplug.plug({ + { import = 'adotfiles.plugins' }, +}) diff --git a/nvim/lua/adotfiles/plugins/blink.lua b/nvim/lua/adotfiles/plugins/blink.lua new file mode 100644 index 0000000..5eaae79 --- /dev/null +++ b/nvim/lua/adotfiles/plugins/blink.lua @@ -0,0 +1,18 @@ +---@type LazySpec +return { + 'blink.cmp', + ---@type blink.cmp.Config + opts = { + keymap = { + [''] = { + 'select_next', + 'fallback', + }, + + [''] = { + 'select_prev', + 'fallback', + }, + }, + }, +} From 23e5bc6e18a96487a37eafa4a5606df27c842eb7 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 15 Aug 2025 09:26:47 +0200 Subject: [PATCH 43/55] [nvim] Fully disable airline --- dmitmel-dotfiles | 2 +- nvim/init.vim | 4 +--- nvim/plugin/airline.vim | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 nvim/plugin/airline.vim diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 4193eb2..d0658b9 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 4193eb2e46a11d1ddcedf5b988e7ba1cbf43bc8a +Subproject commit d0658b9a8dcada27aed610b1d4e7364aca68b524 diff --git a/nvim/init.vim b/nvim/init.vim index 2cc6d7e..ab06f72 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -11,9 +11,7 @@ let g:dotfiles_highlight_url_under_cursor = v:true source :p:h/../dmitmel-dotfiles/nvim/init.vim -" Disables Airline's tabline to use barbar instead -" let g:airline#extensions#tabline#enabled = 0 -" let g:airline#extensions#tabline#show_tabs = 0 +let g:loaded_airline = 1 " Doesn't hurt to try and set again. set termguicolors diff --git a/nvim/plugin/airline.vim b/nvim/plugin/airline.vim deleted file mode 100644 index 32cb251..0000000 --- a/nvim/plugin/airline.vim +++ /dev/null @@ -1 +0,0 @@ -call remove(g:airline_extensions, index(g:airline_extensions, 'tabline')) From 027f30de6f3790d79b559a69139f3d40d5a1a55c Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 15 Aug 2025 09:27:07 +0200 Subject: [PATCH 44/55] [nvim] Enable the biome LSP --- nvim/after/lsp/biome.lua | 5 +++++ nvim/plugin/keybinds.vim | 2 ++ nvim/plugin/nlsp.lua | 1 + 3 files changed, 8 insertions(+) create mode 100644 nvim/after/lsp/biome.lua diff --git a/nvim/after/lsp/biome.lua b/nvim/after/lsp/biome.lua new file mode 100644 index 0000000..a1ccc0e --- /dev/null +++ b/nvim/after/lsp/biome.lua @@ -0,0 +1,5 @@ +---@type dotfiles.lsp.Config +return { + -- why aren't they configuring this??? + root_markers = { 'biome.json', 'biome.jsonc' }, +} diff --git a/nvim/plugin/keybinds.vim b/nvim/plugin/keybinds.vim index 2adb72e..cc331dd 100644 --- a/nvim/plugin/keybinds.vim +++ b/nvim/plugin/keybinds.vim @@ -1,5 +1,7 @@ nnoremap :NERDTreeToggle +inoremap db + " Completion {{{ if (dotplug#has('coc.nvim') && g:vim_ide == 1) function! s:check_back_space() abort diff --git a/nvim/plugin/nlsp.lua b/nvim/plugin/nlsp.lua index 2f1c1de..27ca9bf 100644 --- a/nvim/plugin/nlsp.lua +++ b/nvim/plugin/nlsp.lua @@ -3,5 +3,6 @@ if not (has_lsp and lsp.config ~= nil and vim.g.vim_ide == 2) then return end require('dotfiles.lsp_ignition').enable({ 'php', + 'biome', 'vimls', }) From cf522d758fb5db31a7c2cf84f16f08917806e5e0 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Fri, 15 Aug 2025 09:28:23 +0200 Subject: [PATCH 45/55] [common] Sync the Brewfile --- common/Brewfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/common/Brewfile b/common/Brewfile index 8edea9d..7946cf5 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -29,7 +29,8 @@ end packages = { taps: [ "ddev/ddev", - "the-wineskin-project/wineskin" + "the-wineskin-project/wineskin", + "isen-ng/dotnet-sdk-versions" ], brews: { # {{{ services: [ @@ -51,7 +52,6 @@ packages = { "dhall", "dhall-json", "dhall-lsp-server", - "dotnet", "go", "gradle", "kotlin", @@ -62,7 +62,8 @@ packages = { "poetry", "ruby", "stylua", - "uv" + "uv", + "yaml-language-server" ], tools: [ "act", @@ -99,6 +100,8 @@ packages = { "android-studio", "browserstacklocal", "crossover", + "dotnet-sdk9", + "dotnet-sdk8", "db-browser-for-sqlite", "discord", "discord@ptb", @@ -128,7 +131,7 @@ packages = { "slack", "spotify", # "steam", - "tailscale", + "tailscale-app", "thunderbird", "transmit", "visual-studio-code" From b089e7c894264fd7c2419b48d026ad8094a1d013 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 9 Sep 2025 12:37:36 +0200 Subject: [PATCH 46/55] [nvim] Add bashls support --- nvim/after/lsp/bashls.lua | 16 ++++++++++++++++ nvim/plugin/nlsp.lua | 1 + 2 files changed, 17 insertions(+) create mode 100644 nvim/after/lsp/bashls.lua diff --git a/nvim/after/lsp/bashls.lua b/nvim/after/lsp/bashls.lua new file mode 100644 index 0000000..e9bc27d --- /dev/null +++ b/nvim/after/lsp/bashls.lua @@ -0,0 +1,16 @@ +-- + +---@type dotfiles.lsp.Config +return { + cmd = { 'bash-language-server', 'start' }, + filetypes = { 'bash', 'sh' }, + root_markers = { '.git' }, + + settings = { + bashIde = { + globPattern = '*@(.sh|.bash)', + }, + }, + + build_settings = function(ctx) ctx.settings:merge(ctx.new_settings:pick({ 'bashIde' })) end, +} diff --git a/nvim/plugin/nlsp.lua b/nvim/plugin/nlsp.lua index 27ca9bf..a04fda9 100644 --- a/nvim/plugin/nlsp.lua +++ b/nvim/plugin/nlsp.lua @@ -5,4 +5,5 @@ require('dotfiles.lsp_ignition').enable({ 'php', 'biome', 'vimls', + 'bashls', }) From 3c56b0705e2a223be56b0a1ae4b3681feb85bf12 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 9 Sep 2025 12:38:04 +0200 Subject: [PATCH 47/55] [common] Add shellcheck & shfmt to Brewfile --- common/Brewfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/Brewfile b/common/Brewfile index 7946cf5..d24acbc 100644 --- a/common/Brewfile +++ b/common/Brewfile @@ -88,6 +88,8 @@ packages = { "neovim", "pandoc", "ripgrep", + "shellcheck", + "shfmt", "sops", "tealdeer", "wget" From 6541412dd7cdeacff935b941fe58c43b94c25020 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 30 Oct 2025 16:38:29 +0100 Subject: [PATCH 48/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index d0658b9..e8a0b7e 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit d0658b9a8dcada27aed610b1d4e7364aca68b524 +Subproject commit e8a0b7e401588cfc85768eb21867590b119e857a From 26a2edd016f917127d310d2f18f8ffcedc05c562 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 8 Dec 2025 09:08:24 +0100 Subject: [PATCH 49/55] [dmitmel] Update submodule --- LICENSE | 387 ++++++++++++++++++++++++++++++++++++++++++++--- dmitmel-dotfiles | 2 +- 2 files changed, 371 insertions(+), 18 deletions(-) diff --git a/LICENSE b/LICENSE index b76ad1c..570135f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,374 @@ -MIT License +Mozilla Public License Version 2.0 +================================== -Copyright (c) 2021 Keanu Timmermans +1. Definitions +-------------- -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index e8a0b7e..21548aa 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit e8a0b7e401588cfc85768eb21867590b119e857a +Subproject commit 21548aaa2481f5dadf76d9ef4aa60efcc39516e6 From b3645c1d99a70d41cb79e334f2ba289838ff6a6c Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 12 Jan 2026 11:10:08 +0100 Subject: [PATCH 50/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 21548aa..401dab4 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 21548aaa2481f5dadf76d9ef4aa60efcc39516e6 +Subproject commit 401dab42e7bfafed5849e7bbee3cc2c4561be466 From 8b9bea396a26ff6722590ab0830f085b4c8a8a14 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Mon, 2 Mar 2026 13:10:18 +0100 Subject: [PATCH 51/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 401dab4..8cf794a 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 401dab42e7bfafed5849e7bbee3cc2c4561be466 +Subproject commit 8cf794a949cfaf376c2019895295208e6b388611 From b3099abddd4dc9212934ac49c5388e02a00c8fb7 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 10 Mar 2026 13:45:57 +0100 Subject: [PATCH 52/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 8cf794a..148e9ce 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 8cf794a949cfaf376c2019895295208e6b388611 +Subproject commit 148e9ce414fdd77ce500fb1e164ad8fffc7d88a1 From d4f1284be81138239c520deec801d0dbef305a09 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 10 Mar 2026 13:46:22 +0100 Subject: [PATCH 53/55] [zsh] Don't show timestamps in history widget --- zsh/zle.zsh | 3 +++ zsh/zshrc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 zsh/zle.zsh diff --git a/zsh/zle.zsh b/zsh/zle.zsh new file mode 100644 index 0000000..b5b8268 --- /dev/null +++ b/zsh/zle.zsh @@ -0,0 +1,3 @@ +_fzf_history_list() { + fc -lr 1 | sed "s/^[[:space:]]*[0-9][0-9]*/${${${fg[blue]//\\/\\\\}//\//\\\/}//&/\\&}&${${${reset_color//\\/\\\\}//\//\\\/}//&/\\&}/" +} diff --git a/zsh/zshrc b/zsh/zshrc index 951ef40..6461e5f 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -9,7 +9,7 @@ A_ZSH_DOTFILES="$( dirname "$( readlink -f "$0" )" )" DOTFILES_SYNC_LAST_WORKING_DIR=1 _dotfiles_customizations() { - for script in functions plugins aliases; do + for script in functions plugins aliases zle; do source "$A_ZSH_DOTFILES/$script.zsh" done From 4009ba914b5bea9659714e305096960ba645e4c2 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 23 Apr 2026 15:30:42 +0200 Subject: [PATCH 54/55] [dmitmel] Update submodule --- dmitmel-dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmitmel-dotfiles b/dmitmel-dotfiles index 148e9ce..7b2b39e 160000 --- a/dmitmel-dotfiles +++ b/dmitmel-dotfiles @@ -1 +1 @@ -Subproject commit 148e9ce414fdd77ce500fb1e164ad8fffc7d88a1 +Subproject commit 7b2b39e8fa5a00a990c683fb69bae88462defb83 From b765d204203297a7a003603e5c62d931543370bc Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 23 Apr 2026 15:31:14 +0200 Subject: [PATCH 55/55] [nvim] Misc fixes & changes Co-Authored-By: Dmytro Meleshko --- nvim/dotfiles/plugins-list.vim | 1 + nvim/ftdetect/dotfiles.lua | 5 +++++ nvim/ftplugin/mdx.vim | 8 ++++++++ nvim/plugin/barbar.lua | 3 +++ nvim/plugin/nlsp.lua | 1 + 5 files changed, 18 insertions(+) create mode 100644 nvim/ftdetect/dotfiles.lua create mode 100644 nvim/ftplugin/mdx.vim diff --git a/nvim/dotfiles/plugins-list.vim b/nvim/dotfiles/plugins-list.vim index c9fb199..d36523c 100644 --- a/nvim/dotfiles/plugins-list.vim +++ b/nvim/dotfiles/plugins-list.vim @@ -30,6 +30,7 @@ exe dotplug#define_plug_here() Plug 'lervag/vimtex' Plug 'm-pilia/vim-mediawiki' Plug 'aquach/vim-mediawiki-editor' + Plug 'davidmh/mdx.nvim' " }}} " Misc {{{ diff --git a/nvim/ftdetect/dotfiles.lua b/nvim/ftdetect/dotfiles.lua new file mode 100644 index 0000000..08ee3e3 --- /dev/null +++ b/nvim/ftdetect/dotfiles.lua @@ -0,0 +1,5 @@ +vim.filetype.add({ + extension = { + mdx = 'mdx' + } +}) diff --git a/nvim/ftplugin/mdx.vim b/nvim/ftplugin/mdx.vim new file mode 100644 index 0000000..4249185 --- /dev/null +++ b/nvim/ftplugin/mdx.vim @@ -0,0 +1,8 @@ +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +" Taken from $VIMRUNTIME/ftplugin/javascript.vim +exe dotfiles#ft#setlocal('comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://') +exe dotfiles#ft#setlocal('commentstring=//\ %s') diff --git a/nvim/plugin/barbar.lua b/nvim/plugin/barbar.lua index 6b8a3fa..e1b5f5b 100644 --- a/nvim/plugin/barbar.lua +++ b/nvim/plugin/barbar.lua @@ -15,6 +15,9 @@ barbar.setup({ local map = vim.api.nvim_set_keymap local opts = { noremap = true, silent = true } +map('n', '', 'BufferNext', opts) +map('n', '', 'BufferPrevious', opts) + -- Navigating buffers map('n', '', 'BufferPrevious', opts) map('n', '', 'BufferNext', opts) diff --git a/nvim/plugin/nlsp.lua b/nvim/plugin/nlsp.lua index a04fda9..bb7e3c7 100644 --- a/nvim/plugin/nlsp.lua +++ b/nvim/plugin/nlsp.lua @@ -6,4 +6,5 @@ require('dotfiles.lsp_ignition').enable({ 'biome', 'vimls', 'bashls', + 'mdx_analyzer' })