nix-config/modules/home.nix

94 lines
2.1 KiB
Nix
Raw Normal View History

2024-10-06 19:53:29 +00:00
{
lib,
pkgs,
emacs-larstvei,
...
}:
2024-10-06 16:27:11 +00:00
let
concatAttrVals = attrSet: lib.concatMap (x: x) (lib.attrValues attrSet);
2024-10-06 19:53:29 +00:00
tools = import ./tools.nix {
inherit pkgs;
inherit emacs-larstvei;
};
2024-10-06 16:27:11 +00:00
langauges = import ./languages.nix { inherit pkgs; };
in
{
home.packages = concatAttrVals langauges ++ concatAttrVals tools;
2024-07-21 13:35:08 +00:00
home.file.".config/enchant/hunspell/".source = "${pkgs.hunspellDicts.nb_NO}/share/hunspell/";
2022-09-19 14:23:37 +00:00
programs = {
fzf = {
enable = true;
enableFishIntegration = true;
};
2022-09-19 14:23:37 +00:00
fish = {
enable = true;
2022-09-19 14:23:37 +00:00
functions = {
track_directories = {
description = "For directory tracking in emacs vterm";
onEvent = "fish_postexec";
body = "printf \'\\e]51;A\'(pwd)\'\\e\\\\\'";
};
};
2022-09-19 14:23:37 +00:00
shellInit = ''
if test "$TERM" != "dumb"
track_directories
end
set -gx DIRENV_LOG_FORMAT ""
2022-09-19 14:23:37 +00:00
'';
};
2022-09-19 14:23:37 +00:00
starship = {
enable = true;
settings = {
custom = {
direnv = {
format = "[\\[direnv\\]]($style) ";
when = "env | grep -E '^DIRENV_FILE='";
};
};
2022-09-19 14:23:37 +00:00
character = {
success_symbol = "[λ](bold green)";
error_symbol = "[λ](bold red)";
};
};
};
git = {
enable = true;
userName = "larstvei";
userEmail = "larstvei@ifi.uio.no";
2024-10-06 19:53:29 +00:00
ignores = [
".envrc"
".DS_Store"
".direnv"
];
2022-09-19 14:23:37 +00:00
};
2023-02-18 20:06:14 +00:00
direnv = {
enable = true;
nix-direnv.enable = true;
};
2022-11-03 11:25:27 +00:00
# Sets JAVA_HOME environment variable
java.enable = true;
2022-09-19 14:23:37 +00:00
# Let Home Manager install and manage itself.
home-manager.enable = true;
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.11";
}