From 99a6121348b365f8e017f40a9e997d5d631d5059 Mon Sep 17 00:00:00 2001 From: teesh3rt Date: Tue, 17 Feb 2026 16:15:01 +0200 Subject: [PATCH] feat: add some stuff that is useful for elixir --- flake.lock | 87 +++++++++++++++++++++++++++++++++++++++-- flake.nix | 3 ++ modules/base/eza.nix | 2 +- modules/base/neovim.nix | 36 ++++++++++++++--- 4 files changed, 118 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index c00a4b8..1fe54ea 100644 --- a/flake.lock +++ b/flake.lock @@ -68,6 +68,31 @@ "type": "github" } }, + "beam-flakes": { + "inputs": { + "flake-parts": [ + "expert", + "flake-parts" + ], + "nixpkgs": [ + "expert", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1763144771, + "narHash": "sha256-VWF3RK2lNPX5tz14LnJM7DXkP1YwgrTuu3RqeVEymCk=", + "owner": "elixir-tools", + "repo": "nix-beam-flakes", + "rev": "0927b7964669ff9301e90ec5753ac81885a4b1bf", + "type": "github" + }, + "original": { + "owner": "elixir-tools", + "repo": "nix-beam-flakes", + "type": "github" + } + }, "copyparty": { "inputs": { "flake-utils": "flake-utils", @@ -87,6 +112,28 @@ "type": "github" } }, + "expert": { + "inputs": { + "beam-flakes": "beam-flakes", + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771186554, + "narHash": "sha256-GsCJkjkNh1SlkefsF1rCL0yhmLFOazHDgc8MAOTnzno=", + "owner": "elixir-lang", + "repo": "expert", + "rev": "71c33f10ba8ab566a4e12dba024dba3e8c6f7c73", + "type": "github" + }, + "original": { + "owner": "elixir-lang", + "repo": "expert", + "type": "github" + } + }, "firefox-addons": { "inputs": { "nixpkgs": [ @@ -126,6 +173,24 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1762980239, + "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixpkgs" @@ -145,7 +210,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -360,6 +425,21 @@ "type": "indirect" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1761765539, + "narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "719359f4562934ae99f5443f20aa06c2ffff91fc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1770136044, @@ -488,8 +568,9 @@ "root": { "inputs": { "copyparty": "copyparty", + "expert": "expert", "firefox-addons": "firefox-addons", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "home-manager": "home-manager", "import-tree": "import-tree", "lazyvim": "lazyvim", @@ -547,7 +628,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index a7412cb..767be33 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,9 @@ }; copyparty.url = "github:9001/copyparty"; + + expert.url = "github:elixir-lang/expert"; + expert.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs @ {flake-parts, ...}: diff --git a/modules/base/eza.nix b/modules/base/eza.nix index 5c4605c..7a3bad8 100644 --- a/modules/base/eza.nix +++ b/modules/base/eza.nix @@ -2,7 +2,7 @@ flake.modules.nixos.base = {pkgs, ...}: { environment.systemPackages = [pkgs.eza]; environment.shellAliases = { - "eza" = "${pkgs.eza}/bin/eza -lah --sort=type --icons=auto"; + "eza" = "${pkgs.eza}/bin/eza -lah --sort=type --icons=auto --git-ignore"; "ls" = "${pkgs.eza}/bin/eza"; }; }; diff --git a/modules/base/neovim.nix b/modules/base/neovim.nix index 750869c..8c34f9b 100644 --- a/modules/base/neovim.nix +++ b/modules/base/neovim.nix @@ -6,7 +6,10 @@ programs.neovim.defaultEditor = true; }; - flake.modules.homeManager.base = {pkgs, ...}: { + flake.modules.homeManager.base = {pkgs, ...}: let + system = pkgs.stdenv.hostPlatform.system; + expert = inputs.expert.packages.${system}.expert; + in { imports = [inputs.lazyvim.homeManagerModules.default]; programs.neovim.enable = true; @@ -14,11 +17,13 @@ programs.lazyvim = { enable = true; - extraPackages = with pkgs; [ - nixd - alejandra - statix - ]; + extraPackages = with pkgs; + [ + nixd + alejandra + statix + ] + ++ [expert]; plugins.catppuccin = '' return { "LazyVim/LazyVim", opts = { colorscheme = "catppuccin" } } ''; @@ -72,6 +77,18 @@ } } ''; + plugins.elixir = '' + return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + expert = {}, + }, + }, + }, + } + ''; extras = { lang.nix = { enable = true; @@ -108,6 +125,13 @@ installDependencies = true; }; + lang.elixir.enable = true; + lang.elixir.installDependencies = true; + lang.gleam.enable = true; + lang.gleam.installDependencies = true; + lang.erlang.enable = true; + lang.erlang.installDependencies = true; + # only reason we don't add `pkgs.claude-code` to base is because base is meant to be things for servers, # we do need neovim on the server but we don't need a clanker on there too! #