dotfiles/config/nix/hm/common.nix

162 lines
3.8 KiB
Nix
Raw Normal View History

2023-10-28 23:03:27 +02:00
{ pkgs, config, ... }:
2023-10-28 22:09:36 +02:00
{
programs = {
2023-10-28 23:03:27 +02:00
home-manager.enable = true;
bash.enable = true; # Just in case the default shell is not ZSH, so we still have the variables
2023-10-28 22:09:36 +02:00
zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
# syntaxHighlighting.enable = true; # 23.11 syntax
2023-11-05 21:37:36 +01:00
historySubstringSearch.enable = true;
2023-11-05 23:19:04 +01:00
initExtra = builtins.readFile ./zshrc.sh;
defaultKeymap = "viins";
2023-11-05 21:37:36 +01:00
};
powerline-go = {
enable = true;
modules = [ "user" "host" "venv" "cwd" "perms" "git" ];
modulesRight = [ "jobs" "exit" "duration" "load" ];
settings = {
colorize-hostname = true;
max-width = 25;
cwd-max-dir-size = 10;
duration = "$( test -n \"$__TIMER\" && echo $(( $EPOCHREALTIME - $\{__TIMER:-EPOCHREALTIME})) || echo 0 )";
# UPST Implement this properly in home-manager
};
extraUpdatePS1 = ''unset __TIMER'';
2023-10-28 22:09:36 +02:00
};
2023-10-29 12:15:56 +01:00
# neovim = {
# enable = true;
# defaultEditor = true;
# vimAlias = true;
# viAlias = true;
# vimdiffAlias = true;
# };
# FIXME Still want this despite using nixvim
2023-10-28 23:03:27 +02:00
gpg = {
enable = true;
homedir = "${config.xdg.stateHome}/gnupg";
2023-10-28 23:03:27 +02:00
settings = {
# Remove fluff
no-greeting = true;
no-emit-version = true;
no-comments = true;
# Output format that I prefer
keyid-format = "0xlong";
# Show fingerprints
with-fingerprint = true;
# Make sure to show if key is invalid
# (should be default on most platform,
# but just to be sure)
list-options = "show-uid-validity";
verify-options = "show-uid-validity";
# Stronger algorithm (https://wiki.archlinux.org/title/GnuPG#Different_algorithm)
personal-digest-preferences = "SHA512";
cert-digest-algo = "SHA512";
default-preference-list = "SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed";
personal-cipher-preferences = "TWOFISH CAMELLIA256 AES 3DES";
};
publicKeys = [{
source = builtins.fetchurl {
url = "https://keys.openpgp.org/vks/v1/by-fingerprint/4FBA930D314A03215E2CDB0A8312C8CAC1BAC289";
sha256 = "sha256:10y9xqcy1vyk2p8baay14p3vwdnlwynk0fvfbika65hz2z8yw2cm";
};
trust = "ultimate";
}];
};
2023-11-05 16:43:01 +01:00
fzf.enable = true;
# TODO highlight or bat
2023-11-05 23:19:04 +01:00
nix-index = {
enable = true;
enableZshIntegration = true;
};
2023-10-28 22:09:36 +02:00
};
2023-11-05 21:32:31 +01:00
home = {
stateVersion = "23.05";
language = {
base = "en_US.UTF-8";
time = "en_DK.UTF-8";
};
2023-11-05 21:32:31 +01:00
packages = with pkgs; [
# dotfiles dependencies
coreutils
bash
gnugrep
gnused
gnutar
openssl
git
wget
curl
python3Packages.pip
ansible # TODO Reevaluate
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# shell
zsh-completions
nix-zsh-completions
zsh-history-substring-search
antigen # TODO Reevaluate
powerline-go
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# terminal essentials
moreutils
man
visidata
nodePackages.insect
translate-shell
unzip
unrar
p7zip
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# remote
openssh
rsync
borgbackup
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# cleanup
ncdu
jdupes
duperemove
optipng
libjpeg
# FIXME reflac not available (but also a dumb shell script)
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# local monitoring
htop
iotop
iftop
lsof
strace
pv
progress
speedtest-cli
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# multimedia toolbox
ffmpeg
sox
imagemagick
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# password
pass
pwgen
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# Mail
isync
msmtp
notmuch
neomutt
lynx
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
# Organisation
vdirsyncer
khard
khal
todoman
syncthing
2023-10-28 22:09:36 +02:00
2023-11-05 21:32:31 +01:00
];
};
2023-10-28 22:09:36 +02:00
}