From 2cd767ae5bbd9e83d38f7899b61f2c272cf04669 Mon Sep 17 00:00:00 2001 From: Patrick Stevens Date: Mon, 28 Aug 2023 11:18:05 +0100 Subject: [PATCH] Add rg, poetry, woodpecker-agent, stable Emacs, upstreamed VSCode plugins (#18) --- daily-home.nix | 9 ++++- flake.lock | 86 ++++++++++++++++++++++--------------------- flake.nix | 7 ++-- home.nix | 1 + rider/default.nix | 2 +- ripgrep.conf | 6 +++ vscode-extensions.nix | 52 ++++---------------------- 7 files changed, 73 insertions(+), 90 deletions(-) create mode 100644 ripgrep.conf diff --git a/daily-home.nix b/daily-home.nix index 951d950..1086345 100644 --- a/daily-home.nix +++ b/daily-home.nix @@ -55,6 +55,8 @@ nixpkgs.nodejs nixpkgs.sqlitebrowser nixpkgs.typst + nixpkgs.poetry + nixpkgs.woodpecker-agent ]; programs.vscode = { @@ -86,6 +88,10 @@ shellAliases = { cmake = "cmake -DCMAKE_MAKE_PROGRAM=${nixpkgs.gnumake}/bin/make -DCMAKE_AR=${nixpkgs.darwin.cctools}/bin/ar -DCMAKE_RANLIB=${nixpkgs.darwin.cctools}/bin/ranlib -DGMP_INCLUDE_DIR=${nixpkgs.gmp.dev}/include/ -DGMP_LIBRARIES=${nixpkgs.gmp}/lib/libgmp.10.dylib"; ar = "${nixpkgs.darwin.cctools}/bin/ar"; + grep = "${nixpkgs.ripgrep}/bin/rg"; + }; + sessionVariables = { + RIPGREP_CONFIG_PATH = "/Users/${username}/.config/ripgrep/config"; }; }; @@ -96,9 +102,10 @@ home.file.".config/youtube-dl/config".source = ./youtube-dl.conf; home.file.".config/yt-dlp/config".source = ./youtube-dl.conf; + home.file.".config/ripgrep/config".source = ./ripgrep.conf; programs.emacs = { enable = true; - package = nixpkgs.emacsUnstable; + package = nixpkgs.emacs; extraPackages = epkgs: []; extraConfig = '' (load-file (let ((coding-system-for-read 'utf-8)) diff --git a/flake.lock b/flake.lock index 836e865..334e68c 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1680266963, - "narHash": "sha256-IW/lzbUCOcldLHWHjNSg1YoViDnZOmz0ZJL7EH9OkV8=", + "lastModified": 1692248770, + "narHash": "sha256-tZeFpETKQGbgnaSIO1AGWD27IyTcBm4D+A9d7ulQ4NM=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "99d4187d11be86b49baa3a1aec0530004072374f", + "rev": "511177ffe8226c78c9cf6a92a7b5f2df3684956b", "type": "github" }, "original": { @@ -26,30 +26,33 @@ "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" - ] + ], + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1678439275, - "narHash": "sha256-ugErJAZB0K5Ml6Gow94e3knILog9nSXpBTVVv70r6DY=", + "lastModified": 1692762523, + "narHash": "sha256-O+PXo3f2fwQSkip7Sup0BUi6v292/zMScs8Ebq/euJw=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "c8421fbdb7d831296ecb735c8a7f60964809c857", + "rev": "c82b1bb82f4935d7b6d85d5ed8fe7cbade780c72", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", - "rev": "c8421fbdb7d831296ecb735c8a7f60964809c857", "type": "github" } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -62,15 +65,14 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1680249941, - "narHash": "sha256-7Ylr0NAr8msd3YVaYBw6uyJIRbtOq5l6aLrmrYA5qTw=", + "lastModified": 1692720545, + "narHash": "sha256-DQDremUH7lRxiZEIVh6C6kQusuPe1vUKtiVl29nmP0E=", "owner": "nix-community", "repo": "home-manager", - "rev": "67b97020b6970d39b4126a7870063d11337ecb80", + "rev": "8eb8c212e50e2fd95af5849585a2eb819add0a1e", "type": "github" }, "original": { @@ -81,11 +83,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1680273054, - "narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=", + "lastModified": 1692684269, + "narHash": "sha256-zJk2pyF4Cuhtor0khtPlf+hfJIh22rzAUC+KU3Ob31Q=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3", + "rev": "9d757ec498666cc1dcc6f2be26db4fd3e1e9ab37", "type": "github" }, "original": { @@ -97,32 +99,32 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1679748960, - "narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=", + "lastModified": 1692698134, + "narHash": "sha256-YtMmZWR/dlTypOcwiZfZTMPr3tj9fwr05QTStfSyDSg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "da26ae9f6ce2c9ab380c0f394488892616fc5a6a", + "rev": "a16f7eb56e88c8985fcc6eb81dabd6cade4e425a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-22.11", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-stable_2": { "locked": { - "lastModified": 1679734080, - "narHash": "sha256-z846xfGLlon6t9lqUzlNtBOmsgQLQIZvR6Lt2dImk1M=", + "lastModified": 1692492726, + "narHash": "sha256-rld5qm2B4oRkDwcPD+yOSyTrZQdfCR6mzJGGkecjvTs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dbf5322e93bcc6cfc52268367a8ad21c09d76fea", + "rev": "5e63e8bbc46bc4fc22254da1edaf42fc7549c18a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "release-23.05", "repo": "nixpkgs", "type": "github" } @@ -138,15 +140,17 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1679993313, - "narHash": "sha256-pfZ/BxJDTifnQBMXg60OhwpJvg96LHvEXGtpHeGcWLM=", + "lastModified": 1692728678, + "narHash": "sha256-02MjG7Sb9k7eOi86CcC4GNWVOjT6gjmXFSqkRjZ8Xyk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "5b26523e28989a7f56953b695184070c06335814", + "rev": "1b7b3a32d65dbcd69c217d7735fdf0a6b2184f45", "type": "github" }, "original": { @@ -155,18 +159,18 @@ "type": "github" } }, - "utils": { + "systems": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "nix-systems", + "repo": "default", "type": "github" } } diff --git a/flake.nix b/flake.nix index a64d670..001bf32 100644 --- a/flake.nix +++ b/flake.nix @@ -13,11 +13,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; emacs = { - url = "github:nix-community/emacs-overlay/c8421fbdb7d831296ecb735c8a7f60964809c857"; + url = "github:nix-community/emacs-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; sops-nix = { - url = github:Mic92/sops-nix; + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -31,7 +32,7 @@ ... } @ inputs: let config = { - #contentAddressedByDefault = true; + # contentAddressedByDefault = true; allowUnfree = true; }; in let diff --git a/home.nix b/home.nix index 38b85d0..35cee64 100644 --- a/home.nix +++ b/home.nix @@ -82,6 +82,7 @@ in { }; push = { default = "current"; + autoSetupRemote = true; }; pull = { rebase = false; diff --git a/rider/default.nix b/rider/default.nix index 59a34ea..f4a6201 100644 --- a/rider/default.nix +++ b/rider/default.nix @@ -10,7 +10,7 @@ in let in let riderconfig = pkgs.stdenv.mkDerivation { name = "rider-config"; - version = "2021.2"; + version = "2023.1"; __contentAddressed = true; src = src; diff --git a/ripgrep.conf b/ripgrep.conf new file mode 100644 index 0000000..609872d --- /dev/null +++ b/ripgrep.conf @@ -0,0 +1,6 @@ +# Don't let ripgrep vomit really long lines to my terminal, and show a preview. +--max-columns=150 +--max-columns-preview + +# Ignore contents of .git +--glob=!.git/* diff --git a/vscode-extensions.nix b/vscode-extensions.nix index cd5a022..8be0fba 100644 --- a/vscode-extensions.nix +++ b/vscode-extensions.nix @@ -6,8 +6,14 @@ with pkgs.vscode-extensions; yzhang.markdown-all-in-one james-yu.latex-workshop vscodevim.vim - # Not supported on Darwin, apparently - # ms-dotnettools.csharp + ms-dotnettools.csharp + ms-vscode-remote.remote-ssh + justusadam.language-haskell + rust-lang.rust-analyzer + github.vscode-pull-request-github + shardulm94.trailing-spaces + nvarner.typst-lsp + arrterian.nix-env-selector ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ { @@ -16,30 +22,12 @@ with pkgs.vscode-extensions; version = "0.285.0"; sha256 = "sha256-UHp6Ewx0bUvPjgaO0A5k77SGj8ovPFLl/WvxyLcZ4y0="; } - { - name = "nix-env-selector"; - publisher = "arrterian"; - version = "1.0.9"; - sha256 = "sha256-TkxqWZ8X+PAonzeXQ+sI9WI+XlqUHll7YyM7N9uErk0="; - } { name = "vscode-hsx"; publisher = "s0kil"; version = "0.4.0"; sha256 = "sha256-/WRy+cQBqzb6QB5+AizlyIcjqNpZ86o2at885hOcroM="; } - { - name = "vscode-pull-request-github"; - publisher = "GitHub"; - version = "0.61.2023031710"; - sha256 = "sha256-3CZYbEkpLaBkUexhdVdCevNNBHlu7EBszt5E1o4rif8="; - } - { - name = "remote-ssh"; - publisher = "ms-vscode-remote"; - version = "0.99.2023031515"; - sha256 = "sha256-X77QJER3u+MhhP87TBEw8S+mTDkUymQM0aanHipRod4="; - } { name = "vscode-docker"; publisher = "ms-azuretools"; @@ -70,12 +58,6 @@ with pkgs.vscode-extensions; version = "0.0.101"; sha256 = "sha256-tHxP6X6qp3qVkkCn5TjhHrYHHvGGWJ4kYE7la6bPT6w="; } - { - name = "language-haskell"; - publisher = "justusadam"; - version = "3.6.0"; - sha256 = "0ab7m5jzxakjxaiwmg0jcck53vnn183589bbxh3iiylkpicrv67y"; - } { name = "vscode-clang"; publisher = "mitaki28"; @@ -100,30 +82,12 @@ with pkgs.vscode-extensions; version = "0.1.4"; sha256 = "1im78k2gaj6cri2jcvy727qdy25667v0f7vv3p3hv13apzxgzl0l"; } - { - name = "trailing-spaces"; - publisher = "shardulm94"; - version = "0.4.1"; - sha256 = "0h30zmg5rq7cv7kjdr5yzqkkc1bs20d72yz9rjqag32gwf46s8b8"; - } { name = "debug"; publisher = "webfreak"; version = "0.26.1"; sha256 = "sha256-lLLa8SN+Sf9Tbi7HeWYWa2KhPQFJyQWrf9l3EUljwYo="; } - { - name = "rust-analyzer"; - publisher = "rust-lang"; - version = "0.4.1440"; - sha256 = "sha256-SZCiP82UV5E6PZRduQGxvOhrZw5noH9Cr0cFpATDKqc="; - } - { - name = "typst-lsp"; - publisher = "nvarner"; - version = "0.2.0"; - sha256 = "sha256-FLFmXOGfFqZyf3YSMyVKwZh/tPdFCPY3Z++/6AI5FQc="; - } ] ++ [ (let