2023-01-26 03:41:45 +07:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-24 02:24:40 +07:00
|
|
|
{
|
2023-02-19 19:09:38 +07:00
|
|
|
imports = [
|
|
|
|
./options.nix
|
|
|
|
./zsh.nix
|
|
|
|
./fish.nix
|
|
|
|
];
|
2023-01-24 02:24:40 +07:00
|
|
|
manual.json.enable = true;
|
|
|
|
services.gpg-agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSshSupport = true;
|
|
|
|
maxCacheTtl = 72000;
|
|
|
|
maxCacheTtlSsh = 72000;
|
|
|
|
};
|
2023-02-19 19:09:38 +07:00
|
|
|
home.shellAliases = {
|
|
|
|
s = "sudo -A";
|
|
|
|
se = "sudo -AE";
|
|
|
|
l = "lsd";
|
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
|
|
|
|
programs = {
|
2023-01-26 03:41:45 +07:00
|
|
|
atuin = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
update_check = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
nnn = let pluginSrc = "${pkgs.nnn.src}/plugins"; in {
|
|
|
|
enable = true;
|
|
|
|
package = (pkgs.nnn.override ({ withNerdIcons = true; })).overrideAttrs (oldAttrs: {
|
|
|
|
# no need to add makeWrapper to nativeBuildInputs as home-manager does it already
|
|
|
|
postInstall =
|
|
|
|
let nnnArchiveRegex = "\\.(${lib.strings.concatStringsSep "|" [
|
|
|
|
"7z" "a" "ace" "alz" "arc" "arj" "bz" "bz2" "cab" "cpio" "deb" "gz" "jar" "lha" "lz" "lzh" "lzma" "lzo" "rar" "rpm" "rz" "t7z" "tar" "tbz" "tbz2" "tgz" "tlz" "txz" "tZ" "tzo" "war" "xpi" "xz" "Z" "zip"
|
|
|
|
]})$"; in with lib; with strings; ''
|
|
|
|
wrapProgram $out/bin/nnn \
|
|
|
|
--set GUI 1 \
|
|
|
|
--set NNN_OPENER ${escapeShellArg "${pluginSrc}/nuke"} \
|
|
|
|
--set NNN_ARCHIVE ${escapeShellArg nnnArchiveRegex} \
|
|
|
|
--add-flags ${
|
|
|
|
# -a: auto create fifo file
|
|
|
|
# -c: use NNN_OPENER
|
|
|
|
# -x: x server features
|
|
|
|
escapeShellArg "-a -c -x"
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
# utils
|
|
|
|
gnused mktemp fzf coreutils-full findutils xdg-utils git gnupg whois curl
|
|
|
|
file mediainfo unzip gnutar man rclone sshfs trash-cli
|
|
|
|
# for preview
|
|
|
|
exa bat
|
2023-03-07 18:20:08 +07:00
|
|
|
libarchive atool
|
2023-01-26 03:41:45 +07:00
|
|
|
glow w3m
|
|
|
|
# for opening
|
2023-04-06 21:00:49 +07:00
|
|
|
p7zip unrar-wrapper odt2txt
|
|
|
|
];
|
2023-01-26 03:41:45 +07:00
|
|
|
plugins = {
|
|
|
|
src = pluginSrc;
|
|
|
|
mappings = {
|
|
|
|
p = "-preview-tui";
|
|
|
|
P = "fzplug";
|
|
|
|
D = "dragdrop";
|
|
|
|
c = "-chksum";
|
|
|
|
d = "-diffs";
|
|
|
|
f = "fzopen";
|
|
|
|
s = "suedit";
|
|
|
|
x = "togglex";
|
|
|
|
u = "umounttree";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
neomutt = {
|
|
|
|
enable = true;
|
|
|
|
sidebar.enable = true;
|
|
|
|
vimKeys = true;
|
|
|
|
};
|
|
|
|
home-manager.enable = true;
|
2023-01-26 03:41:45 +07:00
|
|
|
# i only use this as a login shell
|
2023-01-24 02:24:40 +07:00
|
|
|
bash = {
|
|
|
|
enable = true;
|
2023-01-26 04:35:21 +07:00
|
|
|
initExtra = ''
|
|
|
|
bind -x '"\C-r": __atuin_history'
|
|
|
|
export ATUIN_NOBIND=true
|
|
|
|
'';
|
2023-01-24 02:24:40 +07:00
|
|
|
};
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.gitAndTools.gitFull;
|
|
|
|
delta.enable = true;
|
2023-01-26 03:41:45 +07:00
|
|
|
extraConfig = {
|
|
|
|
core.askPass = "";
|
|
|
|
credential.helper = "${pkgs.gitAndTools.gitFull}/bin/git-credential-libsecret";
|
2023-04-22 07:15:07 +07:00
|
|
|
init.defaultBranch = "master";
|
2023-01-26 03:41:45 +07:00
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
};
|
2023-01-27 04:05:30 +07:00
|
|
|
bat = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-02-11 23:30:19 +07:00
|
|
|
bottom = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
flags.network_use_bytes = true;
|
|
|
|
flags.enable_gpu_memory = true;
|
|
|
|
};
|
|
|
|
};
|
2023-01-27 04:05:30 +07:00
|
|
|
lsd = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
date = "+%Y-%m-%d %H:%M:%S";
|
|
|
|
permission = "octal";
|
|
|
|
size = "short";
|
|
|
|
};
|
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
ssh = {
|
|
|
|
enable = true;
|
|
|
|
compression = true;
|
|
|
|
};
|
|
|
|
tmux = {
|
|
|
|
enable = true;
|
|
|
|
clock24 = true;
|
|
|
|
customPaneNavigationAndResize = true;
|
|
|
|
keyMode = "vi";
|
|
|
|
};
|
|
|
|
gpg = {
|
|
|
|
enable = true;
|
|
|
|
homedir = "${config.xdg.dataHome}/gnupg";
|
|
|
|
mutableKeys = true;
|
|
|
|
mutableTrust = true;
|
|
|
|
};
|
|
|
|
nix-index.enable = true;
|
2023-02-20 00:49:39 +07:00
|
|
|
readline = {
|
|
|
|
enable = true;
|
|
|
|
variables.editing-mode = "vi";
|
|
|
|
};
|
2023-01-24 02:24:40 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
2023-02-11 23:30:19 +07:00
|
|
|
rclone sshfs fuse
|
2023-02-17 01:16:44 +07:00
|
|
|
file jq python3Full killall
|
2023-03-07 18:20:08 +07:00
|
|
|
appimage-run comma nix-output-monitor
|
2023-01-24 02:24:40 +07:00
|
|
|
];
|
|
|
|
}
|