first
This commit is contained in:
BIN
docs/assets/option-search.png
Normal file
BIN
docs/assets/option-search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
10
docs/community.md
Normal file
10
docs/community.md
Normal file
@@ -0,0 +1,10 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# hydenix community
|
||||
|
||||
here are a list of community configs using hydenix.
|
||||
|
||||
- [richen604/richendots](https://github.com/richen604/richendots)
|
||||
- [Razkaroth/solitude](https://github.com/Razkaroth/solitude)
|
||||
|
||||
if you have a config you'd like to share, please open a PR to add it to the list.
|
||||
65
docs/contributing.md
Normal file
65
docs/contributing.md
Normal file
@@ -0,0 +1,65 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# contributing
|
||||
|
||||
this project uses [direnv](https://direnv.net/) for pre-commit hooks. please install it first:
|
||||
|
||||
- **nix**: `nix-env -iA nixpkgs.direnv`
|
||||
- **macos**: `brew install direnv`
|
||||
- **ubuntu/debian**: `apt-get install direnv`
|
||||
|
||||
then run `direnv allow` to enable the hooks
|
||||
|
||||
more documentation on the codebase can be found at [template README](template/README.md)
|
||||
|
||||
this project enforces [conventional commits](https://www.conventionalcommits.org/) format for all commit messages. each commit message must follow this structure:
|
||||
|
||||
```bash
|
||||
type(optional-scope): subject
|
||||
|
||||
[optional body]
|
||||
|
||||
[optional footer(s)]
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
- **type** must be one of:
|
||||
- `feat`: A new feature
|
||||
- `fix`: A bug fix
|
||||
- `docs`: Documentation changes
|
||||
- `style`: Code style changes (formatting, etc)
|
||||
- `refactor`: Code changes that neither fix bugs nor add features
|
||||
- `perf`: Performance improvements
|
||||
- `test`: Adding or modifying tests
|
||||
- `chore`: Maintenance tasks
|
||||
|
||||
- **scope** is optional but if used:
|
||||
- must be lowercase
|
||||
- should be descriptive of the area of change
|
||||
- examples: vm, themes, home, cli, docs, etc.
|
||||
|
||||
- **subject** must:
|
||||
- not end with a period
|
||||
- be descriptive
|
||||
|
||||
examples:
|
||||
|
||||
- `feat(vm): add support for fedora vm configuration`
|
||||
- `fix: correct wallpaper path in material theme`
|
||||
- `docs: update installation instructions`
|
||||
- `chore: update dependencies`
|
||||
|
||||
## pull requests
|
||||
|
||||
1. fork the repository
|
||||
2. create your feature branch (`git checkout -b feature/amazing-feature`)
|
||||
3. commit your changes using conventional commits
|
||||
4. push to the branch (`git push origin feature/amazing-feature`)
|
||||
5. open a pull request
|
||||
|
||||
## changelog
|
||||
|
||||
the changelog is automatically generated from commit messages. clear, well-formatted commit messages ensure your changes are properly documented.
|
||||
|
||||
for more details, see the [conventional commits specification](https://www.conventionalcommits.org/).
|
||||
428
docs/faq.md
Normal file
428
docs/faq.md
Normal file
@@ -0,0 +1,428 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# faq
|
||||
|
||||
## general FAQ
|
||||
|
||||
- [faq](#faq)
|
||||
- [general FAQ](#general-faq)
|
||||
- [why should I use nixos?](#why-should-i-use-nixos)
|
||||
- [how do I learn more about nix?](#how-do-i-learn-more-about-nix)
|
||||
- [hydenix FAQ](#hydenix-faq)
|
||||
- [how do I upgrade hydenix?](#how-do-i-upgrade-hydenix)
|
||||
- [when should I upgrade?](#when-should-i-upgrade)
|
||||
- [how do I fix (nix error / system error / bug / etc)?](#how-do-i-fix-nix-error--system-error--bug--etc)
|
||||
- [common errors](#common-errors)
|
||||
- [`Existing file '...' is in the way of '...'`](#existing-file--is-in-the-way-of-)
|
||||
- [what are the module options?](#what-are-the-module-options)
|
||||
- [what if I want to customize hydenix?](#what-if-i-want-to-customize-hydenix)
|
||||
- [what are some example configurations?](#what-are-some-example-configurations)
|
||||
- [how do I persist changes on reboot/rebuild/etc?](#how-do-i-persist-changes-on-rebootrebuildetc)
|
||||
- [how do I add a new theme?](#how-do-i-add-a-new-theme)
|
||||
- [what is mutable.nix?](#what-is-mutablenix)
|
||||
- [why do themes still show after I remove them from `hydenix.hm.theme.themes`?](#why-do-themes-still-show-after-i-remove-them-from-hydenixhmthemethemes)
|
||||
- [requesting features](#requesting-features)
|
||||
- [other faq](#other-faq)
|
||||
- [how do I run hyprland in a vm?](#how-do-i-run-hyprland-in-a-vm)
|
||||
|
||||
### why should I use nixos?
|
||||
|
||||
nixos offers several key advantages:
|
||||
|
||||
1. **reproducible setups**: roll back to working states instantly if something breaks.
|
||||
2. **configuration as code**: version control your entire OS setup.
|
||||
3. **no dependency hell**: packages are isolated, allowing multiple versions side by side.
|
||||
4. **declarative approach**: describe the desired end state rather than steps to achieve it.
|
||||
5. **risk-free experimentation**: test configurations without permanent consequences.
|
||||
6. **developer-friendly**: create isolated environments with precise dependencies.
|
||||
|
||||
there's a learning curve, but the benefits are worth it.
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### how do I learn more about nix?
|
||||
|
||||
> [!TIP]
|
||||
> nix is a powerful package manager and configuration system that can be overwhelming at first. here are some resources to help you get started:
|
||||
|
||||
general resources
|
||||
|
||||
- [nix packages](https://search.nixos.org/packages)
|
||||
- [nix options](https://search.nixos.org/options)
|
||||
- [home manager options](https://home-manager-options.extranix.com/?query=&release=master)
|
||||
- [nixos wiki](https://nixos.wiki)
|
||||
- [nixpkgs discussions](https://discourse.nixos.org)
|
||||
- [nixpkgs issues](https://github.com/NixOS/nixpkgs/issues)
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## hydenix FAQ
|
||||
|
||||
### how do I upgrade hydenix?
|
||||
|
||||
hydenix can be upgraded, downgraded, or version locked easy.
|
||||
in your template flake folder, update hydenix to main using
|
||||
|
||||
```bash
|
||||
nix flake update hydenix
|
||||
```
|
||||
|
||||
or define a specific version in your `flake.nix` template
|
||||
|
||||
```nix
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
hydenix = {
|
||||
# Available inputs:
|
||||
# Main: github:richen604/hydenix
|
||||
# Dev: github:richen604/hydenix/dev
|
||||
# Commit: github:richen604/hydenix/<commit-hash>
|
||||
# Version: github:richen604/hydenix/v1.0.0
|
||||
url = "github:richen604/hydenix";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
run `nix flake update hydenix` again to load the update, then rebuild your system to apply the changes
|
||||
|
||||
### when should I upgrade?
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
A[v2.3.1] --> B[major]
|
||||
A --> C[minor]
|
||||
A --> D[patch]
|
||||
B --> E[breaking changes<br>review release notes for api changes]
|
||||
C --> F[new features<br>safe to update]
|
||||
D --> G[bug fixes<br>safe to update]
|
||||
|
||||
style A fill:#c79bf0,stroke:#ebbcba,stroke-width:2px,color:#000
|
||||
style B fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style C fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style D fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style E fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style F fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style G fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
```
|
||||
|
||||
- **always review [release notes](https://github.com/richen604/hydenix/releases) for major updates (api changes)**
|
||||
- keep up with patches for stability
|
||||
- update to minor versions for new features
|
||||
|
||||
### how do I fix (nix error / system error / bug / etc)?
|
||||
|
||||
please see the [troubleshooting](./troubleshooting.md) guide for more information on how to diagnose and fix issues.
|
||||
or create an issue in the [hydenix GitHub repository](https://github.com/richen604/hydenix/issues).
|
||||
|
||||
### common errors
|
||||
|
||||
#### `Existing file '...' is in the way of '...'`
|
||||
|
||||
this error occurs when home-manager tries to manage a file that already exists and wasn't created by home-manager.
|
||||
|
||||
example:
|
||||
|
||||
```bash
|
||||
Existing file '/home/user/.config/kitty/kitty.conf' is in the way of '/nix/store/...-home-manager-files/.config/kitty/kitty.conf'
|
||||
```
|
||||
|
||||
**solution 1: remove existing files (recommended)**
|
||||
|
||||
remove the conflicting files and let home-manager recreate them:
|
||||
|
||||
```bash
|
||||
# Remove the specific file
|
||||
rm ~/.config/kitty/kitty.conf
|
||||
|
||||
# Or remove entire config directory if needed (careful not to delete important files)
|
||||
rm -rf ~/.config/kitty/
|
||||
```
|
||||
|
||||
**solution 2: backup existing files**
|
||||
|
||||
if you want to preserve your existing configuration:
|
||||
|
||||
```bash
|
||||
# Create backup
|
||||
mv ~/.config/kitty/kitty.conf ~/.config/kitty/kitty.conf.backup
|
||||
|
||||
# Then rebuild to let home-manager create the new file
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
|
||||
**solution 3: force home-manager to backup automatically**
|
||||
|
||||
add this to your `configuration.nix` to automatically backup conflicting files:
|
||||
|
||||
```nix
|
||||
{
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
```
|
||||
|
||||
this will automatically rename existing files with a `.backup` extension when home-manager encounters conflicts, allowing the rebuild to proceed without manual intervention only once.
|
||||
|
||||
> [!WARNING]
|
||||
> if there is a conflict again, home-manager will error for you to manually resolve it. i don't include this by default as automating backups may not be ideal for users and it does not really solve the issue with managing backups
|
||||
|
||||
### what are the module options?
|
||||
|
||||
Visit [options.md](./options.md) for more information on the module options.
|
||||
|
||||
### what if I want to customize hydenix?
|
||||
|
||||
hydenix is designed to be customizable outside of the module options. write your own modules, import your own flakes, packages, etc.
|
||||
|
||||
if you need to disable any of the modules above in [module options](#what-are-the-module-options), simply disable the module and write your own configuration. ideally referencing the module in the source code.
|
||||
|
||||
note however, it's very easy to overwrite hydenix defaults this way and may lead to bugs. feel free to ask questions in our [discord](https://discord.gg/AYbJ9MJez7) if you need help.
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### what are some example configurations?
|
||||
|
||||
see [community configs](./community.md) for examples.
|
||||
|
||||
### how do I persist changes on reboot/rebuild/etc?
|
||||
|
||||
> [!IMPORTANT]
|
||||
> do not edit any mutable files at runtime as they may be overwritten on rebuild <br>
|
||||
> all edits must be done in your flake via nixos & home-manager options
|
||||
|
||||
some state files in hydenix are mutable by design. this allows certain theme changes during runtime.
|
||||
|
||||
example:
|
||||
|
||||
lets say you have the default theme set to `Catppuccin Mocha` in `hydenix.hm.theme.active`.
|
||||
|
||||
you change a theme during runtime using `Meta + Shift + T` to `Catppuccin Latte`.
|
||||
your config is unchanged so when you reboot/relog/rebuild, the theme will revert to `Catppuccin Mocha`.
|
||||
|
||||
```nix
|
||||
{
|
||||
hydenix.hm.theme.active = "Catppuccin Mocha";
|
||||
}
|
||||
```
|
||||
|
||||
simply change the theme in your config to match your desired theme and rebuild.
|
||||
|
||||
```nix
|
||||
{
|
||||
hydenix.hm.theme.active = "Catppuccin Latte";
|
||||
}
|
||||
```
|
||||
|
||||
but what about file you want to stop from reverting? waybar position or kitty config?
|
||||
home-managers `home.file` allows you to do this
|
||||
|
||||
```nix
|
||||
# any file in `./modules/hm/`
|
||||
{
|
||||
home.file = {
|
||||
# copy kitty config to your template flake
|
||||
# cp ~/.config/kitty/kitty.conf ~/path/to/flake/kitty.conf
|
||||
".config/kitty/kitty.conf" = {
|
||||
source = ./kitty.conf; # path to your kitty config in your template flake
|
||||
};
|
||||
# copy waybar position state to your template flake
|
||||
# cp ~/.config/waybar/config.ctl ~/path/to/flake/config.ctl
|
||||
".config/waybar/config.ctl" = {
|
||||
source = ./config.ctl; # path to your waybar config in your template flake
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
see [home.file options](https://home-manager-options.extranix.com/?query=home.file&release=master) for more information
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### how do I add a new theme?
|
||||
|
||||
<!-- TODO: docs: Add a guide on how to add a new theme -->
|
||||
|
||||
### what is mutable.nix?
|
||||
|
||||
> [!IMPORTANT]
|
||||
> do not edit any mutable files at runtime as they may be overwritten on rebuild <br>
|
||||
> all edits must be done in your flake via nixos & home-manager options
|
||||
|
||||
`mutable.nix` is a custom module that allows certain files to be copied instead of symlinked during system builds, making them writable at runtime. key points:
|
||||
|
||||
- extends `home.file`, `xdg.configFile`, and `xdg.dataFile` with a `mutable` option
|
||||
- files marked as `mutable = true` (and `force = true`) will be writable
|
||||
- changes persist across rebuilds
|
||||
- useful for programs that need runtime configuration changes
|
||||
|
||||
example usage in scripts:
|
||||
|
||||
```nix
|
||||
home.activation = {
|
||||
example = lib.hm.dag.entryAfter [ "mutableGeneration" ] ''
|
||||
$DRY_RUN_CMD echo "example"
|
||||
'';
|
||||
}
|
||||
```
|
||||
|
||||
credit: [@piousdeer](https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa)
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### why do themes still show after I remove them from `hydenix.hm.theme.themes`?
|
||||
|
||||
themes are saved in `~/.config/hydenix/themes` so they will still show after you remove them from `hydenix.hm.theme.themes`.
|
||||
to clear the saved themes, run `rm -rf ~/.config/hydenix/themes/THEME_NAME` for each theme you want to remove.
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
### requesting features
|
||||
|
||||
please open a [feature request](https://github.com/richen604/hydenix/issues/new?template=feature_request.md) if you have any feature requests.
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## other faq
|
||||
|
||||
### how do I run hyprland in a vm?
|
||||
|
||||
hyprland vm is not well supported. check out [hyprland - running in a vm](https://wiki.hyprland.org/Getting-Started/Installation/#running-in-a-vm)
|
||||
|
||||
best bet is to have virtio, opengl, and VT-x support
|
||||
|
||||
non-nixos hosts should run with [nixGL](https://github.com/nix-community/nixGL) eg `nixGL nix run .`
|
||||
|
||||
<details>
|
||||
<summary>hardware requirements</summary>
|
||||
CPU
|
||||
|
||||
- Intel CPU with VT-x or AMD CPU with AMD-V
|
||||
- Virtualization enabled in BIOS/UEFI
|
||||
|
||||
GPU
|
||||
|
||||
- NVIDIA: GTX 600+ series (proprietary drivers)
|
||||
- AMD: HD 7000+ series
|
||||
- Intel: HD 4000+ (Ivy Bridge)
|
||||
- OpenGL 3.3+ support required
|
||||
|
||||
</details>
|
||||
|
||||
<br>
|
||||
|
||||
<details>
|
||||
<summary>1. install drivers</summary>
|
||||
|
||||
```bash
|
||||
# Nvidia
|
||||
sudo apt install nvidia-driver nvidia-utils # Debian/Ubuntu
|
||||
sudo pacman -S nvidia nvidia-utils # Arch
|
||||
# NixOS configuration
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
}
|
||||
|
||||
# AMD
|
||||
sudo apt install mesa-utils vulkan-tools # Debian/Ubuntu
|
||||
sudo pacman -S mesa lib32-mesa vulkan-radeon # Arch
|
||||
# NixOS configuration
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [ amdvlk ];
|
||||
}
|
||||
|
||||
# Intel
|
||||
sudo apt install mesa-utils intel-media-va-driver # Debian/Ubuntu
|
||||
sudo pacman -S mesa lib32-mesa intel-media-driver # Arch
|
||||
# NixOS configuration
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [ intel-media-driver ];
|
||||
}
|
||||
|
||||
# KVM modprobe
|
||||
modprobe kvm
|
||||
modprobe kvm_intel # or kvm_amd
|
||||
# NixOS configuration
|
||||
{
|
||||
boot.kernelModules = [ "kvm-intel" ]; # or "kvm-amd" for AMD processors
|
||||
virtualisation.libvirtd.enable = true;
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<div style="margin-top: 10px;"></div>
|
||||
|
||||
<details>
|
||||
<summary>2. verify setup</summary>
|
||||
|
||||
```bash
|
||||
# Verify KVM support
|
||||
egrep -c '(vmx|svm)' /proc/cpuinfo # Should return > 0
|
||||
lsmod | grep kvm # Check KVM modules
|
||||
|
||||
# Host: Check OpenGL
|
||||
glxinfo | grep "OpenGL"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<div style="margin-top: 10px;"></div>
|
||||
|
||||
<details>
|
||||
<summary>3. setup the vm</summary>
|
||||
|
||||
to set up the vm, follow the instructions in the [hyprland - running in a vm](https://wiki.hyprland.org/Getting-Started/Installation/#running-in-a-vm) guide.
|
||||
|
||||
additionally, the following qemu options have been found to be successful:
|
||||
|
||||
```bash
|
||||
-device virtio-vga-gl
|
||||
-display gtk,gl=on,grab-on-hover=on
|
||||
-usb -device usb-tablet
|
||||
-cpu host
|
||||
-enable-kvm
|
||||
-machine q35
|
||||
-device intel-iommu
|
||||
-device ich9-intel-hda
|
||||
-device hda-output
|
||||
-vga none
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<div align="right">
|
||||
<a href="#faq">
|
||||
<img src="https://img.shields.io/badge/Back_to_Top-↑-blue" alt="Back to Top" />
|
||||
</a>
|
||||
</div>
|
||||
65
docs/installation.md
Normal file
65
docs/installation.md
Normal file
@@ -0,0 +1,65 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# installation
|
||||
|
||||
> [!CAUTION]
|
||||
> the templated flake is designed for a minimal install of nixos. install nixos first, then follow the instructions below.
|
||||
|
||||
## 1. initialize the flake template
|
||||
|
||||
```bash
|
||||
# create a new directory and initialize the template
|
||||
mkdir hydenix && cd hydenix
|
||||
nix flake init -t github:richen604/hydenix
|
||||
```
|
||||
|
||||
## 2. configure your system
|
||||
|
||||
edit `configuration.nix` following the detailed comments:
|
||||
|
||||
- **optional:** see [module options](./options.md) for advanced configuration
|
||||
|
||||
## 3. generate hardware configuration
|
||||
|
||||
```bash
|
||||
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
|
||||
```
|
||||
|
||||
## 4. initialize git repository
|
||||
|
||||
```bash
|
||||
git init && git add .
|
||||
```
|
||||
|
||||
we do this because flakes must be managed via git. and its good practice to version control your configuration
|
||||
|
||||
## 5. build and switch to the new configuration
|
||||
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake .#hydenix
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> if you made mistakes, it will fail here. try following:
|
||||
>
|
||||
> - read the error carefully, it may be self-explanatory
|
||||
> - troubleshooting steps in [troubleshooting & issues](./troubleshooting.md)
|
||||
> - read the [faq](./faq.md), it may have the answer you're looking for
|
||||
> - please don't hesitate to ask in [discord](https://discord.gg/AYbJ9MJez7) or [github discussions](https://github.com/richen604/hydenix/discussions)!
|
||||
|
||||
## 6. launch hydenix
|
||||
|
||||
reboot and log in.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> do not forget to set your password
|
||||
>
|
||||
> ```bash
|
||||
> passwd
|
||||
> ```
|
||||
|
||||
you can generate the theme cache with the below:
|
||||
|
||||
```bash
|
||||
hyde-shell reload
|
||||
```
|
||||
251
docs/options.md
Normal file
251
docs/options.md
Normal file
@@ -0,0 +1,251 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# hydenix options
|
||||
|
||||
- [hydenix options](#hydenix-options)
|
||||
- [module documentation](#module-documentation)
|
||||
- [required options](#required-options)
|
||||
- [default options](#default-options)
|
||||
|
||||
## module documentation
|
||||
|
||||
going to let you in on a secret: the nix options system *is* the documentation.\
|
||||
let's walk through an example. say you want to find info about `hydenix.hm.theme`.\
|
||||
the easiest way is to search the github repo for the options:
|
||||
|
||||
[search for `hydenix.hm.theme`](https://github.com/richen604/hydenix/search?q=hydenix.hm.theme)
|
||||
|
||||
you'll see the options in the search results, something like this:
|
||||
|
||||

|
||||
|
||||
click on the file to see the actual options definition, which looks something like this:
|
||||
|
||||
```nix
|
||||
options.hydenix.hm.theme = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.hydenix.hm.enable;
|
||||
description = "Enable theme module";
|
||||
};
|
||||
|
||||
active = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Catppuccin Mocha";
|
||||
description = "Active theme name";
|
||||
};
|
||||
|
||||
themes = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
"Catppuccin Mocha"
|
||||
"Catppuccin Latte"
|
||||
];
|
||||
description = "Available theme names";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
notice that `active` has type `str`, which means it accepts a string.
|
||||
so you'd configure it like this:
|
||||
|
||||
```nix
|
||||
hydenix.hm.theme.active = "Catppuccin Mocha";
|
||||
```
|
||||
|
||||
you can find the full list of option types in the [nixos manual](https://nlewo.github.io/nixos-manual-sphinx/development/option-types.xml.html).
|
||||
|
||||
## required options
|
||||
|
||||
these are the required options for hydenix.
|
||||
you *must* set these options or else hydenix will not load.
|
||||
|
||||
```nix
|
||||
{
|
||||
hydenix = {
|
||||
enable = true; # enable hydenix - required, default false
|
||||
hostname = "hydenix"; # hostname
|
||||
timezone = "America/Vancouver"; # timezone
|
||||
locale = "en_CA.UTF-8"; # locale
|
||||
hm.enable = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## default options
|
||||
|
||||
below are the default options for hydenix. they are in *object format* and any options you may follow the steps above to see any of the options implementation and documentation.
|
||||
|
||||
> [!important]
|
||||
> `hydenix.hm` options must be used within a home-manager module, eg `./modules/hm/default.nix`.
|
||||
|
||||
```nix
|
||||
{
|
||||
hydenix = {
|
||||
|
||||
# important options
|
||||
enable = true; # enable hydenix - required, default false
|
||||
hostname = "hydenix"; # hostname
|
||||
timezone = "America/Vancouver"; # timezone
|
||||
locale = "en_CA.UTF-8"; # locale
|
||||
|
||||
# nixos hydenix options
|
||||
audio.enable = true; # enable audio module
|
||||
boot = {
|
||||
enable = true; # enable boot module
|
||||
useSystemdBoot = true; # disable for GRUB
|
||||
grubTheme = "Retroboot"; # or "Pochita"
|
||||
grubExtraConfig = ""; # additional GRUB configuration
|
||||
kernelPackages = pkgs.linuxPackages_zen; # default zen kernel
|
||||
};
|
||||
gaming.enable = true; # enable gaming module
|
||||
hardware.enable = true; # enable hardware module
|
||||
network.enable = true; # enable network module
|
||||
nix.enable = true; # enable nix module
|
||||
sddm.enable = true; # enable sddm module
|
||||
|
||||
system.enable = true; # enable system module
|
||||
|
||||
# home-manager hydenix options
|
||||
hm = {
|
||||
enable = true; # enable home-manager module
|
||||
comma.enable = true; # useful nix tool to run software without installing it first
|
||||
dolphin.enable = true; # file manager
|
||||
editors = {
|
||||
enable = true; # enable editors module
|
||||
neovim = true; # enable neovim module
|
||||
vscode = {
|
||||
enable = true; # enable vscode module
|
||||
wallbash = true; # enable wallbash extension for vscode
|
||||
};
|
||||
vim.enable = true; # enable vim module
|
||||
default = "code"; # default text editor
|
||||
};
|
||||
fastfetch.enable = true; # fastfetch configuration
|
||||
firefox.enable = true; # enable firefox module
|
||||
gaming.enable = true; # enable gaming module
|
||||
git = {
|
||||
enable = true; # enable git module
|
||||
name = null; # git user name eg "John Doe"
|
||||
email = null; # git user email eg "john.doe@example.com"
|
||||
};
|
||||
hyde.enable = true; # enable hyde module
|
||||
hyprland = {
|
||||
enable = true; # enable hyprland module
|
||||
extraConfig = ""; # extra config appended to userprefs.conf
|
||||
overrideMain = null; # complete override of hyprland.conf
|
||||
suppressWarnings = false; # suppress warnings
|
||||
# Animation configurations
|
||||
animations = {
|
||||
enable = true; # enable animation configurations
|
||||
preset = "standard"; # string from override or default: "standard" # or "LimeFrenzy", "classic", "diablo-1", "diablo-2", "disable", "dynamic", "end4", "fast", "high", "ja", "me-1", "me-2", "minimal-1", "minimal-2", "moving", "optimized", "standard", "vertical"
|
||||
extraConfig = ""; # additional animation configuration
|
||||
overrides = { }; # override specific animation files by name
|
||||
};
|
||||
# Shader configurations
|
||||
shaders = {
|
||||
enable = true; # enable shader configurations
|
||||
active = "disable"; # string from override or default: "disable" # or "blue-light-filter", "color-vision", "custom", "grayscale", "invert-colors", "oled", "oled-saver", "paper", "vibrance", "wallbash"
|
||||
overrides = { }; # override or add custom shaders
|
||||
};
|
||||
# Workflow configurations
|
||||
workflows = {
|
||||
enable = true; # enable workflow configurations
|
||||
active = "default"; # string from override or default: "default" # or "editing", "gaming", "powersaver", "snappy"
|
||||
overrides = { }; # override or add custom workflows
|
||||
};
|
||||
# Hypridle configurations
|
||||
hypridle = {
|
||||
enable = true; # enable hypridle configurations
|
||||
extraConfig = ""; # additional hypridle configuration
|
||||
overrideConfig = null; # complete hypridle configuration override (null or lib.types.lines)
|
||||
};
|
||||
# Keybindings configurations
|
||||
keybindings = {
|
||||
enable = true; # enable keybindings configurations
|
||||
extraConfig = ""; # additional keybindings configuration
|
||||
overrideConfig = null; # complete keybindings configuration override (null or lib.types.lines)
|
||||
};
|
||||
# Window rules configurations
|
||||
windowrules = {
|
||||
enable = true; # enable window rules configurations
|
||||
extraConfig = ""; # additional window rules configuration
|
||||
overrideConfig = null; # complete window rules configuration override (null or lib.types.lines)
|
||||
};
|
||||
# NVIDIA configurations
|
||||
nvidia = {
|
||||
enable = false; # enable NVIDIA configurations (defaults to config.hardware.nvidia.enabled)
|
||||
extraConfig = ""; # additional NVIDIA configuration
|
||||
overrideConfig = null; # complete NVIDIA configuration override (null or lib.types.lines)
|
||||
};
|
||||
# Pyprland configurations
|
||||
pyprland = {
|
||||
enable = true; # enable pyprland configurations
|
||||
extraConfig = ""; # additional pyprland configuration
|
||||
overrideConfig = null; # complete pyprland configuration override (null or lib.types.lines)
|
||||
};
|
||||
|
||||
# Monitor configurations
|
||||
monitors = {
|
||||
enable = true; # enable monitor configurations
|
||||
overrideConfig = null; # complete monitor configuration override (null or lib.types.lines)
|
||||
};
|
||||
};
|
||||
lockscreen = {
|
||||
enable = true; # enable lockscreen module
|
||||
hyprlock = true; # enable hyprlock lockscreen
|
||||
swaylock = false; # enable swaylock lockscreen
|
||||
};
|
||||
notifications.enable = true; # enable notifications module
|
||||
qt.enable = true; # enable qt module
|
||||
rofi.enable = true; # enable rofi module
|
||||
screenshots = {
|
||||
enable = true; # enable screenshots module
|
||||
grim.enable = true; # enable grim screenshot tool
|
||||
slurp.enable = true; # enable slurp region selection tool
|
||||
satty.enable = false; # enable satty screenshot annotation tool
|
||||
swappy.enable = true; # enable swappy screenshot editor
|
||||
};
|
||||
wallpapers.enable = true; # enable wallpapers module
|
||||
shell = {
|
||||
enable = true; # enable shell module
|
||||
zsh = {
|
||||
enable = true; # enable zsh shell
|
||||
plugins = [ "sudo" ]; # zsh plugins
|
||||
configText = ""; # zsh config text
|
||||
};
|
||||
bash.enable = false; # enable bash shell
|
||||
fish.enable = false; # enable fish shell
|
||||
pokego.enable = false; # enable Pokemon ASCII art scripts
|
||||
p10k.enable = false; # enable p10k prompt
|
||||
starship.enable = true; # enable starship prompt
|
||||
};
|
||||
social = {
|
||||
enable = true; # enable social module
|
||||
discord.enable = true; # enable discord module
|
||||
webcord.enable = true; # enable webcord module
|
||||
vesktop.enable = true; # enable vesktop module
|
||||
};
|
||||
spotify.enable = true; # enable spotify module
|
||||
swww.enable = true; # enable swww wallpaper daemon
|
||||
terminals = {
|
||||
enable = true; # enable terminals module
|
||||
kitty = {
|
||||
enable = true; # enable kitty terminal
|
||||
configText = ""; # kitty config text
|
||||
};
|
||||
};
|
||||
theme = {
|
||||
enable = true; # enable theme module
|
||||
active = "Catppuccin Mocha"; # active theme name
|
||||
themes = [ "Catppuccin Mocha" "Catppuccin Latte" ]; # default enabled themes, full list in https://github.com/richen604/hydenix/tree/main/hydenix/sources/themes
|
||||
};
|
||||
waybar = {
|
||||
enable = true; # enable waybar module
|
||||
userStyle = ""; # custom waybar user-style.css
|
||||
};
|
||||
wlogout.enable = true; # enable wlogout module
|
||||
xdg.enable = true; # enable xdg module
|
||||
};
|
||||
};
|
||||
}
|
||||
30
docs/troubleshooting.md
Normal file
30
docs/troubleshooting.md
Normal file
@@ -0,0 +1,30 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# troubleshooting & issues
|
||||
|
||||
## nix errors
|
||||
|
||||
nix errors can be tricky to diagnose, but the below might assist in diagnosing the issue.
|
||||
|
||||
> [!TIP]
|
||||
> rerun the command with `-v` to get more verbose output.
|
||||
> you can also rerun the command with `--show-trace` to get a more detailed traceback.
|
||||
> if the nix error is not clear, often the correct error message is somewhere in the *middle* of the error message.
|
||||
|
||||
## system errors & bugs
|
||||
|
||||
the following information is required when creating an issue, please provide as much as possible.
|
||||
it's also possible to diagnose issues yourself with the information below.
|
||||
|
||||
1. **system logs**
|
||||
|
||||
```bash
|
||||
journalctl -b # System logs
|
||||
sudo systemctl status home-manager-$HOSTNAME.service # Home-manager status
|
||||
```
|
||||
|
||||
2. **system information**
|
||||
|
||||
```bash
|
||||
nix-shell -p nix-info --run "nix-info -m"
|
||||
```
|
||||
56
docs/upgrading.md
Normal file
56
docs/upgrading.md
Normal file
@@ -0,0 +1,56 @@
|
||||
<img align="right" width="75px" alt="NixOS" src="https://github.com/HyDE-Project/HyDE/blob/master/Source/assets/nixos.png?raw=true"/>
|
||||
|
||||
# upgrading
|
||||
|
||||
hydenix can be upgraded, downgraded, or version locked easy.
|
||||
in your template flake folder, update hydenix to main using:
|
||||
|
||||
```bash
|
||||
nix flake update hydenix
|
||||
```
|
||||
|
||||
or define a specific version in your `flake.nix` template:
|
||||
|
||||
```nix
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
hydenix = {
|
||||
# Available inputs:
|
||||
# Main: github:richen604/hydenix
|
||||
# Dev: github:richen604/hydenix/dev
|
||||
# Commit: github:richen604/hydenix/<commit-hash>
|
||||
# Version: github:richen604/hydenix/v1.0.0
|
||||
url = "github:richen604/hydenix";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
run `nix flake update hydenix` again to load the update, then rebuild your system to apply the changes.
|
||||
|
||||
## when to upgrade
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
A[v2.3.1] --> B[major]
|
||||
A --> C[minor]
|
||||
A --> D[patch]
|
||||
B --> E[breaking changes<br>review release notes for api changes]
|
||||
C --> F[new features<br>safe to update]
|
||||
D --> G[bug fixes<br>safe to update]
|
||||
|
||||
style A fill:#c79bf0,stroke:#ebbcba,stroke-width:2px,color:#000
|
||||
style B fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style C fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style D fill:#ebbcba,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style E fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style F fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
style G fill:#f6f6f6,stroke:#c79bf0,stroke-width:2px,color:#000
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
> [!Important]
|
||||
>
|
||||
> - **always review [release notes](https://github.com/richen604/hydenix/releases) for major updates (API changes)**
|
||||
> - update to minor versions for new features
|
||||
> - keep up with patches for stability
|
||||
Reference in New Issue
Block a user