nixos-config/README.md

190 lines
7.7 KiB
Markdown
Raw Permalink 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>
2024-06-21 10:19:01 +02:00
Ahwxorg/NixOS-config
2023-12-22 23:31:44 +01:00
<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/Ahwxorg/nixos-config/stargazers">
<img src="https://img.shields.io/github/stars/Ahwxorg/nixos-config?color=F5BDE6&labelColor=303446&style=for-the-badge&logo=starship&logoColor=F5BDE6">
2023-12-22 23:31:44 +01:00
</a>
<a href="https://github.com/Ahwxorg/nixos-config/">
<img src="https://img.shields.io/github/repo-size/Ahwxorg/nixos-config?color=C6A0F6&labelColor=303446&style=for-the-badge&logo=github&logoColor=C6A0F6">
2023-12-22 23:31:44 +01:00
</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/Ahwxorg/nixos-config/blob/main/LICENSE">
2023-12-22 23:31:44 +01:00
<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>
2024-06-21 10:18:30 +02:00
### Gallery
2023-12-23 14:23:01 +01:00
2024-01-11 22:03:32 +01:00
<p align="center">
2024-09-04 16:48:54 +02:00
<img src="./.github/assets/screenshots/sakura-desktop.png" /> <br>
Screenshot last updated <b>2025-05-11</b>
2024-09-04 16:48:54 +02:00
</p>
2024-03-03 18:55:42 +01:00
2024-07-15 11:48:53 +02:00
# Overview
2024-10-21 22:57:55 +02:00
> [!WARNING]
> This flake/config has quite high "sometimes I want to quit technology and become a farmer" levels. Stability is not guaranteed.
2024-07-15 11:48:53 +02:00
### Layout
- [flake.nix](flake.nix): base of the configuration
2025-05-01 10:25:47 +02:00
- [variables.nix](variables.nix): base variables useful for all hosts
- [hosts](hosts): per-host configurations that contain host specific settings
- [yoshino](hosts/yoshino/): Desktop (yoshino) specific configuration
2025-09-05 18:44:50 +02:00
- [iris](hosts/iris/): Desktop (iris) specific configuration
2024-07-15 11:48:53 +02:00
- [sakura](hosts/sakura/): Laptop (sakura) specific configuration
- [ichiyo](hosts/ichiyo/): Laptop (ichiyo) specific configuration
2024-12-23 22:45:33 +01:00
- [violet](hosts/violet/): Server (violet) specific configuration
- [dandelion](hosts/dandelion/): Server (dandelion) specific configuration
2025-05-16 01:24:40 +02:00
- [lily](hosts/lily/): Router (lily) specific configuration
2024-07-15 11:48:53 +02:00
- [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
- [services](modules/services/): services ran on my servers
- [pkgs](flake/pkgs): packages exported by my flake
2025-05-01 10:25:47 +02:00
- [roles](roles/): roles to easier define tasks per host
2024-07-15 11:48:53 +02:00
### Components
2023-12-23 12:54:13 +01:00
| | NixOS + Hyprland |
| --------------------------- | :--------------------------------: |
| **Compositor** | [hyprland][hyprland] |
| **Bar** | [waybar][waybar] |
| **Application launcher** | [bemenu][bemenu] |
| **Notification daemon** | [swaync][swaync] |
| **Terminal emulator** | [kitty][kitty] |
| **Shell** | [zsh][zsh] |
| **Text editor** | [neovim][neovim] |
| **Network management tool** | [networkmanager][networkmanager] |
| **File manager** | [thunar][thunar] |
| **Fonts** | [nerd fonts][nerd fonts] |
| **Lockscreen** | [hyprlock][hyprlock] |
2025-05-01 10:25:47 +02:00
| **Image viewer** | [nsxiv][nsxiv] |
| **Media player** | [mpv][mpv] |
| **Screenshot software** | [grimblast][grimblast] |
| **Clipboard** | [wl-clip-persist][wl-clip-persist] |
| **Color picker** | [hyprpicker][hyprpicker] |
2024-01-12 18:38:37 +01:00
2024-07-15 11:48:53 +02:00
### Shell aliases
2024-01-12 18:38:37 +01:00
<details>
<summary>
2024-06-21 10:18:30 +02:00
NixOS (expand)
2024-01-12 18:38:37 +01:00
</summary>
2025-05-01 10:25:47 +02:00
> TODO: ${host} is one of the above-defined hosts
2024-04-15 17:30:05 +02:00
- `ns` $\rightarrow$ `nix-shell --run zsh`
- `nix-switch` $\rightarrow$ `sudo nixos-rebuild switch --flake ~/nixos-config#${host}`
- `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>
2024-07-15 11:48:53 +02:00
### Scripts
2023-12-22 23:31:44 +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>
2024-01-13 16:05:38 +01:00
toggle_blur.sh
2024-01-13 16:00:03 +01:00
</summary>
**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.
**Usage:** `toggle_blur`
2024-01-13 16:01:57 +01:00
2024-01-13 16:00:03 +01:00
</details>
<details>
<summary>
2024-01-13 16:05:38 +01:00
toggle_oppacity.sh
2024-01-13 16:00:03 +01:00
</summary>
**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.
**Usage:** `toggle_oppacity`
2024-01-13 16:01:57 +01:00
2024-01-13 16:00:03 +01:00
</details>
<details>
# Installation
2024-01-13 17:40:30 +01:00
2024-06-21 10:18:30 +02:00
> This is unchanged of Frost-Phoenix's dots, needs to be remade but don't feel like spending that time currently.
2024-01-13 18:14:27 +01:00
> **⚠️ Use this configuration at your own risk! ⚠️** <br>
> Applying custom configurations, especially those related to your operating system, can have unexpected consequences and may interfere with your system's normal behavior. While I have tested these configurations on my own setup, there is no guarantee that they will work flawlessly on all systems. <br> > **I am not responsible for any issues that may arise from using this configuration.**
2024-01-13 17:40:30 +01:00
2024-01-13 18:05:26 +01:00
> It is highly recommended to review the configuration contents and make necessary modifications to customize it to your needs before attempting the installation.
2024-01-13 17:40:30 +01:00
2024-06-21 10:18:30 +02:00
1. **Install NixOS**
2024-01-13 18:05:26 +01:00
First install nixos using any [graphical ISO image](https://nixos.org/download.html#nixos-iso).
2024-01-13 21:53:48 +01:00
2. **Clone the repo**
2024-01-13 18:05:26 +01:00
```
2024-01-13 22:03:51 +01:00
nix-shell -p git
2025-05-01 10:25:47 +02:00
git clone https://github.com/ahwxorg/nixos-config
2024-01-13 18:05:26 +01:00
cd nixos-config
```
2024-01-13 21:53:48 +01:00
3. **Install script**
2024-01-13 18:05:26 +01:00
2025-05-01 10:25:47 +02:00
> TODO: change the install script to work with all hosts, allow for new host creation, etc.
2024-01-13 18:05:26 +01:00
Execute and follow the installation script :
2024-01-13 18:05:26 +01:00
```
2024-04-19 09:04:53 +02:00
./install.sh
2024-01-13 18:05:26 +01:00
```
2024-01-13 21:53:48 +01:00
4. **Reboot**
2024-04-16 14:11:15 +02:00
5. **Manual config**
2025-05-01 10:25:47 +02:00
> Even though I use home manager, there is still a little bit of manual configuration to do, namely SSH keys and browser configuration.
2024-01-13 17:40:30 +01:00
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
- [Frost-Phoenix/nixos-config](https://github.com/Frost-Phoenix/nixos-config): This is the repository that I cloned and changed to my needs. Their credits are in their repository's readme.
2025-08-12 16:21:02 +02:00
- [IvarWithoutBones/dotfiles](https://github.com/IvarWithoutBones/dotfiles)
2024-06-21 10:33:13 +02:00
- [notthebee/nix-config](https://github.com/notthebee/nix-config)
2024-09-27 15:24:23 +02:00
- [mrusme/dotfiles](https://github.com/mrusme/dotfiles)
2023-12-23 12:54:13 +01:00
<!-- Links -->
2025-03-24 09:59:26 +01:00
[hyprland]: https://github.com/hyprwm/Hyprland
[kitty]: https://github.com/kovidgoyal/kitty
[waybar]: https://github.com/Alexays/Waybar
2025-03-01 22:26:53 +01:00
[bemenu]: https://github.com/Cloudef/bemenu
2025-05-01 10:25:47 +02:00
[zsh]: https://en.wikipedia.org/wiki/Z_shell
[hyprlock]: https://github.com/hyprwm/hyprlock
2023-12-23 12:54:13 +01:00
[mpv]: https://github.com/mpv-player/mpv
[VSCodium]: https://vscodium.com/
2025-03-24 09:59:26 +01:00
[neovim]: https://github.com/neovim/neovim
2023-12-23 12:54:13 +01:00
[grimblast]: https://github.com/hyprwm/contrib
2024-07-15 11:48:53 +02:00
[htop]: https://github.com/htop-dev/htop
[thunar]: https://docs.xfce.org/xfce/thunar/start
[nsxiv]: https://nsxiv.codeberg.page
2025-03-24 09:59:26 +01:00
[swaync]: https://github.com/ErikReider/SwayNotificationCenter
[nerd fonts]: https://github.com/ryanoasis/nerd-fonts
2025-03-24 09:59:26 +01:00
[networkmanager]: https://wiki.gnome.org/Projects/NetworkManager
2023-12-23 12:54:13 +01:00
[network-manager-applet]: https://gitlab.gnome.org/GNOME/network-manager-applet/
2024-04-13 17:11:10 +02:00
[wl-clip-persist]: https://github.com/Linus789/wl-clip-persist
2023-12-23 12:54:13 +01:00
[hyprpicker]: https://github.com/hyprwm/hyprpicker