From 8140ca0cca0cc7e262c148d409709ff167b4355c Mon Sep 17 00:00:00 2001 From: Thilo Billerbeck Date: Mon, 13 May 2024 14:28:18 +0200 Subject: [PATCH] small hm improvements --- flake.nix | 9 ++++++++- home-manager/modules/machine.nix | 10 ---------- home-manager/modules/packages.nix | 1 + home-manager/programs/command-not-found.nix | 2 +- home-manager/programs/zsh.nix | 3 +-- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index f25e6f2..7d3742d 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,10 @@ }; suyu.url = "github:Noodlez1232/suyu-flake"; nix-alien.url = "github:thiagokokada/nix-alien"; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; nixConfig = { @@ -71,7 +75,10 @@ homeConfigurations."thilo@thilo-pc" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [ ./configs/fedora/home.nix ]; + modules = [ + inputs.nix-index-database.hmModules.nix-index + ./configs/fedora/home.nix + ]; extraSpecialArgs = { inherit inputs nixgl; }; }; homeConfigurations."thilo@thilo-laptop" = diff --git a/home-manager/modules/machine.nix b/home-manager/modules/machine.nix index 0e11133..e6507a3 100644 --- a/home-manager/modules/machine.nix +++ b/home-manager/modules/machine.nix @@ -117,16 +117,6 @@ with lib; { }] ''; }; - activation = { - setNodeGlobalDir = { - after = [ "writeBoundary" "createXdgUserDirectories" ]; - before = [ ]; - data = '' - mkdir -p ${config.home.homeDirectory}/.node-global - ${pkgs.nodejs}/bin/npm config set prefix ${config.home.homeDirectory}/.node-global - ''; - }; - }; sessionPath = [ "${config.home.homeDirectory}/.node-global/bin" ]; }; diff --git a/home-manager/modules/packages.nix b/home-manager/modules/packages.nix index f536b75..23744c0 100644 --- a/home-manager/modules/packages.nix +++ b/home-manager/modules/packages.nix @@ -89,6 +89,7 @@ in config.machine.isGraphical ) then [ (nixGL insomnia) + (nixGL comma) ] else [ ] ) ++ ( diff --git a/home-manager/programs/command-not-found.nix b/home-manager/programs/command-not-found.nix index b38008d..c668aef 100644 --- a/home-manager/programs/command-not-found.nix +++ b/home-manager/programs/command-not-found.nix @@ -1 +1 @@ -{ programs.command-not-found = { enable = true; }; } +{ programs.command-not-found = { enable = false; }; } diff --git a/home-manager/programs/zsh.nix b/home-manager/programs/zsh.nix index 144ea62..ceb8281 100644 --- a/home-manager/programs/zsh.nix +++ b/home-manager/programs/zsh.nix @@ -18,9 +18,8 @@ update-local = "bash $HOME/.dotfiles/install"; }; initExtra = '' - [ -d ~/.npm-global ] || mkdir ~/.npm-global - ${pkgs.nodejs}/bin/npm config set prefix '~/.npm-global' export PATH=~/.npm-global/bin:$PATH + source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh ''; plugins = [ {