nixos-config/README.md

406 lines
14 KiB
Markdown
Raw Normal View History

2023-12-22 23:31:44 +01:00
<h1 align="center">
2024-01-01 22:21:52 +01:00
<img src="./.github/assets/logo/nixos-logo.png " width="100px" />
2023-12-22 23:31:44 +01:00
<br>
Frost-Phoenix's Flakes
<br>
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/palette/macchiato.png" width="600px" /> <br>
<div align="center">
<div align="center">
<p></p>
<div align="center">
<a href="https://github.com/Frost-Phoenix/nixos-config/stargazers">
<img src="https://img.shields.io/github/stars/Frost-Phoenix/nixos-config?color=F5BDE6&labelColor=303446&style=for-the-badge&logo=starship&logoColor=F5BDE6">
</a>
<a href="https://github.com/Frost-Phoenix/nixos-config/">
<img src="https://img.shields.io/github/repo-size/Frost-Phoenix/nixos-config?color=C6A0F6&labelColor=303446&style=for-the-badge&logo=github&logoColor=C6A0F6">
</a>
<a = href="https://nixos.org">
<img src="https://img.shields.io/badge/NixOS-unstable-blue.svg?style=for-the-badge&labelColor=303446&logo=NixOS&logoColor=white&color=91D7E3">
</a>
<a href="https://github.com/Frost-Phoenix/nixos-config/blob/main/LICENSE">
<img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&colorA=313244&colorB=F5A97F&logo=unlicense&logoColor=F5A97F&"/>
</a>
</div>
<br>
</div>
</h1>
<br>
</div>
<p align="center">
2024-01-11 22:03:32 +01:00
<img src="./.github/assets/screenshots/1.png" width="800px" /> <br>
2023-12-22 23:31:44 +01:00
</p>
<p align="center">
2024-01-12 18:38:37 +01:00
Screeenshot last updated <b>2024-01-12</b>
2023-12-22 23:31:44 +01:00
</p>
2024-01-11 22:03:32 +01:00
### 🖼️ Gallery
2023-12-23 14:23:01 +01:00
2024-01-11 22:03:32 +01:00
<details>
<summary>
EXPAND
</summary>
<p align="center">
2024-01-12 18:38:37 +01:00
<img src="./.github/assets/screenshots/3.png" width="800px" /> <br>
2024-01-11 22:03:32 +01:00
</p>
<p align="center">
2024-01-12 18:38:37 +01:00
<img src="./.github/assets/screenshots/2.png" width="800px" /> <br>
2024-01-11 22:03:32 +01:00
</p>
</details>
# 🗃️ Overview
2023-12-23 12:54:13 +01:00
### 📚 Layout
2023-12-22 23:31:44 +01:00
- [flake.nix](flake.nix) base of the configuration
- [hosts](hosts) 🌳 per-host configurations that contain machine specific configurations
- [nixos](hosts/nixos/) 🖥️ Default host
- [modules](modules) 🍱 modularized NixOS configurations
- [core](modules/core/) ⚙️ Core NixOS configuration
- [homes](modules/home/) 🏠 my [Home-Manager](https://github.com/nix-community/home-manager) config
2024-01-11 22:03:32 +01:00
- [pkgs](flake/pkgs) 📦 packages exported by my flake
2023-12-22 23:31:44 +01:00
- [wallpapers](wallpapers/) 🌄 wallpapers collection
2023-12-23 12:54:13 +01:00
### 📓 Components
| | NixOS + Hyprland |
2023-12-23 13:02:43 +01:00
| --------------------------- | :---------------------------------------------------------------------------------------------:
| **Window Manager** | [Hyprland][Hyprland] |
| **Bar** | [Waybar][Waybar] |
| **Application Launcher** | [wofi][wofi] |
| **Notification Daemon** | [Mako][Mako] |
| **Terminal Emulator** | [Kitty][Kitty] |
| **Shell** | [zsh][zsh] + [oh-my-zsh][oh-my-zsh] + [Starship][Starship] |
| **Text Editor** | [VSCodium][VSCodium] + [Neovim][Neovim] |
| **network management tool** | [NetworkManager][NetworkManager] + [network-manager-applet][network-manager-applet] |
| **System resource monitor** | [Btop][Btop] |
| **File Manager** | [nemo][nemo] + [yazi][yazi] |
| **Fonts** | [Nerd fonts][Nerd fonts] |
| **Color Scheme** | [Catppuccin][Catppuccin] |
2023-12-23 14:13:52 +01:00
| **Cursor** | [Nordzy-cursors][Nordzy-cursors] |
2023-12-23 13:02:43 +01:00
| **Icons** | [catppuccin-papirus-folders][catppuccin-papirus-folders] |
| **Lockscreen** | [Swaylock-effects][Swaylock-effects] |
| **Image Viewer** | [imv][imv] |
| **Media Player** | [mpv][mpv] |
| **Music Player** | [audacious][audacious] |
| **Screenshot Software** | [grimblast][grimblast] |
| **Screen Recording** | [wf-recorder][wf-recorder] |
| **Clipboard** | [wl-clipboard][wl-clipboard] |
| **Color Picker** | [hyprpicker][hyprpicker] |
2023-12-23 12:54:13 +01:00
2024-01-12 18:38:37 +01:00
### 🔧 Shell aliases
<details>
<summary>
2024-01-12 18:47:31 +01:00
Utils (EXPAND)
2024-01-12 18:38:37 +01:00
</summary>
2024-01-12 18:47:31 +01:00
- ```c``` $\rightarrow$ ```clear```
- ```vim``` $\rightarrow$ ```nvim```
- ```cat``` $\rightarrow$ ```bat```
- ```nano``` $\rightarrow$ ```micro```
- ```icat``` $\rightarrow$ ```kitten icat```
- ```dsize``` $\rightarrow$ ```du -hs```
- ```findw``` $\rightarrow$ ```grep -rl```
- ```l``` $\rightarrow$ ```eza --icons -a --group-directories-first -1```
- ```ll``` $\rightarrow$ ```eza --icons -a --group-directories-first -1 --no-user --long```
- ```tree``` $\rightarrow$ ```eza --icons --tree --group-directories-first```
2024-01-12 18:38:37 +01:00
</details>
<details>
<summary>
2024-01-12 18:47:31 +01:00
Nixos (EXPAND)
2024-01-12 18:38:37 +01:00
</summary>
2024-01-12 18:47:31 +01:00
- ```cdnix``` $\rightarrow$ ```cd ~/nixos-config && codium ~/nixos-config```
- ```nix-shell``` $\rightarrow$ ```nix-shell --run zsh```
- ```nix-switch``` $\rightarrow$ ```sudo nixos-rebuild switch --flake ~/nixos-config#nixos```
- ```nix-switchu``` $\rightarrow$ ```sudo nixos-rebuild switch --upgrade --flake ~/nixos-config#nixos```
- ```nix-flake-update``` $\rightarrow$ ```sudo nix flake update ~/nixos-config#```
- ```nix-clean``` $\rightarrow$ ```sudo nix-collect-garbage && sudo nix-collect-garbage -d && sudo rm /nix/var/nix/gcroots/auto/* && nix-collect-garbage && nix-collect-garbage -d```
2024-01-12 18:38:37 +01:00
</details>
<details>
<summary>
2024-01-12 18:47:31 +01:00
Git (EXPAND)
2024-01-12 18:38:37 +01:00
</summary>
2024-01-12 18:47:31 +01:00
- ```ga``` $\rightarrow$ ```git add```
- ```gaa``` $\rightarrow$ ```git add --all```
- ```gs``` $\rightarrow$ ```git status```
- ```gb``` $\rightarrow$ ```git branch```
- ```gm``` $\rightarrow$ ```git merge```
- ```gpl``` $\rightarrow$ ```git pull```
- ```gplo``` $\rightarrow$ ```git pull origin```
- ```gps``` $\rightarrow$ ```git push```
- ```gpso``` $\rightarrow$ ```git push origin```
- ```gc``` $\rightarrow$ ```git commit```
- ```gcm``` $\rightarrow$ ```git commit -m```
- ```gch``` $\rightarrow$ ```git checkout```
- ```gchb``` $\rightarrow$ ```git checkout -b```
- ```gcoe``` $\rightarrow$ ```git config user.email```
- ```gcon``` $\rightarrow$ ```git config user.name```
- ```g``` $\rightarrow$ ```lazygit```
2024-01-12 18:38:37 +01:00
</details>
2023-12-23 12:54:13 +01:00
### 📝 Scripts
2023-12-22 23:31:44 +01:00
2024-01-12 18:47:31 +01:00
All the scripts are in ```modules/home/scripts/scripts/``` and are exported as packages in ```modules/home/scripts/default.nix```
2024-01-12 18:38:37 +01:00
2024-01-13 16:00:03 +01:00
<details>
<summary>
extract.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script extract ```tar.gz``` archives in the current directory.
2024-01-13 16:00:03 +01:00
**Usage:** ```extract <archive_file>```
</details>
<details>
<summary>
compress.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script compress a file or a folder into a ```tar.gz``` archives wich is created in the current directory with the name of the chosen file or folder.
2024-01-13 16:00:03 +01:00
**Usage:** ```compress <file>``` or ```compress <folder>```
</details>
<details>
<summary>
toogle_blur.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script toggles the Hyprland blur effect. If the blur is currently enabled, it will be disabled, and if it's disabled, it will be turned on.
2024-01-13 16:00:03 +01:00
**Usage:** ```toogle_blur```
</details>
<details>
<summary>
toogle_oppacity.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script toggles the Hyperland oppacity effect. If the oppacity is currently set to 0.90, it will be set to 1, and if it's set to 1, it will be set to 0.90.
2024-01-13 16:00:03 +01:00
**Usage:** ```toogle_oppacity```
</details>
<details>
<summary>
maxfetch.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script is a modified verssion of the [jobcmax/maxfetch][maxfetch] script.
2024-01-13 16:00:03 +01:00
**Usage:** ```maxfetch```
</details>
<details>
<summary>
music.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script is for managing Audacious (music player). If Audacious is currently running, it will be killed (stoping the music); otherwise, it will start Audacious in the 8th workspace and resume the music.
2024-01-13 16:00:03 +01:00
**Usage:** ```music```
</details>
<details>
<summary>
runbg.sh
</summary>
2024-01-13 16:01:57 +01:00
**Description:** This script runs a provided command along with its arguments and detaches it from the terminal. Handy for launching apps from the command line without blocking it.
2024-01-13 16:00:03 +01:00
**Usage:** ```runbg <command> <arg1> <arg2> <...>```
</details>
2024-01-12 18:38:37 +01:00
### ⌨️ Keybinds
2024-01-13 16:00:03 +01:00
View all keybinds by pressing ```$mainMod F1``` and wallpaper picker by pressing ```$mainMod w```. By default ```$mainMod``` is the ```SUPER``` key.
2024-01-12 18:38:37 +01:00
<details>
<summary>
2024-01-13 16:00:03 +01:00
Keybindings
</summary>
- ```bind = $mainMod, Return, exec, kitty```
- ```bind = ALT, Return, exec, kitty --title float_kitty```
- ```bind = $mainMod SHIFT, Return, exec, kitty --start-as=fullscreen -o 'font_size=16'```
- ```bind = $mainMod, B, exec, firefox```
- ```bind = $mainMod, Q, killactive,```
- ```bind = $mainMod, F, fullscreen, 0```
- ```bind = $mainMod SHIFT, F, fullscreen, 1```
- ```bind = $mainMod, Space, togglefloating,```
- ```bind = $mainMod, D, exec, pkill wofi || wofi --show drun```
- ```bind = $mainMod, Escape, exec, swaylock```
- ```bind = $mainMod SHIFT, Escape, exec, shutdown-script```
- ```bind = $mainMod, P, pseudo,```
- ```bind = $mainMod, J, togglesplit,```
- ```bind = $mainMod, E, exec, nemo```
- ```bind = $mainMod SHIFT, B, exec, pkill -SIGUSR1 .waybar-wrapped```
- ```bind = $mainMod, C ,exec, hyprpicker -a```
- ```bind = $mainMod, G,exec, $HOME/.local/bin/toggle_layout```
- ```bind = $mainMod, W,exec, pkill wofi || wallpaper-picker```
</details>
<details>
<summary>
Screenshot
</summary>
- ```bind = $mainMod, Print, exec, grimblast --notify --cursor save area ~/Pictures/$(date +'%Y-%m-%d-At-%Ih%Mm%Ss').png```
- ```bind = ,Print, exec, grimblast --notify --cursor copy area```
</details>
<details>
<summary>
Switch window focus
</summary>
- ```bind = $mainMod, left, movefocus, l```
- ```bind = $mainMod, right, movefocus, r```
- ```bind = $mainMod, up, movefocus, u```
- ```bind = $mainMod, down, movefocus, d```
</details>
<details>
<summary>
Switch workspace
</summary>
- ```bind = $mainMod, 1, workspace, 1```
- ```bind = $mainMod, 2, workspace, 2```
- ```bind = $mainMod, 3, workspace, 3```
- ```bind = $mainMod, 4, workspace, 4```
- ```bind = $mainMod, 5, workspace, 5```
- ```bind = $mainMod, 6, workspace, 6```
- ```bind = $mainMod, 7, workspace, 7```
- ```bind = $mainMod, 8, workspace, 8```
- ```bind = $mainMod, 9, workspace, 9```
- ```bind = $mainMod, 0, workspace, 10```
</details>
<details>
<summary>
Switch window to workspace
</summary>
- ```bind = $mainMod SHIFT, 1, movetoworkspace, 1```
- ```bind = $mainMod SHIFT, 2, movetoworkspace, 2```
- ```bind = $mainMod SHIFT, 3, movetoworkspace, 3```
- ```bind = $mainMod SHIFT, 4, movetoworkspace, 4```
- ```bind = $mainMod SHIFT, 5, movetoworkspace, 5```
- ```bind = $mainMod SHIFT, 6, movetoworkspace, 6```
- ```bind = $mainMod SHIFT, 7, movetoworkspace, 7```
- ```bind = $mainMod SHIFT, 8, movetoworkspace, 8```
- ```bind = $mainMod SHIFT, 9, movetoworkspace, 9```
- ```bind = $mainMod SHIFT, 0, movetoworkspace, 10```
- ```bind = $mainMod CTRL, c, movetoworkspace, empty```
</details>
<details>
<summary>
Window control
</summary>
- ```bind = $mainMod SHIFT, left, movewindow, l```
- ```bind = $mainMod SHIFT, right, movewindow, r```
- ```bind = $mainMod SHIFT, up, movewindow, u```
- ```bind = $mainMod SHIFT, down, movewindow, d```
- ```bind = $mainMod CTRL, left, resizeactive, -80 0```
- ```bind = $mainMod CTRL, right, resizeactive, 80 0```
- ```bind = $mainMod CTRL, up, resizeactive, 0 -80```
- ```bind = $mainMod CTRL, down, resizeactive, 0 80```
- ```bind = $mainMod ALT, left, moveactive, -80 0```
- ```bind = $mainMod ALT, right, moveactive, 80 0```
- ```bind = $mainMod ALT, up, moveactive, 0 -80```
- ```bind = $mainMod ALT, down, moveactive, 0 80```
</details>
<details>
<summary>
Media and volume controls
2024-01-12 18:38:37 +01:00
</summary>
2024-01-12 19:04:19 +01:00
2024-01-13 16:00:03 +01:00
- ```bind = ,XF86AudioRaiseVolume,exec, pamixer -i 2```
- ```bind = ,XF86AudioLowerVolume,exec, pamixer -d 2```
- ```bind = ,XF86AudioMute,exec, pamixer -t```
- ```bind = ,XF86AudioPlay,exec, playerctl play-pause```
- ```bind = ,XF86AudioNext,exec, playerctl next```
- ```bind = ,XF86AudioPrev,exec, playerctl previous```
- ```bind = , XF86AudioStop, exec, playerctl stop```
- ```bind = $mainMod, mouse_down, workspace, e-1```
- ```bind = $mainMod, mouse_up, workspace, e+1```
</details>
<details>
<summary>
Mouse binding
</summary>
2024-01-12 19:04:19 +01:00
2024-01-13 16:00:03 +01:00
- ```bindm = $mainMod, mouse:272, movewindow```
- ```bindm = $mainMod, mouse:273, resizewindow```
2024-01-12 18:38:37 +01:00
</details>
# 🛠️ Instalation
2024-01-11 22:03:32 +01:00
# 👥 Credits
2023-12-22 23:31:44 +01:00
2023-12-23 14:23:01 +01:00
Other dotfiles that I learned / copy from:
2023-12-22 23:31:44 +01:00
- Nix Flakes
2023-12-23 14:13:52 +01:00
- [nomadics9/NixOS-Flake](https://github.com/nomadics9/NixOS-Flake2): This is where I start my nixos / hyprland journey.
2023-12-22 23:31:44 +01:00
- [samiulbasirfahim/Flakes](https://github.com/samiulbasirfahim/Flakes): General flake / files structure
- [justinlime/dotfiles](https://github.com/justinlime/dotfiles): Mainly waybar
2023-12-23 14:23:01 +01:00
- [skiletro/nixfiles](https://github.com/skiletro/nixfiles): Vscodium config (that prevent it to crash)
2023-12-23 14:13:52 +01:00
- [fufexan/dotfiles](https://github.com/fufexan/dotfiles)
2023-12-22 23:31:44 +01:00
- README
- [ryan4yin/nix-config](https://github.com/ryan4yin/nix-config)
- [NotAShelf/nyx](https://github.com/NotAShelf/nyx)
- [sioodmy/dotfiles](https://github.com/sioodmy/dotfiles)
- [Ruixi-rebirth/flakes](https://github.com/Ruixi-rebirth/flakes)
2023-12-23 14:13:52 +01:00
<p align="center"><img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
<!-- end of page, send back to the top -->
2023-12-22 23:31:44 +01:00
<div align="right">
<a href="#readme">Back to the Top</a>
2023-12-23 12:54:13 +01:00
</div>
<!-- Links -->
[Hyprland]: https://github.com/hyprwm/Hyprland
[Kitty]: https://github.com/kovidgoyal/kitty
[Starship]: https://github.com/starship/starship
[Waybar]: https://github.com/Alexays/Waybar
[wofi]: https://hg.sr.ht/~scoopta/wofi
[Btop]: https://github.com/aristocratos/btop
[nemo]: https://github.com/linuxmint/nemo
[yazi]: https://github.com/sxyazi/yazi
[zsh]: https://ohmyz.sh/
[oh-my-zsh]: https://ohmyz.sh/
[Swaylock-effects]: https://github.com/mortie/swaylock-effects
[audacious]: https://audacious-media-player.org/
[mpv]: https://github.com/mpv-player/mpv
[VSCodium]:https://vscodium.com/
[Neovim]: https://github.com/neovim/neovim
[grimblast]: https://github.com/hyprwm/contrib
[imv]: https://sr.ht/~exec64/imv/
[Mako]: https://github.com/emersion/mako
[Nerd fonts]: https://github.com/ryanoasis/nerd-fonts
[NetworkManager]: https://wiki.gnome.org/Projects/NetworkManager
[network-manager-applet]: https://gitlab.gnome.org/GNOME/network-manager-applet/
[wl-clipboard]: https://github.com/bugaevc/wl-clipboard
[wf-recorder]: https://github.com/ammen99/wf-recorder
[hyprpicker]: https://github.com/hyprwm/hyprpicker
[Catppuccin]: https://github.com/catppuccin/catppuccin
[catppuccin-papirus-folders]: https://github.com/catppuccin/papirus-folders
2024-01-13 16:00:03 +01:00
[Nordzy-cursors]: https://github.com/alvatip/Nordzy-cursors
[maxfetch]: https://github.com/jobcmax/maxfetch