summary refs log tree commit diff stats
path: root/services
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-04-20 18:25:45 +0200
committersils <sils@sils.li>2023-04-20 18:31:19 +0200
commit8b5e6cfeed2b5c7088cdf8a98bacee72ad6cabd4 (patch)
treebd77dade79e8c7e6f6f3a136d53fd5518d9ffcb9 /services
parentFeat(packages.nix): Add pinentry (diff)
downloadnix-config-8b5e6cfeed2b5c7088cdf8a98bacee72ad6cabd4.tar.gz
nix-config-8b5e6cfeed2b5c7088cdf8a98bacee72ad6cabd4.zip
Feat(structure): Restructured repository
                 This is mainly convenience and my personal
                 preference.
Diffstat (limited to 'services')
-rw-r--r--services/flatpak/default.nix11
-rw-r--r--services/zsh/default.nix44
2 files changed, 55 insertions, 0 deletions
diff --git a/services/flatpak/default.nix b/services/flatpak/default.nix
new file mode 100644
index 0000000..d1f4586
--- /dev/null
+++ b/services/flatpak/default.nix
@@ -0,0 +1,11 @@
+{...}: {
+  services.flatpak.enable = true;
+  fileSystems."/var/lib/flatpak" = {
+    device = "/srv/flatpak";
+    options = ["bind"];
+  };
+  #  xdg.portal = {
+  #    enable = true;
+  #    extraPortals = [pkgs.xdg-desktop-portal-gtk];
+  #  };
+}
diff --git a/services/zsh/default.nix b/services/zsh/default.nix
new file mode 100644
index 0000000..b8349f9
--- /dev/null
+++ b/services/zsh/default.nix
@@ -0,0 +1,44 @@
+{pkgs, ...}: {
+  programs.zsh = {
+    enable = true;
+    syntaxHighlighting.enable = true;
+    autosuggestions.enable = true;
+    interactiveShellInit = ''
+        	export ZSH=${pkgs.oh-my-zsh}/share/oh-my-zsh/
+      export fpath=("$XDG_DATA_HOME/zsh/site-functions" $fpath)
+      HISTFILE="$XDG_STATE_HOME/zsh/history"
+
+      plugins=(git)
+
+      alias vim="nvim"
+      alias ls='lsd'
+      alias l='ls -l'
+      alias la='ls -a'
+      alias lla='ls -la'
+      alias lt='ls --tree'
+      alias rebackup='restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd backup'
+      alias repreconf='restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd'
+      alias b-del="sudo btrfs subv delet /srv/snapshots/home"
+      alias b-shot="sudo btrfs subvolume snapshot -r /home /srv/snapshots/home"
+      alias 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;'
+      alias 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"
+      alias r-prune="sudo restic -r /mnt/storage/backups --password-file ~/srv/restic_pswd --cache-dir /srv/.restic-cache prune"
+      alias r-check="sudo restic -r /mnt/storage/backups --cache-dir /srv/.restic-cache --password-file ~/srv/.restic_pswd check"
+      alias zconf="vim ~/.config/zsh/.zshrc"
+      alias zenv="vim ~/.config/zsh/.zshenv"
+      alias o="xdg-open"
+      alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
+
+
+      source $ZSH/oh-my-zsh.sh
+    '';
+
+    promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
+  };
+}