From 3272e9415755ebc4e6a024c78036d31217fcb9e9 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Thu, 26 Mar 2026 09:32:49 +1000 Subject: [PATCH] create elvish home-manager module --- homes/me/default.nix | 7 ++++++- homes/modules/shell/elvish.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 homes/modules/shell/elvish.nix diff --git a/homes/me/default.nix b/homes/me/default.nix index 8f4c8ea..b800d70 100755 --- a/homes/me/default.nix +++ b/homes/me/default.nix @@ -4,8 +4,10 @@ ./modules/cli/ssh.nix ../modules/term/foot.nix - ../modules/shell/fish.nix ../modules/shell/zsh.nix + ../modules/shell/zsh.nix + ../modules/shell/fish.nix + ../modules/shell/elvish.nix ../modules/editor/helix.nix ../modules/editor/neovim @@ -23,8 +25,11 @@ ../modules/wm/hyprland ../modules/wm/mango ../modules/de/mako.nix + ../modules/de/waybar ]; + programs.elvish.enable = true; + home = { shellAliases = { # nix diff --git a/homes/modules/shell/elvish.nix b/homes/modules/shell/elvish.nix new file mode 100644 index 0000000..44a19dd --- /dev/null +++ b/homes/modules/shell/elvish.nix @@ -0,0 +1,29 @@ +{ + config, + pkgs, + lib, + ... +}: let + cfg = config.programs.elvish; +in { + options.programs.elvish = { + enable = lib.mkEnableOption "elvish"; + }; + + config = lib.mkIf cfg.enable { + home = { + packages = with pkgs; [elvish]; + + file.".elvish/nix.elv".source = let + elvish-modules = pkgs.fetchFromGitHub { + owner = "zzamboni"; + repo = "elvish-modules"; + rev = "9005c970346ab06214b3cd3ed3e70f04f3c632ba"; + hash = "sha256-/Dwtl12QzPvMoMMGoj+v3dwX2ZwFT8t/bohVy1zDE0c="; + }; + in + builtins.toPath "${elvish-modules}/nix.elv"; + # /${builtins.toPath elvish-modules.outPath}/nix.elv; + }; + }; +}