Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-01-01 17:15:04 +01:00
parent 1b0eb2f7bf
commit 8e6270ca34
72 changed files with 1245 additions and 2252 deletions

View File

@@ -1,130 +1,124 @@
<div align="center">
<img alt="nixy logo" src="https://raw.githubusercontent.com/anotherhadi/nixy/main/.github/assets/logo.png" width="120px" />
</div>
<br>
# Nixy
<br>
<div align="center">
<a href="https://github.com/anotherhadi/nixy/stargazers">
<img src="https://img.shields.io/github/stars/anotherhadi/nixy?color={primarycolor}&labelColor={backgroundcolor}&style=for-the-badge&logo=starship&logoColor={primarycolor}">
</a>
<a href="https://github.com/anotherhadi/nixy/">
<img src="https://img.shields.io/github/repo-size/anotherhadi/nixy?color={primarycolor}&labelColor={backgroundcolor}&style=for-the-badge&logo=github&logoColor={primarycolor}">
</a>
<a href="https://nixos.org">
<img src="https://img.shields.io/badge/NixOS-unstable-blue.svg?style=for-the-badge&labelColor={backgroundcolor}&logo=NixOS&logoColor={primarycolor}&color={primarycolor}">
</a>
<a href="https://github.com/anotherhadi/nixy/blob/main/LICENSE">
<img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&colorA={backgroundcolor}&colorB={primarycolor}&logo=unlicense&logoColor={primarycolor}"/>
</a>
</div>
<br>
**Nixy simplifies and unifies** the Hyprland ecosystem with a modular, easily
customizable setup. It provides a structured way to manage your system
configuration and dotfiles with minimal effort. It includes _home-manager_,
_secrets_, and _custom theming_ all in one place.
**Features:**
- 💻 Hyprland-centric: Preconfigured Hyprland ecosystem (Hyprlock, Hyprpanel,
etc.)
- 🎨 Consistent Theming: Base16 & Stylix-powered themes
- ⌨️ Vim-like Everywhere: Unified keybindings (Hyprland, nvim, vimium, etc.)
## Table of Content
{md_table_of_content}
## Gallery
![Nixy helper, peaclock](.github/assets/nixy/1.png)
![Qutebrowser, pipes, shell](.github/assets/nixy/2.png)
![nvim, lazygit](.github/assets/nixy/3.png)
![spotify, cava](.github/assets/nixy/4.png)
## Architecture
### 🏠 /home (User-level configuration)
Contains **dotfiles and settings** that apply to your user environment.
**Subfolders:**
- `programs` is a collection of apps configured with home-manager
- `scripts` is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
- `system` is some "desktop environment" configuration
### 🐧 /nixos
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader,
...)
### 🎨 /themes
This folder contains all system themes. Mainly
[stylix](https://stylix.danth.me/) configurations. Check out the available
themes and learn how to create your own in [THEMES.md](docs/THEMES.md)
### 💻 /hosts
This directory contains host-specific configurations. Each host includes:
- `configuration.nix` for system-wide settings
- `home.nix` for user-level configuration
- `variables.nix` for global variables
- `secrets/` for sensitive data
### 🖥️ /server-modules
This folder contains server-related nixos modules. (bitwarden, nextcloud, ...)
## Installation
1. [Fork](https://github.com/anotherhadi/nixy/fork) this repo and clone it to
your system:
```sh
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
```
2. Copy the `hosts/laptop` folder, rename it to match your systems hostname,
and update `variables.nix` with your machines settings.
3. Copy your `hardware-configuration.nix` into your new host's folder to ensure
proper hardware support.
4. Register your new host in `flake.nix` by adding it under nixosConfigurations.
<div align="center">
<img alt="nixy logo" src="https://raw.githubusercontent.com/anotherhadi/nixy/main/.github/assets/logo.png" width="120px" />
</div>
<br>
# Nixy
<br>
<div align="center">
<a href="https://github.com/anotherhadi/nixy/stargazers">
<img src="https://img.shields.io/github/stars/anotherhadi/nixy?color={primarycolor}&labelColor={backgroundcolor}&style=for-the-badge&logo=starship&logoColor={primarycolor}">
</a>
<a href="https://github.com/anotherhadi/nixy/">
<img src="https://img.shields.io/github/repo-size/anotherhadi/nixy?color={primarycolor}&labelColor={backgroundcolor}&style=for-the-badge&logo=github&logoColor={primarycolor}">
</a>
<a href="https://nixos.org">
<img src="https://img.shields.io/badge/NixOS-unstable-blue.svg?style=for-the-badge&labelColor={backgroundcolor}&logo=NixOS&logoColor={primarycolor}&color={primarycolor}">
</a>
<a href="https://github.com/anotherhadi/nixy/blob/main/LICENSE">
<img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&colorA={backgroundcolor}&colorB={primarycolor}&logo=unlicense&logoColor={primarycolor}"/>
</a>
</div>
<br>
**Nixy simplifies and unifies** the Hyprland ecosystem with a modular, easily
customizable setup. It provides a structured way to manage your system
configuration and dotfiles with minimal effort. It includes _home-manager_,
_secrets_, and _custom theming_ all in one place.
**Features:**
- 💻 Hyprland & Caelestia: Preconfigured Hyprland ecosystem with Caelestia-shell (Ty to both projects!)
- 🎨 Consistent Theming: Base16 & Stylix-powered themes
- ⌨️ Vim-like Everywhere: Unified keybindings (Hyprland, nvim, vimium, etc.)
## Table of Content
{md_table_of_content}
## Screenshots
![Home](.github/assets/rose-pine/home.png)
![Flake & Spotify](.github/assets/rose-pine/flake-spotify.png)
![Browser and notification center](.github/assets/rose-pine/browser-and-notifications.png)
## Architecture
### 🏠 /home (User-level configuration)
Contains **dotfiles and settings** that apply to your user environment.
**Subfolders:**
- `programs` is a collection of apps configured with home-manager
- `system` is some "desktop environment" configuration
### 🐧 /nixos
Those are the system-level configurations. (audio, bluetooth, gpu, bootloader,
...)
### 🎨 /themes
This folder contains all system themes. Mainly
[stylix](https://stylix.danth.me/) configurations. Check out the available
themes and learn how to create your own in [THEMES.md](docs/THEMES.md)
### 💻 /hosts
This directory contains host-specific configurations. Each host includes:
- `configuration.nix` for system-wide settings
- `home.nix` for user-level configuration
- `variables.nix` for global variables
- `secrets/` for sensitive data
### 🖥️ /server-modules
This folder contains server-related nixos modules. (bitwarden, nextcloud, ...)
## Installation
1. [Fork](https://github.com/anotherhadi/nixy/fork) this repo and clone it to
your system:
```sh
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
```
2. Copy the `hosts/laptop` folder, rename it to match your systems hostname,
and update `variables.nix` with your machines settings.
3. Copy your `hardware-configuration.nix` into your new host's folder to ensure
proper hardware support.
4. Register your new host in `flake.nix` by adding it under nixosConfigurations.
> [!IMPORTANT]
> `# CHANGEME` comments are placed throughout the config to
> indicate necessary modifications. Use the following command to quickly locate
> them:
>
> ```sh
> rg "CHANGEME" ~/.config/nixos
> ```
> [!TIP]
> When you add new files, don't forget to run `git add .` to add them to the git
> repository
5. Build the system
```sh
sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
```
## Documentation
- [SERVER](docs/SERVER.md): Check out the server documentation
- [THEMES](docs/THEMES.md): How themes work and how to create your own
- [SCRIPTS](docs/SCRIPTS.md): A list of available scripts and their usage
- [KEYBINDINGS-HYPRLAND](docs/KEYBINDINGS-HYPRLAND.md): Keybindings available in
Hyprland
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
collection of wallpapers
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
- [LICENSE](LICENSE): MIT License
> `# CHANGEME` comments are placed throughout the config to
> indicate necessary modifications. Use the following command to quickly locate
> them:
>
> ```sh
> rg "CHANGEME" ~/.config/nixos
> ```
> [!TIP]
> When you add new files, don't forget to run `git add .` to add them to the git
> repository
5. Build the system
```sh
sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
```
## Documentation
- [SERVER](docs/SERVER.md): Check out the server documentation
- [THEMES](docs/THEMES.md): How themes work and how to create your own
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
collection of wallpapers
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
- [LICENSE](LICENSE): MIT License

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 KiB

BIN
.github/assets/rose-pine/home.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@@ -10,7 +10,7 @@ table_of_content=$(markdown-table-of-contents --start-by 2 ./.github/assets/READ
readme_content=$(cat "./.github/assets/README_template.md")
# Replace variables
readme_content=${readme_content//\{primarycolor\}/A594FD}
readme_content=${readme_content//\{primarycolor\}/A89AD1}
readme_content=${readme_content//\{backgroundcolor\}/0b0b0b}
readme_content=${readme_content//\{md_table_of_content\}/$table_of_content}

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
[[ -d "./docs" ]] || (echo "Folder ./docs not found" && exit 1)
DOCS_FILE="./docs/SCRIPTS.md"
SCRIPTS_FOLDER="./home/scripts"
# search for every directory in the scripts folder:
# The docs for each scripts are in the beginning of the file prefixed by "#-" or "# -" for the title
# Inside the folders, the scripts are stored in default.nix files
echo "[//]: # (This file is autogenerated)" >"$DOCS_FILE"
echo "# Scripts" >>"$DOCS_FILE"
echo "" >>"$DOCS_FILE"
echo "Scripts are located in the 'home/scripts' folder. Home-manager add those in the user's path." >>"$DOCS_FILE"
echo "" >>"$DOCS_FILE"
for folder in "$SCRIPTS_FOLDER"/*; do
script="$folder/default.nix"
[[ -f "$script" ]] || continue
content=$(cat "$script")
content=$(echo "$content" | grep -E "^#-|^# -" | sed 's/^#- //;s/^# - //;s/#-//')
echo "$content" >>"$DOCS_FILE"
echo "" >>"$DOCS_FILE"
done

View File

@@ -1,60 +0,0 @@
#!/usr/bin/env bash
# A script to parse the Hyprland configuration to store keybindings in a table
[[ -d "./docs" ]] || (echo "Folder ./docs not found" && exit 1)
KEYBINDINGS_FILE="./docs/KEYBINDINGS-HYPRLAND.md"
function getList() {
content=$1
name=$2
list_start=$(echo "$content" | sed "/$name = \[/!d;=;Q")
list=$(echo "$content" | tail +"$list_start")
list_end=$(echo "$list" | sed '/\]/!d;=;Q')
list=$(echo "$list" | head -n"$list_end")
echo "$list"
}
[[ -f "./home/system/hyprland/bindings.nix" ]] || (echo "File ./home/system/hyprland/bindings.nix not found" && exit 1)
config=$(cat "./home/system/hyprland/bindings.nix")
# Bind
bind=$(getList "$config" "bind")
# Bindm (mouse)
bindm=$(getList "$config" "bindm")
# Bindl (lock)
bindl=$(getList "$config" "bindl")
# Bindle (lock, repetition)
bindle=$(getList "$config" "bindle")
# Join the lists:
keybindings=$(echo -e "$bind\n$bindm\n$bindl\n$bindle" | grep '"')
echo "[//]: # (This file is autogenerated)" >"$KEYBINDINGS_FILE"
echo "# Keybindings for Hyprland" >>"$KEYBINDINGS_FILE"
echo "" >>"$KEYBINDINGS_FILE"
echo "> [!NOTE]" >>"$KEYBINDINGS_FILE"
echo "> SUPER is the windows key by default" >>"$KEYBINDINGS_FILE"
echo "" >>"$KEYBINDINGS_FILE"
echo "| Description | Keybinding |" >>"$KEYBINDINGS_FILE"
echo "| -- | -- |" >>"$KEYBINDINGS_FILE"
echo "| Switch Workspace | SUPER + {Number} |" >>"$KEYBINDINGS_FILE"
echo "| Move app to Workspace | SHIFT + SUPER + {Number} |" >>"$KEYBINDINGS_FILE"
echo "$keybindings" | while read -r line; do
comment=$(echo "$line" | cut -d\# -f2)
line=$(echo "$line" | cut -d\# -f1)
line=${line:1:${#line}-3}
mod=$(echo "$line" | cut -d, -f1)
key=$(echo "$line" | cut -d, -f2)
# dispatcher=$(echo "$line" | cut -d, -f3)
# params=$(echo "$line" | cut -d, -f4)
[[ $mod == '$mod' ]] && mod="SUPER + "
[[ $mod == '$shiftMod' ]] && mod="SHIFT + SUPER + "
echo "| ${comment:1} | $mod$key |" >>"$KEYBINDINGS_FILE"
done

View File

@@ -1,24 +0,0 @@
on:
push:
paths:
- 'home/system/hyprland/bindings.nix'
permissions:
contents: write
jobs:
update-readme:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Run a script
run: |
chmod +x ./.github/scripts/keybindings_to_markdown.sh
./.github/scripts/keybindings_to_markdown.sh
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update KEYBINDINGS-HYPRLAND.md (auto)" && git push
exit 0

View File

@@ -1,24 +0,0 @@
on:
push:
paths:
- 'home/scripts/**'
permissions:
contents: write
jobs:
update-readme:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Run a script
run: |
chmod +x ./.github/scripts/create_scripts_docs.sh
./.github/scripts/create_scripts_docs.sh
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update SCRIPTS.md (auto)" && git push
exit 0