reorg
This commit is contained in:
parent
fe3dde6667
commit
d37834a164
30 changed files with 245 additions and 179 deletions
35
home-manager/shared/programs/2fa/default.nix
Executable file
35
home-manager/shared/programs/2fa/default.nix
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
twofa
|
||||
];
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
personal-cipher-preferences = "AES256 AES192 AES";
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256";
|
||||
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
|
||||
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
|
||||
cert-digest-algo = "SHA512";
|
||||
s2k-digest-algo = "SHA512";
|
||||
s2k-cipher-algo = "AES256";
|
||||
charset = "utf-8";
|
||||
fixed-list-mode = true;
|
||||
no-emit-version = true;
|
||||
no-greeting = true;
|
||||
keyid-format = "0xshort";
|
||||
list-options = "show-uid-validity show-unusable-subkeys";
|
||||
verify-options = "show-uid-validity";
|
||||
with-fingerprint = true;
|
||||
with-key-origin = true;
|
||||
require-cross-certification = true;
|
||||
no-symkey-cache = true;
|
||||
default-recipient-self = true;
|
||||
};
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryFlavor = "tty";
|
||||
};
|
||||
}
|
||||
10
home-manager/shared/programs/default.nix
Normal file
10
home-manager/shared/programs/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ home-manager, config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./dev
|
||||
./nvim
|
||||
./shell
|
||||
./2fa
|
||||
./warrior
|
||||
];
|
||||
}
|
||||
13
home-manager/shared/programs/dev/default.nix
Normal file
13
home-manager/shared/programs/dev/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
k9s
|
||||
kubectl
|
||||
python3
|
||||
p7zip
|
||||
gnumake
|
||||
gcc
|
||||
go
|
||||
];
|
||||
}
|
||||
6
home-manager/shared/programs/min.nix
Normal file
6
home-manager/shared/programs/min.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ home-manager, config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./shell
|
||||
];
|
||||
}
|
||||
6
home-manager/shared/programs/nvim/default.nix
Executable file
6
home-manager/shared/programs/nvim/default.nix
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
full
|
||||
];
|
||||
}
|
||||
74
home-manager/shared/programs/shell/default.nix
Executable file
74
home-manager/shared/programs/shell/default.nix
Executable file
|
|
@ -0,0 +1,74 @@
|
|||
{ pkgs, host, ...}:
|
||||
{
|
||||
imports = [
|
||||
./tmux.nix
|
||||
./git.nix
|
||||
];
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
historyControl = [ "ignorespace" ];
|
||||
historyIgnore = [
|
||||
":q"
|
||||
"exit"
|
||||
];
|
||||
shellAliases = {
|
||||
la = "ls -lahrt --color=auto";
|
||||
ll = "la";
|
||||
":q" = "exit";
|
||||
mpv = "mpv --no-keepaspect-window";
|
||||
sus = "systemctl suspend";
|
||||
hms = "home-manager switch --flake $NIX_FLAKE#${host.username}";
|
||||
rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}";
|
||||
nvim-dev = "nix run ~/dev/nvim.nix";
|
||||
g = "git";
|
||||
k = "kubectl";
|
||||
};
|
||||
shellOptions = [
|
||||
"cmdhist"
|
||||
"globstar"
|
||||
"dirspell"
|
||||
"dotglob"
|
||||
"extglob"
|
||||
"cdspell"
|
||||
"histappend"
|
||||
];
|
||||
bashrcExtra = ''
|
||||
export PROMPT_COMMAND="prompt_command;history -a"
|
||||
export PATH="/usr/local/go/bin:~/go/bin:~/.bin:~/.local/bin:$PATH"
|
||||
export GPG_2FA="mail@10110110.xyz"
|
||||
export MANPAGER="nvim +Man!"
|
||||
export EDITOR="nvim"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export NIX_FLAKE="/home/e/dev/nix"
|
||||
[[ $- != *i* ]] && return
|
||||
function exists {
|
||||
type $1 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
function prompt_command {
|
||||
GIT_BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null | cut -c 1-10)
|
||||
[[ $GIT_BRANCH != "" ]] && \
|
||||
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]($GIT_BRANCH)\[\033[38;5;7m\]\$\[$(tput sgr0)\] " || \
|
||||
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]\[\033[38;5;7m\]\$\[$(tput sgr0)\] "
|
||||
}
|
||||
bind "set completion-ignore-case on"
|
||||
bind "set completion-map-case on"
|
||||
bind "set show-all-if-ambiguous on"
|
||||
bind "set menu-complete-display-prefix on"
|
||||
bind '"\t":menu-complete'
|
||||
bind '"\C-k": previous-history'
|
||||
bind '"\C-j": next-history'
|
||||
function cd {
|
||||
cmd="ls --color=auto"
|
||||
builtin cd "$@" && $cmd
|
||||
}
|
||||
exists "kubectl" && source <(kubectl completion bash)
|
||||
'';
|
||||
};
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
historyWidgetOptions = ["--height 60% --preview ''"];
|
||||
fileWidgetCommand = "command find -L . -mindepth 1 -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' -prune";
|
||||
};
|
||||
}
|
||||
8
home-manager/shared/programs/shell/direnv.nix
Executable file
8
home-manager/shared/programs/shell/direnv.nix
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
26
home-manager/shared/programs/shell/git.nix
Executable file
26
home-manager/shared/programs/shell/git.nix
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.git= {
|
||||
enable = true;
|
||||
userEmail = "cjriddz@protonmail.com";
|
||||
userName = "iofq";
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
side-by-side = true;
|
||||
line-numbers = true;
|
||||
};
|
||||
};
|
||||
extraConfig = {
|
||||
core.editor = "nvim";
|
||||
};
|
||||
aliases = {
|
||||
a = "add . -p";
|
||||
s = "status";
|
||||
f = "fetch";
|
||||
d = "diff";
|
||||
cm = "commit -m";
|
||||
rb = "rebase -i";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
home-manager/shared/programs/shell/tmux.nix
Executable file
22
home-manager/shared/programs/shell/tmux.nix
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
newSession = true;
|
||||
prefix = "C-a";
|
||||
escapeTime = 0;
|
||||
baseIndex = 1;
|
||||
# vi mode navigation
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = ''
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
|
||||
set -g status-right ""
|
||||
setw -g status-style 'bg=colour0 fg=colour7'
|
||||
setw -g window-status-current-format '[#P:#W*] '
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
15
home-manager/shared/programs/warrior/default.nix
Executable file
15
home-manager/shared/programs/warrior/default.nix
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
colorTheme = "solarized-dark-256";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
timewarrior
|
||||
];
|
||||
home.file."${config.xdg.dataHome}/task/hooks/on-modify.timewarrior" = {
|
||||
source = "${pkgs.timewarrior}/share/doc/timew/ext/on-modify.timewarrior";
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue