Skip to content

Commit

Permalink
home-manager/asdf: init
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 30, 2024
1 parent 7cedc48 commit 317ab0c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions home-manager/dev/asdf.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
config,
pkgs,
lib,
...
}:

{
options.home-manager.dev.asdf.enable = lib.mkEnableOption "asdf config" // {
default = config.home-manager.dev.enable;
};

config = lib.mkIf config.home-manager.dev.asdf.enable {
home = {
file.".asdfrc".text = lib.generators.toKeyValue {} {
legacy_version_file = "yes";
};

packages = with pkgs; [ asdf-vm ];
};

programs.zsh = {
initExtra = ''
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY=latest_installed
fpath+=(${pkgs.asdf-vm}/share/zsh/site-functions)
source "${pkgs.asdf-vm}/share/asdf-vm/asdf.sh"
'';
};
};
}
1 change: 1 addition & 0 deletions home-manager/dev/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

{
imports = [
./asdf.nix
./clojure.nix
./go.nix
./nix.nix
Expand Down

0 comments on commit 317ab0c

Please sign in to comment.