summary refs log tree commit diff stats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/sils/zsh/config/functions.zsh3
-rw-r--r--users/sils/zsh/default.nix20
2 files changed, 14 insertions, 9 deletions
diff --git a/users/sils/zsh/config/functions.zsh b/users/sils/zsh/config/functions.zsh
new file mode 100644
index 0000000..30dbbec
--- /dev/null
+++ b/users/sils/zsh/config/functions.zsh
@@ -0,0 +1,3 @@
+sys-update() {
+	sudo nixos-rebuild $1 --flake /home/sils/repos/nix-config#
+}
diff --git a/users/sils/zsh/default.nix b/users/sils/zsh/default.nix
index d7b1b02..5181b11 100644
--- a/users/sils/zsh/default.nix
+++ b/users/sils/zsh/default.nix
@@ -38,14 +38,15 @@
       b-del = "sudo btrfs subv delet /srv/snapshots/home";
       b-shot = "sudo btrfs subvolume snapshot -r /home /srv/snapshots/home";
       b-home = ''[ -d /srv/snapshots/home ] && sudo btrfs subvolume delete /srv/snapshots/home; sudo btrfs subvolume snapshot -r /home /srv/snapshots/home; sudo restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd --cache-dir /srv/.restic-cache backup /srv/snapshots/home;'';
-      r-clean = ''sudo restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd --cache-
-      dir /srv/.restic-cache forget \
-                                      --keep-weekly  7  \
-                                      --keep-daily   7  \
-                                      --keep-monthly 6  \
-                                      --keep-yearly  10 \
-                                      --keep-hourly  5  \
-                                      --keep-tag prs'';
+      r-clean = ''
+        sudo restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd --cache-dir /srv/.restic-cache forget \
+                                           --keep-weekly  7  \
+                                           --keep-daily   7  \
+                                           --keep-monthly 6  \
+                                           --keep-yearly  10 \
+                                           --keep-hourly  5  \
+                                           --keep-tag prs
+      '';
       r-prune = "sudo restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd --cache-
     dir /srv/.restic-cache prune";
       r-check = "sudo restic -r /mnt/storage/backups --cache-dir /srv/.restic-cache --password-
@@ -72,6 +73,7 @@
 
           source $ZSH/oh-my-zsh.sh
       ''
-      + builtins.readFile ./config/p10k.zsh;
+      + builtins.readFile ./config/p10k.zsh
+      + builtins.readFile ./config/functions.zsh;
   };
 }