Move home manager program configs to separate modules

This commit is contained in:
CronyAkatsuki 2024-02-14 21:49:54 +01:00
parent d63b34e2cd
commit 264dff6565
11 changed files with 565 additions and 526 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: { pkgs, ... }:
{ {
# Basic user info # Basic user info
@ -11,7 +11,16 @@
# Imports # Imports
imports = imports =
[ [
inputs.nixvim.homeManagerModules.nixvim ./modules/gpg.nix
./modules/btop.nix
./modules/mpv.nix
./modules/tmux.nix
./modules/nnn.nix
./modules/dmenu.nix
./modules/mangohud.nix
./modules/shell.nix
./modules/nvim.nix
./modules/restic.nix
]; ];
@ -36,19 +45,12 @@
krita # best drawing program krita # best drawing program
tutanota-desktop # fjdlkfjldjflkd tutanota-desktop # fjdlkfjldjflkd
delfin # jellyfin client delfin # jellyfin client
nurl # nix tool nurl # nix git config tool
ripgrep # Neovim telescope dependency ripgrep # Neovim telescope dependency
lazygit # Amazing git tui lazygit # Amazing git tui
lm_sensors # Sensor monitoring tool lm_sensors # Sensor monitoring tool
(nerdfonts.override { fonts = [ "CascadiaCode" ]; }) # Best font (nerdfonts.override { fonts = [ "CascadiaCode" ]; }) # Best font
# My custom dmenu build
(dmenu.overrideAttrs (oldAttrs: rec {
src = builtins.fetchGit {
url = "https://code.cronyakatsuki.xyz/crony/dmenu";
rev = "10dcddf14b38cfd965ab27f084139513baed70bf";
};
}))
# # You can also create simple shell scripts directly inside your # # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your # # configuration. For example, this adds a command 'my-hello' to your
@ -83,520 +85,4 @@
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
# gpg settings
programs.gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
# Make it use kde for flkdsjlkfdlsjflkdsjflsdjklfjdsklf
services.gpg-agent = {
enable = true;
pinentryFlavor = "qt";
};
# Btop settings
programs.btop = {
enable = true;
settings = {
color_theme = "catppuccin_frappe";
vim_keys = true;
};
};
# Mpv settings
programs.mpv = {
enable = true;
config = {
ytdl-format="bestvideo[height<=?1080][fps<=?60][vcodec!=?vp9]+bestaudio/best";
ytdl-raw-options="extractor-args=youtube:player-client=android";
fs=true;
force-window="immediate";
screenshot-template="%F - [%P]v%#01n";
sub-file-paths="Subs;subs";
sub-auto="all";
slang="english,eng,en";
};
scripts = with pkgs.mpvScripts; [ mpris sponsorblock uosc thumbfast quality-menu ];
};
programs.tmux = {
enable = true;
disableConfirmationPrompt = true;
escapeTime = 0;
keyMode = "vi";
mouse = true;
plugins = with pkgs; [
tmuxPlugins.sensible
tmuxPlugins.yank
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @catppuccin_flavour 'frappe'
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_modules_right "application session date_time"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
'';
}
];
prefix = "C-Space";
terminal = "alacritty";
extraConfig = ''
# Fix colors
set-option -sa terminal-overrides ",alacritty:Tc"
# start window and panes indexing at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Faster statusbar updates
set-option -g status-interval 1
# Easier movement
bind -n M-K previous-window
bind -n M-J next-window
# Better split bindings
bind "'" split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
# Vim keybindings for pane movement
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Status bar border
setw -g pane-border-status top
setw -g pane-border-format ''
# Bar to top
set-option -g status-position top
'';
};
# NNN Settings
programs.nnn = {
enable = true;
package = pkgs.nnn.override ({ withNerdIcons = true; });
bookmarks = { d = "~/Documents"; D = "~/Downloads"; p = "~/Pictures"; v = "~/Videos";};
extraPackages = with pkgs; [ pmount ffmpegthumbnailer mediainfo ueberzugpp poppler_utils gnome-epub-thumbnailer nsxiv ];
plugins.mappings = { u = "nmount"; c = "chksum"; r = "gitroot"; v = "imgview"; m = "mtpmount"; d = "xdgdefault"; x = "togglex"; p = "preview-tui"; };
plugins.src = (pkgs.fetchFromGitHub { owner = "jarun"; repo = "nnn"; rev = "v4.9"; sha256 = "sha256-g19uI36HyzTF2YUQKFP4DE2ZBsArGryVHhX79Y0XzhU=";}) + "/plugins";
};
# Mangohud settings
programs.mangohud = {
enable = true;
settings = {
# GPU SETTINGS
gpu_stats = true;
gpu_temp = true;
gpu_core_clock = true;
gpu_power = true;
gpu_text = "GPU";
gpu_load_change = true;
gpu_load_color = "39F900,FDFD09,B22222";
# CPU SETTINGS
cpu_stats = true;
cpu_temp = true;
cpu_text = "CPU";
cpu_mhz = true;
cpu_load_change = true;
cpu_load_value = "60,90";
cpu_load_color = "39F900,FDFD09,B22222";
# Vram/Ram/Swap
vram = true;
ram = true;
swap = true;
# Fps settings
fps = true;
fps_sampling_period = "1000";
fps_color_change = true;
fps_value = "30,60";
fps_color = "B22222,FDFD09,39F900";
frametime = true;
# Misc
gpu_name = true;
vulkan_driver = true;
show_fps_limit = true;
resolution = true;
round_corners = "5";
};
};
# But we all know I love zsh
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
history.path = "${config.xdg.dataHome}/zsh/history";
dotDir = ".config/zsh";
envExtra = ''
# NNN settings
export NNN_FIFO="/tmp/nnn.fifo"
export NNN_SSHFS="sshfs -o follow_symlinks"
export NNN_TERMINAL="alacritty --class preview,preview"
# Catppuccin colors nnn
BLK="03" CHR="03" DIR="04" EXE="02" REG="07" HARDLINK="05" SYMLINK="05" MISSING="08" ORPHAN="01" FIFO="06" SOCK="03" UNKNOWN="01"
export NNN_COLORS="#04020301;4231"
export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$UNKNOWN"
'';
initExtra = ''
# VI Mode escape timeout fix
export KEYTIMEOUT=1
# Substring search settings
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold'
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
'';
initExtraFirst = ''
nitch
'';
zplug = {
enable = true;
plugins = [
{ name = "zap-zsh/supercharge"; }
{ name = "zap-zsh/completions"; }
{ name = "zap-zsh/vim"; }
{ name = "chivalryq/git-alias"; }
{ name = "zdharma-continuum/fast-syntax-highlighting"; }
{ name = "MichaelAquilina/zsh-you-should-use"; }
{ name = "zsh-users/zsh-history-substring-search"; }
];
};
};
# Eza settings
programs.eza = {
enable = true;
enableAliases = true;
git = true;
icons = true;
};
# Zoxide settings
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# Starhip settings
programs.starship = {
enable = true;
enableZshIntegration = true;
};
# Fzf settings
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
# Nixvim
programs.nixvim = {
enable = true;
viAlias = true;
vimAlias = true;
options = {
hlsearch = false;
incsearch = true;
number = true;
relativenumber = true;
tabstop = 4;
softtabstop = 4;
shiftwidth = 4;
expandtab = true;
smartindent = true;
mouse = "";
breakindent = true;
undofile = true;
swapfile = true;
ignorecase = true;
smartcase = true;
signcolumn = "yes";
completeopt = "menuone,noselect";
updatetime = 50;
timeoutlen = 300;
colorcolumn = "80";
showmode = false;
laststatus = 3;
splitbelow = true;
splitright = true;
};
globals = {
mapleader = " ";
maplocalleader = ";";
};
extraConfigLuaPost = ''
vim.notify = require("mini.notify").make_notify()
'';
plugins = {
harpoon = {
enable = true;
keymaps = {
addFile = "<leader>a";
toggleQuickMenu = "<C-e>";
navFile = { "1" = "<C-j>"; "2" = "<C-k>"; "3" = "<C-l>"; "4" = "<C-;>"; };
};
};
oil = {
enable = true;
defaultFileExplorer = true;
extraOptions = { show_hidden = true; };
};
treesitter.enable = true;
gitsigns = {
enable = true;
signs = {
add.text = "";
change.text = "";
changedelete.text = "";
delete.text = "";
topdelete.text = "";
untracked.text = "";
};
onAttach.function = ''
function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end
-- stylua: ignore start
map("n", "]g", gs.next_hunk, "Next git hunk")
map("n", "[g", gs.prev_hunk, "Previous git hunk")
end
'';
};
mini = {
enable = true;
modules = {
statusline = {
set_vim_settings = false;
};
comment = {};
notify = {};
};
};
telescope = {
enable = true;
extensions = {
fzf-native = {
enable = true;
fuzzy = true;
overrideGenericSorter = true;
overrideFileSorter = true;
caseMode = "smart_case";
};
ui-select.enable = true;
};
keymaps = {
"<leader>pf" = "find_files";
"<C-p>" = "git_files";
"<leader>vh" = "help_tags";
"<leader>ps" = "grep_string";
};
};
lsp = {
enable = true;
servers = {
lua-ls.enable = true;
nil_ls.enable = true;
marksman.enable = true;
};
keymaps = {
diagnostic = {
"<leader>vd" = "open_float";
"[d" = "goto_next";
"]d" = "goto_prev";
};
lspBuf = {
K = "hover";
gd = "definition";
gD = "declaration";
gi = "implementation";
"<leader>lca" = "code_action";
"<leader>lrn" = "rename";
"<C-h>" = "signature_help";
};
};
preConfig = ''
local function sign_define(args)
vim.fn.sign_define(args.name, {
texthl = args.name,
text = args.text,
numhl = "",
})
end
sign_define({ name = "DiagnosticSignError", text = "E" })
sign_define({ name = "DiagnosticSignWarn", text = "W" })
sign_define({ name = "DiagnosticSignHint", text = "H" })
sign_define({ name = "DiagnosticSignInfo", text = "I" })
'';
};
nvim-cmp = {
enable = true;
autoEnableSources = true;
sources = [
{name = "nvim_lsp";}
{name = "path";}
{name = "snippy";}
];
snippet.expand = "snippy";
mapping = {
"<C-l>" = "cmp.mapping.confirm({ select = false })";
"<C-j>" = {
action = ''
function(fallback)
if cmp.visible then
cmp.select_next_item()
else
fallback()
end
end
'';
modes = [ "i" "s" ];
};
"<C-k>" = {
action = ''
function(fallback)
if cmp.visible then
cmp.select_prev_item()
else
fallback()
end
end
'';
modes = [ "i" "s" ];
};
};
};
};
colorschemes.catppuccin = {
enable = true;
flavour = "frappe";
styles = {
functions = [ "bold" ];
keywords = [ "bold" ];
};
};
extraPlugins = with pkgs.vimPlugins; [
vim-snippets
];
};
##-- Restic Timers And Services --##
# Restic backup
systemd.user.services = {
restic_backup = {
Unit.Description = "Restic backup service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-backup" ''
. /etc/restic/local
restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12
. /etc/restic/online
restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_backup = {
Unit.Description = "Restic backup timer";
Timer = {
OnBootSec = "5m";
OnUnitActiveSec = "6h";
};
Install.WantedBy = [ "timers.target" ];
};
};
# Restic check
systemd.user.services = {
restic_check = {
Unit.Description = "Restic check service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-check" ''
. /etc/restic/local
restic check --read-data-subset=10%
. /etc/restic/online
restic check --read-data-subset=10%
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_check = {
Unit.Description = "Restic check timer";
Timer = {
OnCalendar="Thu *-*-* 18:00:00";
};
Install.WantedBy = [ "timers.target" ];
};
};
# Restic prune
systemd.user.services = {
restic_prune = {
Unit.Description = "Restic prune service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-prune" ''
. /etc/restic/local
restic prune
. /etc/restic/online
restic prune
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_prune = {
Unit.Description = "Restic prune timer";
Timer = {
OnCalendar="Fri *-*-* 18:00:00";
};
Install.WantedBy = [ "timers.target" ];
};
};
} }

View File

@ -0,0 +1,11 @@
{ inputs, ... }:
{
# Btop settings
programs.btop = {
enable = true;
settings = {
color_theme = "catppuccin_frappe";
vim_keys = true;
};
};
}

View File

@ -0,0 +1,12 @@
{ inputs, pkgs, ... }:
{
home.packages = with pkgs; [
# My custom dmenu build
(dmenu.overrideAttrs (oldAttrs: rec {
src = builtins.fetchGit {
url = "https://code.cronyakatsuki.xyz/crony/dmenu";
rev = "10dcddf14b38cfd965ab27f084139513baed70bf";
};
}))
];
}

View File

@ -0,0 +1,15 @@
{ inputs, config, ...}:
{
# gpg settings
programs.gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
# Make it use kde for flkdsjlkfdlsjflkdsjflsdjklfjdsklf
services.gpg-agent = {
enable = true;
pinentryFlavor = "qt";
};
}

View File

@ -0,0 +1,42 @@
{ inputs, ... }:
{
# Mangohud settings
programs.mangohud = {
enable = true;
settings = {
# GPU SETTINGS
gpu_stats = true;
gpu_temp = true;
gpu_core_clock = true;
gpu_power = true;
gpu_text = "GPU";
gpu_load_change = true;
gpu_load_color = "39F900,FDFD09,B22222";
# CPU SETTINGS
cpu_stats = true;
cpu_temp = true;
cpu_text = "CPU";
cpu_mhz = true;
cpu_load_change = true;
cpu_load_value = "60,90";
cpu_load_color = "39F900,FDFD09,B22222";
# Vram/Ram/Swap
vram = true;
ram = true;
swap = true;
# Fps settings
fps = true;
fps_sampling_period = "1000";
fps_color_change = true;
fps_value = "30,60";
fps_color = "B22222,FDFD09,39F900";
frametime = true;
# Misc
gpu_name = true;
vulkan_driver = true;
show_fps_limit = true;
resolution = true;
round_corners = "5";
};
};
}

View File

@ -0,0 +1,18 @@
{ inputs, pkgs, ... }:
{
# Mpv settings
programs.mpv = {
enable = true;
config = {
ytdl-format="bestvideo[height<=?1080][fps<=?60][vcodec!=?vp9]+bestaudio/best";
ytdl-raw-options="extractor-args=youtube:player-client=android";
fs=true;
force-window="immediate";
screenshot-template="%F - [%P]v%#01n";
sub-file-paths="Subs;subs";
sub-auto="all";
slang="english,eng,en";
};
scripts = with pkgs.mpvScripts; [ mpris sponsorblock uosc thumbfast quality-menu ];
};
}

View File

@ -0,0 +1,12 @@
{ inputs, pkgs, ... }:
{
# NNN Settings
programs.nnn = {
enable = true;
package = pkgs.nnn.override ({ withNerdIcons = true; });
bookmarks = { d = "~/Documents"; D = "~/Downloads"; p = "~/Pictures"; v = "~/Videos";};
extraPackages = with pkgs; [ pmount ffmpegthumbnailer mediainfo ueberzugpp poppler_utils gnome-epub-thumbnailer nsxiv ];
plugins.mappings = { u = "nmount"; c = "chksum"; r = "gitroot"; v = "imgview"; m = "mtpmount"; d = "xdgdefault"; x = "togglex"; p = "preview-tui"; };
plugins.src = (pkgs.fetchFromGitHub { owner = "jarun"; repo = "nnn"; rev = "v4.9"; sha256 = "sha256-g19uI36HyzTF2YUQKFP4DE2ZBsArGryVHhX79Y0XzhU=";}) + "/plugins";
};
}

View File

@ -0,0 +1,213 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
# Nixvim
programs.nixvim = {
enable = true;
viAlias = true;
vimAlias = true;
options = {
hlsearch = false;
incsearch = true;
number = true;
relativenumber = true;
tabstop = 4;
softtabstop = 4;
shiftwidth = 4;
expandtab = true;
smartindent = true;
mouse = "";
breakindent = true;
undofile = true;
swapfile = true;
ignorecase = true;
smartcase = true;
signcolumn = "yes";
completeopt = "menuone,noselect";
updatetime = 50;
timeoutlen = 300;
colorcolumn = "80";
showmode = false;
laststatus = 3;
splitbelow = true;
splitright = true;
};
globals = {
mapleader = " ";
maplocalleader = ";";
};
extraConfigLuaPost = ''
vim.notify = require("mini.notify").make_notify()
'';
plugins = {
harpoon = {
enable = true;
keymaps = {
addFile = "<leader>a";
toggleQuickMenu = "<C-e>";
navFile = { "1" = "<C-j>"; "2" = "<C-k>"; "3" = "<C-l>"; "4" = "<C-;>"; };
};
};
oil = {
enable = true;
defaultFileExplorer = true;
extraOptions = { show_hidden = true; };
};
treesitter.enable = true;
gitsigns = {
enable = true;
signs = {
add.text = "";
change.text = "";
changedelete.text = "";
delete.text = "";
topdelete.text = "";
untracked.text = "";
};
onAttach.function = ''
function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end
-- stylua: ignore start
map("n", "]g", gs.next_hunk, "Next git hunk")
map("n", "[g", gs.prev_hunk, "Previous git hunk")
end
'';
};
mini = {
enable = true;
modules = {
statusline = {
set_vim_settings = false;
};
comment = {};
notify = {};
};
};
telescope = {
enable = true;
extensions = {
fzf-native = {
enable = true;
fuzzy = true;
overrideGenericSorter = true;
overrideFileSorter = true;
caseMode = "smart_case";
};
ui-select.enable = true;
};
keymaps = {
"<leader>pf" = "find_files";
"<C-p>" = "git_files";
"<leader>vh" = "help_tags";
"<leader>ps" = "grep_string";
};
};
lsp = {
enable = true;
servers = {
lua-ls.enable = true;
nil_ls.enable = true;
marksman.enable = true;
};
keymaps = {
diagnostic = {
"<leader>vd" = "open_float";
"[d" = "goto_next";
"]d" = "goto_prev";
};
lspBuf = {
K = "hover";
gd = "definition";
gD = "declaration";
gi = "implementation";
"<leader>lca" = "code_action";
"<leader>lrn" = "rename";
"<C-h>" = "signature_help";
};
};
preConfig = ''
local function sign_define(args)
vim.fn.sign_define(args.name, {
texthl = args.name,
text = args.text,
numhl = "",
})
end
sign_define({ name = "DiagnosticSignError", text = "E" })
sign_define({ name = "DiagnosticSignWarn", text = "W" })
sign_define({ name = "DiagnosticSignHint", text = "H" })
sign_define({ name = "DiagnosticSignInfo", text = "I" })
'';
};
nvim-cmp = {
enable = true;
autoEnableSources = true;
sources = [
{name = "nvim_lsp";}
{name = "path";}
{name = "snippy";}
];
snippet.expand = "snippy";
mapping = {
"<C-l>" = "cmp.mapping.confirm({ select = false })";
"<C-j>" = {
action = ''
function(fallback)
if cmp.visible then
cmp.select_next_item()
else
fallback()
end
end
'';
modes = [ "i" "s" ];
};
"<C-k>" = {
action = ''
function(fallback)
if cmp.visible then
cmp.select_prev_item()
else
fallback()
end
end
'';
modes = [ "i" "s" ];
};
};
};
};
colorschemes.catppuccin = {
enable = true;
flavour = "frappe";
styles = {
functions = [ "bold" ];
keywords = [ "bold" ];
};
};
extraPlugins = with pkgs.vimPlugins; [
vim-snippets
];
};
}

View File

@ -0,0 +1,89 @@
{ inputs, pkgs, ... }:
{
##-- Restic Timers And Services --##
# Restic backup
systemd.user.services = {
restic_backup = {
Unit.Description = "Restic backup service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-backup" ''
. /etc/restic/local
restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12
. /etc/restic/online
restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_backup = {
Unit.Description = "Restic backup timer";
Timer = {
OnBootSec = "5m";
OnUnitActiveSec = "6h";
};
Install.WantedBy = [ "timers.target" ];
};
};
# Restic check
systemd.user.services = {
restic_check = {
Unit.Description = "Restic check service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-check" ''
. /etc/restic/local
restic check --read-data-subset=10%
. /etc/restic/online
restic check --read-data-subset=10%
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_check = {
Unit.Description = "Restic check timer";
Timer = {
OnCalendar="Thu *-*-* 18:00:00";
};
Install.WantedBy = [ "timers.target" ];
};
};
# Restic prune
systemd.user.services = {
restic_prune = {
Unit.Description = "Restic prune service";
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "restic-prune" ''
. /etc/restic/local
restic prune
. /etc/restic/online
restic prune
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
restic_prune = {
Unit.Description = "Restic prune timer";
Timer = {
OnCalendar="Fri *-*-* 18:00:00";
};
Install.WantedBy = [ "timers.target" ];
};
};
}

View File

@ -0,0 +1,73 @@
{ inputs, config, ... }:
{
# But we all know I love zsh
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
history.path = "${config.xdg.dataHome}/zsh/history";
dotDir = ".config/zsh";
envExtra = ''
# NNN settings
export NNN_FIFO="/tmp/nnn.fifo"
export NNN_SSHFS="sshfs -o follow_symlinks"
export NNN_TERMINAL="alacritty --class preview,preview"
# Catppuccin colors nnn
BLK="03" CHR="03" DIR="04" EXE="02" REG="07" HARDLINK="05" SYMLINK="05" MISSING="08" ORPHAN="01" FIFO="06" SOCK="03" UNKNOWN="01"
export NNN_COLORS="#04020301;4231"
export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$UNKNOWN"
'';
initExtra = ''
# VI Mode escape timeout fix
export KEYTIMEOUT=1
# Substring search settings
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold'
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
'';
initExtraFirst = ''
nitch
'';
zplug = {
enable = true;
plugins = [
{ name = "zap-zsh/supercharge"; }
{ name = "zap-zsh/completions"; }
{ name = "zap-zsh/vim"; }
{ name = "chivalryq/git-alias"; }
{ name = "zdharma-continuum/fast-syntax-highlighting"; }
{ name = "MichaelAquilina/zsh-you-should-use"; }
{ name = "zsh-users/zsh-history-substring-search"; }
];
};
};
# Eza settings
programs.eza = {
enable = true;
enableAliases = true;
git = true;
icons = true;
};
# Zoxide settings
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# Starhip settings
programs.starship = {
enable = true;
enableZshIntegration = true;
};
# Fzf settings
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
}

View File

@ -0,0 +1,68 @@
{ inputs, pkgs, ... }:
{
programs.tmux = {
enable = true;
disableConfirmationPrompt = true;
escapeTime = 0;
keyMode = "vi";
mouse = true;
plugins = with pkgs; [
tmuxPlugins.sensible
tmuxPlugins.yank
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @catppuccin_flavour 'frappe'
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_modules_right "application session date_time"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
'';
}
];
prefix = "C-Space";
terminal = "alacritty";
extraConfig = ''
# Fix colors
set-option -sa terminal-overrides ",alacritty:Tc"
# start window and panes indexing at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Faster statusbar updates
set-option -g status-interval 1
# Easier movement
bind -n M-K previous-window
bind -n M-J next-window
# Better split bindings
bind "'" split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
# Vim keybindings for pane movement
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Status bar border
setw -g pane-border-status top
setw -g pane-border-format ''
# Bar to top
set-option -g status-position top
'';
};
}