wallbash_720p.mp4
Hydenix is a Nix & home-manager configuration for HyDE. The nix ecosystem brings a reproducable environment to the HyDE experience; allowing for build-time configuration options, easy updates, and more.
Features:
- Includes HyDE-cli by default
- NixOS VM that can be run with any supported distro
- Themes are fetched at build-time, for faster setup
config.nix
for easy configuration- Includes beta cross-distro support using home-manager, more on that here.
Why Nix?:
- Reproducible environment
- Easy to manage packages, dependencies, and configurations
- changes in configuration can be rolled back easily
- home-manager for managing dotfiles
Important
NixOS is entirely different than Arch. Experience in functional programming is recommended. If you are new to Nix, please refer to the Nix Resources. Feel free to ask questions in discussions or discord.
- important - Custom modules in
config.nix
may override hydenix defaults. - important - Configurations will RESET on reboot/relog/rebuilds if your configuration does not match commands run in Hyde; such as active theme and waybar styles. This by design, as nixos and home-manager rerun.
- Some Hyde-cli commands are not supported
Hyde theme import
useconfig.nix
optionsHyde restore/backup/control
while these commands will work, hydenix makes edits to hyde files by default.Hyde override
changing the user dir conflics with home-manager, rebuilds won't run as expectedHyde inject
not supported, use nixos options
- Any other issues, see Troubleshooting & Issues
- nix pkg manager: i recommend using the nix-installer from DeterminateSystems
- git (
nix-shell -p git
)
Caution
Templated flake is designed for a minimal install of NixOS. YMMV.
- in a new directory,
nix flake init -t github:richen604/hydenix
- edit
config.nix
with your preferences - run
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
git init && git add .
(flakes have to be managed via git)- run any of the packages in your new
flake.nix
- for vm
nix run .
- for rebuild
sudo nixos-rebuild switch/test/boot --flake .
- for vm
If your system supports it, the NixOS VM is the quickest way to get up and running. If you have issues running the VM, see the virtio faq
# run the flake remotely
nix run github:richen604/hydenix
note: any changes require the vm to be rebuilt. run
rm hydenix.qcow2
to remove the old one.
Currently Arch & Fedora VMs are supported Same VM requirements as VM virtio guide
nix run github:richen604/hydenix/#build-fedora-vm # or #build-arch-vm
# after the vm is built, run the flake from the vm
nix run github:richen604/hydenix/#run-fedora-vm # or #run-arch-vm
Hydenix can be upgraded, downgraded, or version locked easy.
in your template flake folder, update hydenix to main using
nix flake update hydenix
or define a specific version in your flake.nix
template
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 apply the changes
Below is a brief reference of the directory structure to hydenix:
Contains host-specific configurations and settings.
NixOS-specific configurations:
configuration.nix
- main nixos system configuration, anything that cannot be done in home-managerdefault.nix
- nixos configuration function used inlib/mkConfig.nix
drivers.nix
- Hardware driver config - used inconfig.nix
home.nix
- base home-manager config
Virtual machine related configurations:
arch-vm.nix
- Arch Linux VM configurationfedora-vm.nix
- Fedora VM configurationnix-vm.nix
- NixOS VM configurationvm-utils.nix
- Shared VM utilities for non-nixos/scripts
- VM management scripts
home-manager module containing most of hydenix's configurations:
/hm
- Home-manager specific configurations/packages
- Custom package definitions/programs
- Program-specific configurations/sources
- Source files and dependencies, including hyde-cli and themesdefault.nix
- Main configuration entry point
Shared libraries and utilities:
dev-shell.nix
- Development shell configuration for pre-commit hookgen-config.sh
- Configuration generation scriptmkConfig.nix
- Configuration builder, takesconfig.nix
and returns hydenix
Template for creating your own flake.
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 provided.
- System Logs
journalctl -b # System logs
journalctl --user -b # User logs
sudo systemctl status home-manager-$HOSTNAME.service # Home-manager status
- System Information
nix-shell -p nix-info --run "nix-info -m"
- Configuration
- Link to a github repo with your templated flake or fork
Note
Custom modules in config.nix
have limited support.
Hyprland vm is not well supported. check out Hyprland - Running in a VM
Best bet is to have virtio, opengl, and VT-x support
Non-NixOS hosts should run with nixGL eg nixGL nix run .
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
Install Drivers
# Nvidia
sudo apt install nvidia-driver nvidia-utils # Debian/Ubuntu
sudo pacman -S nvidia nvidia-utils # Arch
# AMD
sudo apt install mesa-utils vulkan-tools # Debian/Ubuntu
sudo pacman -S mesa lib32-mesa vulkan-radeon # Arch
# Intel
sudo apt install mesa-utils intel-media-va-driver # Debian/Ubuntu
sudo pacman -S mesa lib32-mesa intel-media-driver # Arch
# KVM modprobe
modprobe kvm
modprobe kvm_intel # or kvm_amd
Add user to groups
sudo usermod -a -G render,video,kvm,libvirt $USER
Verify Setup
# Verify KVM support
egrep -c '(vmx|svm)' /proc/cpuinfo # Should return > 0
lsmod | grep kvm # Check KVM modules
# Host: Check OpenGL
glxinfo | grep "OpenGL"
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
- Nix Options
- Home Manager Options hint: use control + f to search
- NixOS Wiki
- Nixpkgs Discussions
- Nixpkgs Issues
This project uses direnv 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
This project enforces Conventional Commits format for all commit messages. Each commit message must follow this structure:
type(optional-scope): subject
[optional body]
[optional footer(s)]
Where:
-
type must be one of:
feat
: A new featurefix
: A bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, etc)refactor
: Code changes that neither fix bugs nor add featuresperf
: Performance improvementstest
: Adding or modifying testschore
: 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:
- be lowercase
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes using conventional commits
- Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
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.