2018-10-21 21:28:52 +00:00
|
|
|
{pkgs, ... }: {
|
2018-12-31 09:08:11 +00:00
|
|
|
imports = [ ./zsh.nix ];
|
2018-09-19 00:52:58 +00:00
|
|
|
home-manager.users.makefu = {
|
|
|
|
services.gpg-agent = {
|
2018-10-21 21:28:52 +00:00
|
|
|
enable = true;
|
2018-09-19 00:52:58 +00:00
|
|
|
defaultCacheTtl = 900;
|
|
|
|
maxCacheTtl = 7200;
|
|
|
|
defaultCacheTtlSsh = 3600;
|
|
|
|
maxCacheTtlSsh = 86400;
|
|
|
|
enableSshSupport = true;
|
2018-10-21 21:28:52 +00:00
|
|
|
enableScDaemon = true;
|
2018-09-19 00:52:58 +00:00
|
|
|
};
|
2018-12-31 09:08:11 +00:00
|
|
|
programs.direnv = {
|
|
|
|
stdlib = ''
|
|
|
|
use_nix() {
|
|
|
|
local cache=".direnv.$(nixos-version --hash)"
|
|
|
|
|
|
|
|
if [[ ! -e "$cache" ]] || \
|
|
|
|
[[ "$HOME/.direnvrc" -nt "$cache" ]] || \
|
|
|
|
[[ ".envrc" -nt "$cache" ]] || \
|
|
|
|
[[ "default.nix" -nt "$cache" ]] || \
|
|
|
|
[[ "shell.nix" -nt "$cache" ]];
|
|
|
|
then
|
|
|
|
local tmp="$(mktemp "$${cache}.tmp-XXXXXXXX")"
|
|
|
|
trap "rm -rf '$tmp' >/dev/null" EXIT
|
|
|
|
nix-shell --show-trace "$@" --run 'direnv dump' > "$tmp" && \
|
|
|
|
mv "$tmp" "$cache"
|
|
|
|
fi
|
|
|
|
|
|
|
|
direnv_load cat "$cache"
|
|
|
|
|
|
|
|
if [[ $# = 0 ]]; then
|
|
|
|
watch_file default.nix
|
|
|
|
watch_file shell.nix
|
|
|
|
rm direnv.* 2>/dev/null
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
2018-09-19 00:52:58 +00:00
|
|
|
};
|
2018-10-21 21:28:52 +00:00
|
|
|
services.udev.packages = [
|
|
|
|
pkgs.libu2f-host
|
|
|
|
pkgs.yubikey-personalization
|
|
|
|
];
|
2018-09-19 00:52:58 +00:00
|
|
|
}
|