configured backups

This commit is contained in:
Rouven Seifert 2023-07-30 19:41:51 +02:00
parent 60e1f3c3d0
commit b48fa4e383
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
25 changed files with 217 additions and 92 deletions

View file

@ -1,7 +1,9 @@
{ lib, pkgs, ... }:
{ config, ... }:
{
system.activationScripts.report-nixos-changes = ''
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2) || true
if [ -e /run/current-system ] && [ -e $systemConfig ]; then
echo System package diff:
${config.nix.package}/bin/nix store diff-closures /run/current-system $systemConfig || true
fi
'';
}

View file

@ -24,10 +24,11 @@
la = "ls -a";
less = "bat";
update = "cd /etc/nixos && nix flake update";
garbage = "sudo nix-collect-garbage -d";
garbage = "${lib.getExe pkgs.home-manager} expire-generations \"-0 days\" && sudo nix-collect-garbage -d";
};
histSize = 100000;
histFile = "~/.local/share/zsh/history";
syntaxHighlighting.enable = true;
autosuggestions = {
enable = true;
highlightStyle = "fg=#00bbbb,bold";
@ -41,6 +42,12 @@
shellInit =
''
export MCFLY_KEY_SCHEME=vim
export MCFLY_FUZZY=2
export MCFLY_DISABLE_MENU=TRUE
export MCFLY_RESULTS=30
export MCFLY_INTERFACE_VIEW=BOTTOM
export MCFLY_PROMPT=""
source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
function svpn() {
unit=$(systemctl list-unit-files | grep "openconnect\|wg-quick\|wireguard\|openvpn" | cut -d "." -f1 | fzf --preview 'systemctl status {}')
@ -73,6 +80,7 @@
then
cat ${../images/cat.sixel}
fi
eval "$(${lib.getExe pkgs.mcfly} init zsh)"
'';
};
}