From 8b5e6cfeed2b5c7088cdf8a98bacee72ad6cabd4 Mon Sep 17 00:00:00 2001 From: sils Date: Thu, 20 Apr 2023 18:25:45 +0200 Subject: Feat(structure): Restructured repository This is mainly convenience and my personal preference. --- common/environment/default.nix | 26 +++++++++++ common/nix/default.nix | 13 ++++++ common/packages/default.nix | 99 +++++++++++++++++++++++++++++++++++++++++ common/users/default.nix | 22 +++++++++ desktop/gnome.nix | 10 ----- desktop/gnome/default.nix | 6 +++ desktop/plasma.nix | 18 -------- desktop/plasma/default.nix | 14 ++++++ desktop/xfce.nix | 13 ------ desktop/xfce/default.nix | 9 ++++ env.nix | 30 ------------- flake.nix | 2 +- flatpak.nix | 15 ------- hosts/thinklappi/default.nix | 71 ++++++++++++++++++++++++++++- hosts/thinklappi/thinklappi.nix | 70 ----------------------------- nix.nix | 18 -------- packages.nix | 99 ----------------------------------------- services/flatpak/default.nix | 11 +++++ services/zsh/default.nix | 44 ++++++++++++++++++ users.nix | 26 ----------- zsh.nix | 48 -------------------- 21 files changed, 314 insertions(+), 350 deletions(-) create mode 100644 common/environment/default.nix create mode 100644 common/nix/default.nix create mode 100644 common/packages/default.nix create mode 100644 common/users/default.nix delete mode 100644 desktop/gnome.nix create mode 100644 desktop/gnome/default.nix delete mode 100644 desktop/plasma.nix create mode 100644 desktop/plasma/default.nix delete mode 100644 desktop/xfce.nix create mode 100644 desktop/xfce/default.nix delete mode 100644 env.nix delete mode 100644 flatpak.nix delete mode 100644 hosts/thinklappi/thinklappi.nix delete mode 100644 nix.nix delete mode 100644 packages.nix create mode 100644 services/flatpak/default.nix create mode 100644 services/zsh/default.nix delete mode 100644 users.nix delete mode 100644 zsh.nix diff --git a/common/environment/default.nix b/common/environment/default.nix new file mode 100644 index 0000000..8f58641 --- /dev/null +++ b/common/environment/default.nix @@ -0,0 +1,26 @@ +{...}: { + environment.sessionVariables = rec { + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + XDG_STATE_HOME = "\${HOME}/.local/state"; + ZDOTDIR = "\${HOME}/.config/zsh"; + CARGO_HOME = "\${HOME}/.local/share/cargo"; + ANDROID_HOME = "\${HOME}/.local/share/android"; + ANSIBLE_HOME = "\${HOME}/.local/share/ansible"; + #_JAVA_OPTIONS = '-Djava.util.prefs.userRoot="\${XDG_CONFIG_HOME}/java"'; + WINEPREFIX = "\${HOME}/.local/share/wine"; + GNUPGHOME = "\${HOME}/.local/share/gnupg"; + GRADLE_USER_HOME = "\${HOME}/.local/share/gradle"; + GTK2_RC_FILES = "\${HOME}/.config/gtk-2.0/gtkrc"; + EDITOR = "nvim"; + GOPATH = "\${HOME}/.local/share/go"; + XCOMPOSECACHE = "\${HOME}/.cache/X11/xcompose"; + #PYTHONSTARTUP="/etc/python/pythonrc"; + + PATH = [ + "\${XDG_BIN_HOME}" + ]; + }; +} diff --git a/common/nix/default.nix b/common/nix/default.nix new file mode 100644 index 0000000..30f5b38 --- /dev/null +++ b/common/nix/default.nix @@ -0,0 +1,13 @@ +{...}: { + nix = { + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 3"; + }; + settings = { + auto-optimise-store = true; + experimental-features = ["nix-command" "flakes"]; + }; + }; +} diff --git a/common/packages/default.nix b/common/packages/default.nix new file mode 100644 index 0000000..3fd53b4 --- /dev/null +++ b/common/packages/default.nix @@ -0,0 +1,99 @@ +{ + pkgs, + lib, + ... +}: { + environment.systemPackages = with pkgs; [ + # Core utils + killall # kill programs by name + wget # download stuff + curl # download stuff – reloaded + fd # faster find + neofetch # a must-have + zsh # the one and only shell + + # archives + unzip + zip + _7zz + + neovim # edit nix files ;) + inkscape # vector graphics + + restic # backups + thunderbird # emails + firefox # my browser + librewolf # privacy friendly firefox + ungoogled-chromium # the only chromium-based browser I'd ever use. + google-chrome # breaking promises + element-desktop # chat + libreoffice # convert doc to pdf xD + + keepassxc # passwords + bitwarden # cloud passwords + + gnome.gnome-keyring # to tired to migrate to kwallet + gnome.simple-scan # scanning, obiously + lsd # ls in good + jq # xdg-ninja requieres that + glow # markdown rendering + xdg-ninja # home cleaning + git # versioning + signal-desktop # the ecosystem is moving :( + signal-cli # use signal without phone + mumble # voice chat + + #Nix Stuff + alejandra # nix code formatter + nil # nix language-server + statix # nix linter + + # SSH Stuff + openssh # ssh + mosh # ssh in great + + jdk17 # openjdk17 to satisfy mr.antoine + rustc # rust, obiously + cargo # cargo, the best compiler ever" + lf # a file manager + + gnupg # encryprtion and so on + pinentry # needed for gpg + + tor-browser-bundle-bin # tor-browser + tdesktop # another messenger (telegram) + libsForQt5.kdeconnect-kde # communicate with my phone + imagemagick # convertion and so on + #nerdfonts # nice fonts, u know + alacritty # terminal + konsole # terminal + + zsh-you-should-use # reminder for aliasses + jetbrains.idea-community # Java-IDE + python39 # python programming language + sayonara # audioplayer + vlc # audio, again + nmap # network scanning + tree # tree view of directories + youtube-dl # download videos + mpv # play videos + texlive.combined.scheme-full # LaTeX + gparted # partitioning :( + musescore # notesetting program + geogebra # math program + # Compiler + gcc + execline + + ltex-ls # lsp language server for languagetool + texlab # latex language server + html-tidy # html formatter + + bottles # run windows software + ]; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "geogebra" + "google-chrome" + ]; +} diff --git a/common/users/default.nix b/common/users/default.nix new file mode 100644 index 0000000..7f1e7d2 --- /dev/null +++ b/common/users/default.nix @@ -0,0 +1,22 @@ +{pkgs, ...}: { + users = { + mutableUsers = false; + users.sils = { + isNormalUser = true; + home = "/home/sils"; + shell = pkgs.zsh; + initialHashedPassword = "$y$j9T$r4578Hy9jZHmUH9uSr9OI.$SuR2anRq7EJ1gUJ6vi9qYmZrhLP.o3O5643IG6r5Ap/"; + extraGroups = ["wheel" "networkmanager"]; + }; + users.cnnr = { + isNormalUser = true; + home = "/home/cnnr"; + shell = pkgs.zsh; + initialHashedPassword = "$y$j9T$NFz0d2coUOvl.hL3YRwEY0$8btvXUoWGWwo11ksdt8eIFUljCkpUe0YliEy7l0odU1"; + }; + }; + services.xserver.displayManager.autoLogin = { + enable = true; + user = "sils"; + }; +} diff --git a/desktop/gnome.nix b/desktop/gnome.nix deleted file mode 100644 index 630b30a..0000000 --- a/desktop/gnome.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services.xserver.enable = true; - - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; -} diff --git a/desktop/gnome/default.nix b/desktop/gnome/default.nix new file mode 100644 index 0000000..dbeb0f6 --- /dev/null +++ b/desktop/gnome/default.nix @@ -0,0 +1,6 @@ +{...}: { + services.xserver.enable = true; + + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; +} diff --git a/desktop/plasma.nix b/desktop/plasma.nix deleted file mode 100644 index 8a33310..0000000 --- a/desktop/plasma.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services.xserver = { - enable = true; - displayManager.sddm.enable = true; - desktopManager.plasma5 = { - enable = true; - excludePackages = with pkgs.libsForQt5; [ - kwallet - kwallet-pam - kwalletmanager - ]; - }; - }; -} diff --git a/desktop/plasma/default.nix b/desktop/plasma/default.nix new file mode 100644 index 0000000..4198029 --- /dev/null +++ b/desktop/plasma/default.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + services.xserver = { + enable = true; + displayManager.sddm.enable = true; + desktopManager.plasma5 = { + enable = true; + excludePackages = with pkgs.libsForQt5; [ + kwallet + kwallet-pam + kwalletmanager + ]; + }; + }; +} diff --git a/desktop/xfce.nix b/desktop/xfce.nix deleted file mode 100644 index 227e063..0000000 --- a/desktop/xfce.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services = { - blueman.enable = true; - xserver = { - enable = true; - desktopManager.xfce.enable = true; - }; - }; -} diff --git a/desktop/xfce/default.nix b/desktop/xfce/default.nix new file mode 100644 index 0000000..b0de71a --- /dev/null +++ b/desktop/xfce/default.nix @@ -0,0 +1,9 @@ +{...}: { + services = { + blueman.enable = true; + xserver = { + enable = true; + desktopManager.xfce.enable = true; + }; + }; +} diff --git a/env.nix b/env.nix deleted file mode 100644 index b0ebd72..0000000 --- a/env.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - pkgs, - ... -}: { - environment.sessionVariables = rec { - XDG_CACHE_HOME = "\${HOME}/.cache"; - XDG_CONFIG_HOME = "\${HOME}/.config"; - XDG_BIN_HOME = "\${HOME}/.local/bin"; - XDG_DATA_HOME = "\${HOME}/.local/share"; - XDG_STATE_HOME = "\${HOME}/.local/state"; - ZDOTDIR = "\${HOME}/.config/zsh"; - CARGO_HOME = "\${HOME}/.local/share/cargo"; - ANDROID_HOME = "\${HOME}/.local/share/android"; - ANSIBLE_HOME = "\${HOME}/.local/share/ansible"; - #_JAVA_OPTIONS = '-Djava.util.prefs.userRoot="\${XDG_CONFIG_HOME}/java"'; - WINEPREFIX = "\${HOME}/.local/share/wine"; - GNUPGHOME = "\${HOME}/.local/share/gnupg"; - GRADLE_USER_HOME = "\${HOME}/.local/share/gradle"; - GTK2_RC_FILES = "\${HOME}/.config/gtk-2.0/gtkrc"; - EDITOR = "nvim"; - GOPATH = "\${HOME}/.local/share/go"; - XCOMPOSECACHE = "\${HOME}/.cache/X11/xcompose"; - #PYTHONSTARTUP="/etc/python/pythonrc"; - - PATH = [ - "\${XDG_BIN_HOME}" - ]; - }; -} diff --git a/flake.nix b/flake.nix index 746ceb6..3b08173 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; - modules = [./hosts/thinklappi/thinklappi.nix]; + modules = [./hosts/thinklappi]; }; }; } diff --git a/flatpak.nix b/flatpak.nix deleted file mode 100644 index 138a692..0000000 --- a/flatpak.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - pkgs, - ... -}: { - 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/hosts/thinklappi/default.nix b/hosts/thinklappi/default.nix index 5019f10..8a2fe78 100644 --- a/hosts/thinklappi/default.nix +++ b/hosts/thinklappi/default.nix @@ -1,3 +1,70 @@ -{...}: { - thinklappi = import ./thinklappi.nix; +{ + config, + pkgs, + ... +}: let + compiledLayout = pkgs.runCommand "keyboard-layout" {} '' + ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${../../files/neoqwertz.xkb} $out + ''; +in { + imports = [ + ./basesystem.nix + ../../common/environment + ../../common/nix + ../../common/packages + ../../common/users + ../../services/zsh + ../../services/flatpak # Mainly for minecraft + + # Desktop Environment to use + ../../desktop/gnome + ]; + + services = { + printing.enable = true; + xserver = { + layout = "de"; + #xkbVariant = ",neo"; + xkbOptions = "grp:win_space_toggle"; + displayManager.sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY"; + }; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + }; + + hardware = { + bluetooth.enable = true; + pulseaudio.enable = false; + }; + security.rtkit.enable = true; + + environment.systemPackages = [pkgs.xorg.xkbcomp]; + + i18n.defaultLocale = "en_US.UTF-8"; + + networking = { + hostName = "thinklappi"; + nameservers = ["2620:fe::fe" "2620:fe::9" "9.9.9.9" "149.112.112.112"]; + networkmanager = { + enable = true; + dns = "none"; + }; + }; + + time.timeZone = "Europe/Berlin"; + + console = { + font = "Lat2-Terminus16"; + keyMap = "de"; + #useXkbConfig = true; # use xkbOptions in tty. + }; + + programs.ssh.startAgent = true; + + system.stateVersion = "23.05"; } diff --git a/hosts/thinklappi/thinklappi.nix b/hosts/thinklappi/thinklappi.nix deleted file mode 100644 index 05909b9..0000000 --- a/hosts/thinklappi/thinklappi.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - config, - pkgs, - ... -}: let - compiledLayout = pkgs.runCommand "keyboard-layout" {} '' - ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${../../files/neoqwertz.xkb} $out - ''; -in { - imports = [ - ./basesystem.nix - ../../env.nix - ../../nix.nix - ../../packages.nix - ../../users.nix - ../../zsh.nix - ../../flatpak.nix # Mainly for minecraft - - # Desktop Environment to use - ../../desktop/gnome.nix - ]; - - services = { - printing.enable = true; - xserver = { - layout = "de"; - #xkbVariant = ",neo"; - xkbOptions = "grp:win_space_toggle"; - displayManager.sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY"; - }; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - }; - - hardware = { - bluetooth.enable = true; - pulseaudio.enable = false; - }; - security.rtkit.enable = true; - - environment.systemPackages = [pkgs.xorg.xkbcomp]; - - i18n.defaultLocale = "en_US.UTF-8"; - - networking = { - hostName = "thinklappi"; - nameservers = ["2620:fe::fe" "2620:fe::9" "9.9.9.9" "149.112.112.112"]; - networkmanager = { - enable = true; - dns = "none"; - }; - }; - - time.timeZone = "Europe/Berlin"; - - console = { - font = "Lat2-Terminus16"; - keyMap = "de"; - #useXkbConfig = true; # use xkbOptions in tty. - }; - - programs.ssh.startAgent = true; - - system.stateVersion = "23.05"; -} diff --git a/nix.nix b/nix.nix deleted file mode 100644 index b94cfc9..0000000 --- a/nix.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - nix = { - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 3"; - }; - settings = { - auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; - }; - }; -} diff --git a/packages.nix b/packages.nix deleted file mode 100644 index 3fd53b4..0000000 --- a/packages.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - environment.systemPackages = with pkgs; [ - # Core utils - killall # kill programs by name - wget # download stuff - curl # download stuff – reloaded - fd # faster find - neofetch # a must-have - zsh # the one and only shell - - # archives - unzip - zip - _7zz - - neovim # edit nix files ;) - inkscape # vector graphics - - restic # backups - thunderbird # emails - firefox # my browser - librewolf # privacy friendly firefox - ungoogled-chromium # the only chromium-based browser I'd ever use. - google-chrome # breaking promises - element-desktop # chat - libreoffice # convert doc to pdf xD - - keepassxc # passwords - bitwarden # cloud passwords - - gnome.gnome-keyring # to tired to migrate to kwallet - gnome.simple-scan # scanning, obiously - lsd # ls in good - jq # xdg-ninja requieres that - glow # markdown rendering - xdg-ninja # home cleaning - git # versioning - signal-desktop # the ecosystem is moving :( - signal-cli # use signal without phone - mumble # voice chat - - #Nix Stuff - alejandra # nix code formatter - nil # nix language-server - statix # nix linter - - # SSH Stuff - openssh # ssh - mosh # ssh in great - - jdk17 # openjdk17 to satisfy mr.antoine - rustc # rust, obiously - cargo # cargo, the best compiler ever" - lf # a file manager - - gnupg # encryprtion and so on - pinentry # needed for gpg - - tor-browser-bundle-bin # tor-browser - tdesktop # another messenger (telegram) - libsForQt5.kdeconnect-kde # communicate with my phone - imagemagick # convertion and so on - #nerdfonts # nice fonts, u know - alacritty # terminal - konsole # terminal - - zsh-you-should-use # reminder for aliasses - jetbrains.idea-community # Java-IDE - python39 # python programming language - sayonara # audioplayer - vlc # audio, again - nmap # network scanning - tree # tree view of directories - youtube-dl # download videos - mpv # play videos - texlive.combined.scheme-full # LaTeX - gparted # partitioning :( - musescore # notesetting program - geogebra # math program - # Compiler - gcc - execline - - ltex-ls # lsp language server for languagetool - texlab # latex language server - html-tidy # html formatter - - bottles # run windows software - ]; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "geogebra" - "google-chrome" - ]; -} 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"; + }; +} diff --git a/users.nix b/users.nix deleted file mode 100644 index cff3e1d..0000000 --- a/users.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - pkgs, - ... -}: { - users = { - mutableUsers = false; - users.sils = { - isNormalUser = true; - home = "/home/sils"; - shell = pkgs.zsh; - initialHashedPassword = "$y$j9T$r4578Hy9jZHmUH9uSr9OI.$SuR2anRq7EJ1gUJ6vi9qYmZrhLP.o3O5643IG6r5Ap/"; - extraGroups = ["wheel" "networkmanager"]; - }; - users.cnnr = { - isNormalUser = true; - home = "/home/cnnr"; - shell = pkgs.zsh; - initialHashedPassword = "$y$j9T$NFz0d2coUOvl.hL3YRwEY0$8btvXUoWGWwo11ksdt8eIFUljCkpUe0YliEy7l0odU1"; - }; - }; - services.xserver.displayManager.autoLogin = { - enable = true; - user = "sils"; - }; -} diff --git a/zsh.nix b/zsh.nix deleted file mode 100644 index c51bcb7..0000000 --- a/zsh.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - config, - 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"; - }; -} -- cgit 1.4.1