diff --git a/docs/APPS.md b/docs/APPS.md index 71d62d7..870a514 100644 --- a/docs/APPS.md +++ b/docs/APPS.md @@ -1,9 +1,13 @@ # Apps and services -*non-exhaustive list* +*non-exhaustive lists* ## Laptop +The laptop configuration is used by a Omen 16 laptop w/ nvidia and an amd gpu running NixOS. +The configurations files can be found in the `hosts/laptop` directory. + + | Category | Name | |----------------|---------------| | WM | Hyprland | @@ -32,14 +36,14 @@ | Misc | lazygit | | | neofetch | | | cava | -| | ... | +| See [hosts/laptop](../hosts/laptop/)... | | ## Server The server configuration is used by a home server running NixOS. The configurations files can be found in the `hosts/server` directory. -I mainly use it for self hosting services like Nextcloud, Vaultwarden, etc and for hosting websites. -I exposed some services to the internet using a reverse proxy (Nginx) and cloudflare dns. (Also configured cloudflare-dyndns) +I mainly use it for self hosting websites and services such as Nextcloud, Vaultwarden, ... +I exposed some services to the internet using a reverse proxy (Nginx) and cloudflare-dyndns, others are accessed through a tailscale network ### Apps @@ -50,4 +54,4 @@ I exposed some services to the internet using a reverse proxy (Nginx) and cloudf - Uptime Kuma - "Jackflix" - Jellyfin, Transmission, *arr -- ... +- See [hosts/server](../hosts/server/)... diff --git a/docs/SCRIPTS.md b/docs/SCRIPTS.md index 90fa106..59eb5b9 100644 --- a/docs/SCRIPTS.md +++ b/docs/SCRIPTS.md @@ -1,13 +1,18 @@ # Scripts +Scripts are located in the `home/scripts` folder. Home-manager add those in the path. + ## Nix/NixOs shortcuts -The `hostname` variable in `hosts/yourhost/variables.nix` should be also the name of the `nixosConfiguration` in `flake.nix` file. +> [!TIP] +> The `hostname` variable in `hosts/yourhost/variables.nix` should be also the name of the `nixosConfiguration` in `flake.nix` file. -- `nixy-rebuild` -- `nixy-update` -- `nixy-gc` # garbage collection -- `nixy-cb` # clean boot menu +- `nixy` # UI +- `nixy rebuild` +- `nixy update` +- `nixy upgrade` +- `nixy gc` # garbage collection +- `nixy cb` # clean boot menu ## Brightness control @@ -21,7 +26,7 @@ The `hostname` variable in `hosts/yourhost/variables.nix` should be also the nam - `sound-down` - `sound-toggle` - `sound-output` -- `sound-change ` +- `sound-change [up/down/mute] ` ## Caffeine diff --git a/docs/THEMES.md b/docs/THEMES.md index 863640a..3cecf27 100644 --- a/docs/THEMES.md +++ b/docs/THEMES.md @@ -1,7 +1,7 @@ # Themes Themes are defined in `hosts/themes`. Those themes define the colors, fonts, icons, etc, used by Hyprland and the apps/programs installed. -You can change the selected theme by changing the import statement of your host's variables file. +You can change the selected theme by changing the import statement of your host's variables.nix file. > [!TIP] > To apply the theme to Duckduckgo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js` diff --git a/docs/TODO.md b/docs/TODO.md index 70c00d2..00dca9c 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -9,6 +9,10 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Upload new wallpapers - [ ] MacOS theme - [ ] GithubFetch: Neofetch like, github calendar in the terminal + - [ ] Night shift Toggle + - [ ] Write a hyprland shortcuts markdown file + - [ ] Lock script + - [ ] Tofi (Wofi but terminal based) - [ ] Hyprland - [ ] Make hyprcursor work diff --git a/home/scripts/night-shift/default.nix b/home/scripts/night-shift/default.nix index c650689..0458789 100644 --- a/home/scripts/night-shift/default.nix +++ b/home/scripts/night-shift/default.nix @@ -10,6 +10,7 @@ let ${pkgs.libnotify}/bin/notify-send "$message" \ --replace-id="$(cat "/tmp/nixy-notification" 2>/dev/null || echo 0)" --print-id > "/tmp/nixy-notification" ''; + night-shift-off = pkgs.writeShellScriptBin "night-shift-off" '' pkill wlsunset message="󰖔 Night-Shift Deactivated" diff --git a/home/scripts/nixy/default.nix b/home/scripts/nixy/default.nix index 4c18f91..9103b20 100644 --- a/home/scripts/nixy/default.nix +++ b/home/scripts/nixy/default.nix @@ -5,7 +5,6 @@ let nixy = pkgs.writeShellScriptBin "nixy" '' function exec() { $@ - # hyprctl dispatch exec $@ } function ui(){ @@ -38,39 +37,24 @@ let [[ $1 == "" ]] && ui if [[ $1 == "rebuild" ]];then - nixy-rebuild + sudo nixos-rebuild switch --flake ${config.var.configDirectory}#${config.var.hostname} elif [[ $1 == "upgrade" ]];then - nixy-upgrade + sudo nixos-rebuild switch --upgrade --flake ${config.var.configDirectory}#${config.var.hostname} elif [[ $1 == "update" ]];then - nixy-update + cd ${config.var.configDirectory} && sudo nix flake update elif [[ $1 == "gc" ]];then - nixy-gc + cd ${config.var.configDirectory} && sudo nix-collect-garbage -d elif [[ $1 == "cb" ]];then - nixy-cb + sudo /run/current-system/bin/switch-to-configuration boot + elif [[ $1 == "remote" ]];then + cd ~/.config/nixos && git add . && git commit -m "update" && git push + ssh jack -S -C "cd /home/hadi/.config/nixos && git pull && sudo -S nixos-rebuild switch --flake ~/.config/nixos#jack" + else + echo "Unknown argument" fi ''; - nixy-rebuild = pkgs.writeShellScriptBin "nixy-rebuild" '' - sudo nixos-rebuild switch --flake ${config.var.configDirectory}#${config.var.hostname} - ''; - - nixy-upgrade = pkgs.writeShellScriptBin "nixy-upgrade" '' - sudo nixos-rebuild switch --upgrade --flake ${config.var.configDirectory}#${config.var.hostname} - ''; - - nixy-update = pkgs.writeShellScriptBin "nixy-update" '' - cd ${config.var.configDirectory} && sudo nix flake update - ''; - - nixy-gc = pkgs.writeShellScriptBin "nixy-gc" '' - cd ${config.var.configDirectory} && sudo nix-collect-garbage -d - ''; - - nixy-cb = pkgs.writeShellScriptBin "nixy-cb" '' - sudo /run/current-system/bin/switch-to-configuration boot - ''; - in { home.packages = - [ nixy nixy-rebuild nixy-upgrade nixy-update nixy-gc nixy-cb ]; + [ nixy ]; } diff --git a/home/scripts/remote-rebuild/default.nix b/home/scripts/remote-rebuild/default.nix deleted file mode 100644 index 24aeba7..0000000 --- a/home/scripts/remote-rebuild/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs, config, ... }: - -let - - remote-rebuild = pkgs.writeShellScriptBin "remote-rebuild" '' - ssh jack -S -C "cd /home/hadi/.config/nixos && git pull && sudo -S nixos-rebuild switch --flake ~/.config/nixos#jack" - ''; - - remote-push = pkgs.writeShellScriptBin "remote-push" '' - cd ~/.config/nixos && git add . && git commit -m "update" && git push - remote-rebuild - ''; - -in { home.packages = [ remote-rebuild remote-push ]; } diff --git a/home/scripts/startup/default.nix b/home/scripts/startup/default.nix index 70da0a1..641aaf6 100644 --- a/home/scripts/startup/default.nix +++ b/home/scripts/startup/default.nix @@ -2,6 +2,7 @@ { pkgs, config, ... }: let startup = pkgs.writeShellScriptBin "startup" '' + # Startup is a script called by Hyprland on startup # Because HM enabling services suck. [[ ${toString config.var.sops} == "1" ]] && systemctl --user start sops-nix diff --git a/home/scripts/tofi/default.nix b/home/scripts/tofi/default.nix index 62a21a5..a7e4dcd 100644 --- a/home/scripts/tofi/default.nix +++ b/home/scripts/tofi/default.nix @@ -3,9 +3,9 @@ let tofi = pkgs.writeShellScriptBin "tofi" '' + hyprexec="hyprctl dispatch exec" function exec() { $@ - # hyprctl dispatch exec $@ } function ui(){ @@ -14,7 +14,31 @@ let # "icon;name;command"[] apps=( ";Nixy;nixy" - ";Nerdfont;nerdfont-fzf" + ";Nerdfont FZF;nerdfont-fzf" + ";Brightness Up;brightness-up" + ";Brightness Down;brightness-down" + ";Sound Up;sound-up" + ";Sound Down;sound-down" + ";Sound Toggle Mute;sound-toggle" + ";Sound Change Output;sound-output" + ";Caffeine;caffeine" + ";Night Shift Toggle;night-shift-toggle" + ";Firefox;$hyprexec firefox" + ";Qutebrowser;$hyprexec qutebrowser" + ";Kitty;$hyprexec kitty" + ";Thunar;$hyprexec thunar" + ";Powermenu;powermenu" + ";Wofi;menu" + ";Lock;lock" + ";Bitwarden;$hyprexec bitwarden" + ";Clock; peaclock" + ";Nextcloud;$hyprexec nextcloud" + ";Spotify;$hyprexec spotify" + ";Btop;btop" + ";Cava;cava" + ";Discord;$hyprexec discord" + ";Vlc;$hyprexec vlc" + ";Obsidian;$hyprexec obsidian" ) # Apply default icons if empty: