refactor backup
This commit is contained in:
@@ -477,6 +477,7 @@ local servers = {
|
|||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
jdtls = {},
|
jdtls = {},
|
||||||
vtsls = {},
|
vtsls = {},
|
||||||
|
clangd = {},
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
@@ -542,15 +543,16 @@ cmp.setup {
|
|||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
--collision
|
||||||
if cmp.visible() then
|
--['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
cmp.select_prev_item()
|
-- if cmp.visible() then
|
||||||
elseif luasnip.locally_jumpable(-1) then
|
-- cmp.select_prev_item()
|
||||||
luasnip.jump(-1)
|
-- elseif luasnip.locally_jumpable(-1) then
|
||||||
else
|
-- luasnip.jump(-1)
|
||||||
fallback()
|
-- else
|
||||||
end
|
-- fallback()
|
||||||
end, { 'i', 's' }),
|
-- end
|
||||||
|
--end, { 'i', 's' }),
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
|
|||||||
5
.config/nvim/lua/custom/plugins/tabby.lua
Normal file
5
.config/nvim/lua/custom/plugins/tabby.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
vim.g.tabby_keybinding_accept = '<S-Tab>'
|
||||||
|
|
||||||
|
return {
|
||||||
|
'TabbyML/vim-tabby'
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
checkTime = "(cd /synced/work_drive/TS && nix run)";
|
checkTime = "(cd /synced/work_drive/TS && nix run)";
|
||||||
checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
checkWaylandWindowsKDE = "qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole";
|
||||||
collectGarbage = "sudo nix-collect-garbage --delete-older-than 7d && nix-collect-garbage --delete-older-than 7d";
|
collectGarbage = "sudo nix-collect-garbage --delete-older-than 7d && nix-collect-garbage --delete-older-than 7d";
|
||||||
|
edit = "nvim ~/projects/github/nix-config";
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
ssh = "TERM=xterm-256color ssh";
|
ssh = "TERM=xterm-256color ssh";
|
||||||
update = "sudo nixos-rebuild switch";
|
update = "sudo nixos-rebuild switch";
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ let
|
|||||||
gitolite = "/var/lib/gitolite";
|
gitolite = "/var/lib/gitolite";
|
||||||
syncthing = [ "/synced/default/" "/synced/work_drive/" ];
|
syncthing = [ "/synced/default/" "/synced/work_drive/" ];
|
||||||
syncthingFull = syncthing ++ [ "/synced/fh/" "/synced/books/" ];
|
syncthingFull = syncthing ++ [ "/synced/fh/" "/synced/books/" ];
|
||||||
|
excludePaths = [ "/home/**/Cache" "/home/**/.cache" "/home/**/__pycache__" "/home/**/node_modules" "/home/**/venv" ];
|
||||||
|
excludePathsRemote = excludePaths ++ "/home/**/dont_remotebackup";
|
||||||
|
backupPathsSmall = [ "/home" "/var/backup/postgresql" gitolite ] ++ syncthing;
|
||||||
|
backupPathsMedium = [ "/home" "/var/backup/postgresql" "/mnt/250ssd/matrix-synapse/media_store/" "/mnt/250ssd/paperless" gitolite ] ++ syncthing;
|
||||||
|
backupPathsFull = [ "/home" "/var/backup/postgresql" "/mnt/250ssd/matrix-synapse/media_store/" "/mnt/250ssd/paperless"
|
||||||
|
kavita gitolite ] ++ syncthingFull;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
age.secrets.restic-pw = {
|
age.secrets.restic-pw = {
|
||||||
@@ -18,68 +25,26 @@ in
|
|||||||
services.restic = {
|
services.restic = {
|
||||||
backups = {
|
backups = {
|
||||||
localbackup = {
|
localbackup = {
|
||||||
exclude = [
|
|
||||||
"/home/**/Cache"
|
|
||||||
"/home/**/.cache"
|
|
||||||
"/home/**/__pycache__"
|
|
||||||
"/home/**/node_modules"
|
|
||||||
"/home/**/venv"
|
|
||||||
];
|
|
||||||
initialize = true;
|
initialize = true;
|
||||||
passwordFile = config.age.secrets.restic-pw.path;
|
passwordFile = config.age.secrets.restic-pw.path;
|
||||||
paths = [
|
exclude = excludePaths;
|
||||||
"/home"
|
paths = backupPathsFull;
|
||||||
"/var/backup/postgresql"
|
|
||||||
"/mnt/250ssd/matrix-synapse/media_store/"
|
|
||||||
"/mnt/250ssd/nextcloud"
|
|
||||||
"/mnt/250ssd/paperless"
|
|
||||||
kavita
|
|
||||||
gitolite
|
|
||||||
] ++ syncthingFull;
|
|
||||||
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||||
repository = "/mnt/2tb/restic";
|
repository = "/mnt/2tb/restic";
|
||||||
};
|
};
|
||||||
localbackup-1tb-ssd = {
|
localbackup-1tb-ssd = {
|
||||||
exclude = [
|
|
||||||
"/home/**/Cache"
|
|
||||||
"/home/**/.cache"
|
|
||||||
"/home/**/__pycache__"
|
|
||||||
"/home/**/node_modules"
|
|
||||||
"/home/**/venv"
|
|
||||||
];
|
|
||||||
initialize = true;
|
initialize = true;
|
||||||
passwordFile = config.age.secrets.restic-pw.path;
|
passwordFile = config.age.secrets.restic-pw.path;
|
||||||
paths = [
|
exclude = excludePaths;
|
||||||
"/home"
|
paths = backupPathsFull;
|
||||||
"/var/backup/postgresql"
|
|
||||||
"/mnt/250ssd/matrix-synapse/media_store/"
|
|
||||||
"/mnt/250ssd/nextcloud"
|
|
||||||
"/mnt/250ssd/paperless"
|
|
||||||
kavita
|
|
||||||
gitolite
|
|
||||||
] ++ syncthingFull;
|
|
||||||
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
pruneOpts = [ "--keep-daily 7" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||||
repository = "/mnt/1tbssd/restic";
|
repository = "/mnt/1tbssd/restic";
|
||||||
};
|
};
|
||||||
localbackup-1tb = {
|
localbackup-1tb = {
|
||||||
initialize = true;
|
initialize = true;
|
||||||
passwordFile = config.age.secrets.restic-pw.path;
|
passwordFile = config.age.secrets.restic-pw.path;
|
||||||
paths = [
|
exclude = excludePaths;
|
||||||
"/home"
|
paths = backupPathsFull;
|
||||||
"/var/backup/postgresql"
|
|
||||||
"/mnt/250ssd/matrix-synapse/media_store/"
|
|
||||||
"/mnt/250ssd/nextcloud"
|
|
||||||
"/mnt/250ssd/paperless"
|
|
||||||
kavita
|
|
||||||
gitolite
|
|
||||||
] ++ syncthingFull;
|
|
||||||
exclude = [
|
|
||||||
"/home/**/Cache"
|
|
||||||
"/home/**/.cache"
|
|
||||||
"/home/**/__pycache__"
|
|
||||||
"/home/**/node_modules"
|
|
||||||
"/home/**/venv"
|
|
||||||
];
|
|
||||||
repository = "/mnt/1tb/restic";
|
repository = "/mnt/1tb/restic";
|
||||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
@@ -90,22 +55,8 @@ in
|
|||||||
remotebackup-gdrive = {
|
remotebackup-gdrive = {
|
||||||
initialize = true;
|
initialize = true;
|
||||||
passwordFile = config.age.secrets.restic-pw.path;
|
passwordFile = config.age.secrets.restic-pw.path;
|
||||||
paths = [
|
exclude = excludePathsRemote;
|
||||||
"/home"
|
paths = backupPathsMedium;
|
||||||
"/var/backup/postgresql"
|
|
||||||
"/mnt/250ssd/matrix-synapse/media_store/"
|
|
||||||
"/mnt/250ssd/paperless"
|
|
||||||
gitolite
|
|
||||||
] ++ syncthing;
|
|
||||||
exclude = [
|
|
||||||
"/home/**/Cache"
|
|
||||||
"/home/**/.cache"
|
|
||||||
"/home/**/__pycache__"
|
|
||||||
"/home/**/node_modules"
|
|
||||||
"/home/**/dont_remotebackup"
|
|
||||||
"/home/**/venv"
|
|
||||||
"**/emu"
|
|
||||||
];
|
|
||||||
rcloneConfigFile = config.age.secrets.restic-gdrive.path;
|
rcloneConfigFile = config.age.secrets.restic-gdrive.path;
|
||||||
repository = "rclone:it-experts:backup";
|
repository = "rclone:it-experts:backup";
|
||||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||||
@@ -115,22 +66,11 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
remotebackup = {
|
remotebackup = {
|
||||||
exclude = [
|
|
||||||
"/home/**/Cache"
|
|
||||||
"/home/**/.cache"
|
|
||||||
"/home/**/__pycache__"
|
|
||||||
"/home/**/node_modules"
|
|
||||||
"/home/**/venv"
|
|
||||||
"/home/**/dont_remotebackup"
|
|
||||||
];
|
|
||||||
initialize = true;
|
initialize = true;
|
||||||
passwordFile = config.age.secrets.restic-pw.path;
|
passwordFile = config.age.secrets.restic-pw.path;
|
||||||
environmentFile = config.age.secrets.restic-s3.path;
|
environmentFile = config.age.secrets.restic-s3.path;
|
||||||
paths = [
|
exclude = excludePathsRemote;
|
||||||
"/home"
|
paths = backupPathsSmall;
|
||||||
"/var/backup/postgresql"
|
|
||||||
gitolite
|
|
||||||
] ++ syncthing;
|
|
||||||
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
pruneOpts = [ "--keep-daily 5" "--keep-weekly 3" "--keep-monthly 3" "--keep-yearly 3" ];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 00:00:00";
|
OnCalendar = "*-*-03,06,09,12,15,18,21,24,27,30 00:00:00";
|
||||||
|
|||||||
@@ -9,9 +9,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
documentation.dev.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
man-pages
|
||||||
kate
|
kate
|
||||||
jetbrains.idea-ultimate
|
jetbrains.idea-ultimate
|
||||||
|
jetbrains.clion
|
||||||
insomnia
|
insomnia
|
||||||
nodejs_21 # needed for tabby extension
|
nodejs_21 # needed for tabby extension
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user