share direnv

This commit is contained in:
Sridhar Ratnakumar 2022-04-08 22:42:01 -04:00
parent 5aaeb0ee44
commit a34a5e90c5
3 changed files with 14 additions and 57 deletions

View file

@ -112,7 +112,6 @@
modules = [
overlayModule
./hosts/darwin.nix
./features/nix-direnv.nix
./features/caches/oss.nix
home-manager.darwinModules.home-manager
{
@ -124,6 +123,7 @@
./home/tmux.nix
./home/neovim.nix
./home/terminal.nix
./home/direnv.nix
# https://github.com/NixOS/nixpkgs/issues/160876
# ./home/starship.nix
];

View file

@ -1,13 +1,13 @@
# Linux only. Will want to consolidate with macOS.
# Linux only. TODO: Will want to consolidate with macOS.
{ pkgs, inputs, system, ... }:
rec {
imports = [
inputs.nix-doom-emacs.hmModule
./home/tmux.nix
./home/git.nix
./home/neovim.nix
./home/starship.nix
./home/terminal.nix
./home/direnv.nix
];
home.packages = with pkgs; [
@ -16,71 +16,19 @@ rec {
lsof
# psutils -- collides with tex
usbutils
git-crypt
ghcid
sqlite
gcc
cachix
tig
procs # no more: ps -ef | grep
tealdeer
unzip
dust
ripgrep
htop
bottom # htop alternative
fzf
aria2
wol
pulsemixer
# ^ easy to forget these; write SRS?
hledger
hledger-web
];
programs = {
# Leaving this disabled, as it doesn't look like nix-doom-emacs is being
# maintained or kept up to date anymore.
doom-emacs = {
enable = true;
doomPrivateDir = ./config/doom.d;
};
bash = {
enable = true;
# XXX: These are needed only on non-NixOS Linux (on NixOS, they are broken)
#bashrcExtra = ''
# . ~/.nix-profile/etc/profile.d/nix.sh
# export PATH=$HOME/.nix-profile/bin:$PATH
# # https://github.com/nix-community/home-manager/issues/1871#issuecomment-852739277
# for completion_script in ~/.nix-profile/share/bash-completion/completions/*
# do
# source "$completion_script"
# done
#'';
} // (import ./home/shellcommon.nix { inherit pkgs; });
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv = {
enable = true;
};
};
};
programs.ssh = {
programs.bash = {
enable = true;
matchBlocks = {
"thick" = {
hostname = "192.168.2.14";
};
};
};
} // (import ./home/shellcommon.nix { inherit pkgs; });
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage

9
home/direnv.nix Normal file
View file

@ -0,0 +1,9 @@
{
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv = {
enable = true;
};
};
}