From da1fedaeb12691c14ec22d8daaefad1b9351a473 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Thu, 24 Jul 2025 22:12:06 -0700 Subject: [PATCH 01/12] docs: add options.md guide and simplify template configuration --- README.md | 75 +++++++++---- TODO.md | 125 +++++++-------------- docs/assets/option-search.png | Bin 0 -> 41412 bytes docs/contributing.md | 3 +- docs/faq.md | 148 +------------------------ docs/options.md | 185 ++++++++++++++++++++++++++++++++ template/configuration.nix | 24 +---- template/modules/hm/default.nix | 93 +--------------- 8 files changed, 285 insertions(+), 368 deletions(-) create mode 100644 docs/assets/option-search.png create mode 100644 docs/options.md diff --git a/README.md b/README.md index d2fbd7f2..bd4e25f3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@
-Dynamic JSON Badge +Dynamic JSON Badge
@@ -85,33 +85,69 @@ Why Nix?: ## Documentation -- [Installation Options](#installation-options) +- [Installation](#installation) +- [Module Options](./docs/options.md) - [FAQ](./docs/faq.md) - [Troubleshooting & Issues](./docs/troubleshooting.md) - [Contributing](./docs/contributing.md) -## Installation Options - ---- +## Installation > [!CAUTION] -> Templated flake is designed for a minimal install of NixOS. +> The templated flake is designed for a minimal install of NixOS. Install NixOS first, then follow the instructions below. + +### Quick Start + +1. **Initialize the flake template** + + ```bash + # Create a new directory and initialize the template + mkdir hydenix-config && cd hydenix-config + nix flake init -t github:richen604/hydenix + ``` + +2. **Configure your system** + - Edit `configuration.nix` with your preferences + - Options requiring changes are marked with `! EDIT` + - *(Optional)* Review `./configuration.nix` and `./modules/hm/default.nix` for additional configuration options and overriding defaults, see [Module Options](./docs/options.md) for more information. + +3. **Generate hardware configuration** + + ```bash + sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix + ``` + +4. **Initialize git repository** -### 1. Template the Hydenix Flake + ```bash + git init && git add . + ``` -1. in a new directory, `nix flake init -t github:richen604/hydenix` -2. edit `configuration.nix` with your preferences for hydenix - - options needing to be changed are marked with `! EDIT` - - (optional) in your template flake folder, review both `./configuration.nix` and `./modules/hm/default.nix` for more options -3. run `sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix` -4. `git init && git add .` (flakes have to be managed via git) -5. run any of the packages in your new `flake.nix` - - for rebuild, use `sudo nixos-rebuild switch --flake .` -6. DON'T FORGET: change your password for all users with `passwd` from initialPassword set in `configuration.nix` + > **Note:** Flakes must be managed via git -NOTE: After launching hydenix, you can run `hyde-shell reload` to generate cache for remaining themes if you want. +5. **Build and switch to the new configuration** + + ```bash + sudo nixos-rebuild switch --flake .#nixos + ``` + +6. **Set user passwords** + + ```bash + passwd + ``` + + > **Important:** Change passwords for all users from the `initialPassword` set in `configuration.nix` + +### Post-Installation + +After launching Hydenix, you can generate cache for remaining themes: + +```bash +hyde-shell reload +``` -### 2. Trying Out Hydenix with a VM +## Running The Hydenix VM If your system supports it, the NixOS VM is a great way to try out hydenix without installing it. If you encounter issues running the VM, refer to the [virtio guide](docs/faq.md#how-do-i-run-hyprland-in-a-vm) @@ -140,7 +176,7 @@ inputs = { hydenix = { # Available inputs: # Main: github:richen604/hydenix - # Dev: github:richen604/hydenix/dev + # Dev: github:richen604/hydenix/dev # Commit: github:richen604/hydenix/ # Version: github:richen604/hydenix/v1.0.0 url = "github:richen604/hydenix"; @@ -173,4 +209,3 @@ graph TD - **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 - \ No newline at end of file diff --git a/TODO.md b/TODO.md index daeb9cfd..c1c9c68e 100644 --- a/TODO.md +++ b/TODO.md @@ -3,106 +3,57 @@ ## now / notes -- [ ] finish demo-vm for video +- docs: improved configuration guide +- docs: better hardware configuration guide, no default hardware options +- feat: more hyprland options + - explicit configuration +- feat: new themes to build ## next api update -- [ ] hydenix nixOsModules to nixosModules +- refactor: hydenix nixOsModules to nixosModules +- refactor: outputs more flexible +- fix: nix-index should be a module in hydenix only, its declared twice +- fix: rename nix-index home-manager module whatever new name +- feat: hydenix follows nixpkgs, no userPkgs overlays -## priority +## backlog -- [ ] refactor hydevm to arch compatible then bump to repo +- finish demo-vm for video +- feat: config.toml options +- chore: remove iso builder and ci, close issue related to it in favor of (hyde)nixos-anywhere +- chore: remove old vm builder +- docs: better documented first edits +- refactor: revise module hierarchy to be more clear and concise +- feat: assertions for common requirements +- feat: spicetify theme support? flatpak? +- chore: review bug template to make it more clear (easier with scripts?) -- [ ] docs: better documented first edits - - [ ] add steps for what to edit first - - [ ] add more detailed driver +## future -- [ ] feat: demo-vm - - [ ] video - - [ ] +- binary cache when i build it -- [ ] feat: spicetify theme support? flatpak? +## notes -- [ ] chore: review bug template +using nixos-anywhere to install hydenix -- [ ] feat: hyprland via home-manager only - - support plugins - - use hyprland flake package - - nixGL -- [ ] binary cache -- [ ] feat: experimental module exports #117 +- must be part of the template flake or a new template flake, as it will be used for the user configuration +- document disko configuration clearly, the issue is ive never used disko +- most likely will need its own video installation guide -## unorganized +- cleanupOnDisable activation script and option -- [ ] BREAKING:make hydenix more extensible without losing the ability to upgrade hyde - - [ ] hyde CORE modules - - map a module hierachy, propose a revised api - - modules that are required for hyde must have assertions. - -## iso builder - -- [ ] feat: iso builder should give a copy of the iso to the user on install -- [ ] feat: iso builder automated install should have more clear options, not just configuration.nix -- [ ] feat: iso builder should tell user exact steps of auto installer, reflect that in the readme -- [ ] fix: iso builder should prompt to edit hostname in flake.nix -- [ ] refactor: expand iso installer sections to be more clear and concise -- [ ] feat: iso installer section option to clone your own personal flake from github and use that instead of the hyde template -- [ ] feat: Completed iso builder - -## config.toml integration - -- [ ] feat: hyde config.toml module and options in hyde.nix -- [ ] feat: other program configuration should determine hyde config.toml options -- [ ] feat: extend hyde config.toml options for more nix integration - -## hyprland.conf - -- [ ] feat: more options in hyprland.nix -- [ ] feat: other program configuration should determine hyprland.conf options eg - -## hypridle - -- [ ] feat: hypridle module and options - -## hyprlock - -- [ ] feat: better hyprlock options - -## uncategorized - -- [ ] feat: cleanupOnDisable activation script and option - -## CI - -- [ ] ci: fix iso builder release flake check - -## Future Enhancements - -- [ ] Ecosystem - - [ ] feat: Create sddm-hyprland - - [ ] feat: Integrate hydepanel from rubin - - [ ] feat: Add telegram theme support - - [ ] feat: Add zed theme support - - [ ] feat: Add obsidian theme support - - [ ] feat: Add terminal-emulators support -- [ ] feat: full nixos config & full home-manager config -- [ ] feat: Set NIX-PATH to template flake location - -## Non-NixOS - - for non-nixos packages -specific scripts for each non-nixos distro options, ideally one script for all packages using pm -nixGL wrapping for all programs, well documented in the configuration as users will need to edit it. combine with any driver setup +- nh by default? ## Hyde repo -- [ ] theme makers should be able to precache walls before patching - - [ ] requires arch vm (w/ commit hash param and snapshot functionality) - - [ ] hyde-theme-starter to implement /lib with swwwallcache and wallbash +- theme makers should be able to precache walls before patching + - requires arch vm (w/ commit hash param and snapshot functionality) + - hyde-theme-starter to implement /lib with swwwallcache and wallbash - whatever generates dcols and wallcaches - - [ ] hyde repo themepatcher implement reading for .cache in theme to cp cache and skip - - [ ] validation - - [ ] themepatcher should still generate on missing cache per wall - - [ ] PR's for all themes to bring cache - - [ ] hydenix implementation (just home.file mutable) - - [ ] FUTURE: wallbash should be a seperate lib + - hyde repo themepatcher implement reading for .cache in theme to cp cache and skip + - validation + - themepatcher should still generate on missing cache per wall + - PR's for all themes to bring cache + - hydenix implementation (just home.file mutable) + - FUTURE: wallbash should be a seperate lib diff --git a/docs/assets/option-search.png b/docs/assets/option-search.png new file mode 100644 index 0000000000000000000000000000000000000000..6ca05df7ccd6f46e6280659a02afd218229c45e5 GIT binary patch literal 41412 zcmXty?`zgt zJ=d?Jl@ui5VQ^po006wSl$Z(t0Q&UPzJmh&IakDCNC5yu0BJE{HLsiteNR8N;U~eS zuG5~#WTBvcBG4crjw)zK;L6H$*(9biuE`M@gXSiLji~f~s{F@2_L2CSf466AC1C8ZQ zLdJEFo{W}36WR)?pEaB>-nk(L%Nhpj{| zA4JnpS*(nMb%4)7g71lITjS6jOZ=B+NCdDW2CUSIn(;x5FEr}Uh&4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^eDeSN#ZRX~=#pD}^j64?DE5E+1#{tq%6yWg6o7=R4|!j41_{Kq zwHf-spN`;c*1L2?WF+q%N;EH(lV`gAkK-CJbnaXJ^hH-F=i6|NZV?rvmds$Z)bWTb zfsfT-W9`4fXZtE1jEY;Rk^OnZwS3s7mQuZ5HmfbV#AN_jF#soC^Q&CY^wu8lPn?4( z2{;4S#YcmS%a^3ru@i;5n_Nx6LmxB2N+1xChKi!x$Ezcqm;cnWe%==0_ZyLAib z1J`(L$BOWJ`D=_gO^EFOx>Bw|@wmb}Gy~oF9|LMubs zF0V!$ct-~{M9TO}&eJPYk-J&XGM-K{C;9q+?}AV*UgAz%2Hq)$ literal 0 HcmV?d00001 diff --git a/docs/contributing.md b/docs/contributing.md index b0a15d99..04af45b1 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -38,7 +38,6 @@ Where: - examples: vm, themes, home, cli, docs, etc. - **subject** must: - - be lowercase - not end with a period - be descriptive @@ -61,4 +60,4 @@ Examples: 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/). \ No newline at end of file +For more details, see the [Conventional Commits specification](https://www.conventionalcommits.org/). diff --git a/docs/faq.md b/docs/faq.md index efbae35d..f8c23e80 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -82,7 +82,7 @@ inputs = { hydenix = { # Available inputs: # Main: github:richen604/hydenix - # Dev: github:richen604/hydenix/dev + # Dev: github:richen604/hydenix/dev # Commit: github:richen604/hydenix/ # Version: github:richen604/hydenix/v1.0.0 url = "github:richen604/hydenix"; @@ -213,149 +213,7 @@ This will automatically rename existing files with a `.backup` extension when ho ### What are the module options? -Below will be the default options for hydenix. the only required options are `hydenix.enable` and `hydenix.hm.enable`. - -NixOS hydenix options: - -

-View NixOS hydenix options - -```nix -{ - hydenix = { - - #! Important options - enable = true; # enable hydenix - required, default false - hostname = "hydenix"; # hostname - timezone = "America/Vancouver"; # timezone - locale = "en_CA.UTF-8"; # locale - - #! Below are defaults - 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 - theme = "Candy" # or "Corners" - }; - system.enable = true; # enable system module - }; -} -``` - -
- -
-View Home Manager hydenix options - -```nix -{ - hydenix.hm = { - - #! Important options - enable = true; - - #! Below are defaults - 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.enable = 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 hyprland config text - }; - 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 - }; -} -``` - -
- - +Visit [options.md](./options.md) for more information on the module options. ### What if I want to customize hydenix? @@ -607,4 +465,4 @@ Additionally, the following qemu options have been found to be successful: Back to Top - \ No newline at end of file + diff --git a/docs/options.md b/docs/options.md new file mode 100644 index 00000000..aaba0629 --- /dev/null +++ b/docs/options.md @@ -0,0 +1,185 @@ +# Hydenix Options + +- [Hydenix Options](#hydenix-options) + - [Module Documentation](#module-documentation) + - [Required Options](#required-options) + +## Module Documentation + +The Nix options system *is* the documentation + +Let's walk through an example. Say you want to find info about `hydenix.hm.hyprland`. + +The easiest way is to search the GitHub repo for the options: + +[search for `hydenix.hm.hyprland`](https://github.com/richen604/hydenix/search?q=hydenix.hm.hyprland) + +You'll see the options in the search results, something like this: + +![options search example](./assets/option-search.png) + +Click on the file to see the actual options definition, which looks something like this: + +```nix + options.hydenix.hm.hyprland = { + enable = lib.mkOption { + type = lib.types.bool; + default = config.hydenix.hm.enable; + description = "Enable hyprland module"; + }; + + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Extra config for hyprland"; + }; + }; +``` + +Notice that `extraConfig` has type `lines`, which means it accepts multiline strings. +So you'd configure it like this: + +```nix +hydenix.hm.hyprland.extraConfig = '' + # hyprland.conf + windowrule = float, ^(.*) +'' +``` + +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; + }; +} +``` + +Below will be the default options for hydenix. + +```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 + theme = "Candy" # or "Corners" + }; + system.enable = true; # enable system module + + #! Home Manager hydenix options + hm = { + enable = true; # enable home-manager module + #! Below are defaults + 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.enable = 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 hyprland config text + }; + 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 + }; + }; +} diff --git a/template/configuration.nix b/template/configuration.nix index 6881c9ee..2273a470 100644 --- a/template/configuration.nix +++ b/template/configuration.nix @@ -76,7 +76,6 @@ in }; }; - # IMPORTANT: Customize the following values to match your preferences hydenix = { enable = true; # Enable the Hydenix module @@ -85,28 +84,7 @@ in timezone = "America/Vancouver"; # Change to your timezone locale = "en_CA.UTF-8"; # Change to your preferred locale - /* - Optionally edit the below values, or leave to use hydenix defaults - visit ./modules/hm/default.nix for more 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 - theme = "Candy"; # or "Corners" - }; - system.enable = true; # enable system module - */ + # Visit https://github.com/richen604/hydenix/blob/main/docs/options.md for more options }; #! EDIT THESE VALUES (must match users defined above) diff --git a/template/modules/hm/default.nix b/template/modules/hm/default.nix index 0e10dfa8..ec4ce80c 100644 --- a/template/modules/hm/default.nix +++ b/template/modules/hm/default.nix @@ -12,95 +12,6 @@ ]; # hydenix home-manager options go here - hydenix.hm = { - #! Important options - enable = true; - /* - ! Below are defaults, no need to uncomment them all - 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 - neovim = true; # enable neovim module - vscode = { - enable = true; # enable vscode module - wallbash = true; # enable wallbash extension for vscode - }; - vim = true; # enable vim module - default = "code"; # default text editor - vim = true; # enable vim module - default = "code"; # default text editor - }; - fastfetch.enable = true; # fastfetch configuration - firefox.enable = true; # enable firefox 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 hyprland config text - }; - 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 - }; - 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 - */ - }; + hydenix.hm.enable = true; + # Visit https://github.com/richen604/hydenix/blob/main/docs/options.md for more options } From bd226bd5395991b2030e9f3ca3f4cf5ce2bbe391 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Thu, 24 Jul 2025 22:44:58 -0700 Subject: [PATCH 02/12] feat: added additional hyprland options --- TODO.md | 5 +- docs/options.md | 50 ++++- hydenix/modules/hm/default.nix | 2 +- hydenix/modules/hm/hyprland.nix | 164 ---------------- hydenix/modules/hm/hyprland/animations.nix | 72 +++++++ hydenix/modules/hm/hyprland/default.nix | 72 +++++++ hydenix/modules/hm/hyprland/hypridle.nix | 30 +++ hydenix/modules/hm/hyprland/keybindings.nix | 30 +++ hydenix/modules/hm/hyprland/monitors.nix | 29 +++ hydenix/modules/hm/hyprland/nvidia.nix | 30 +++ hydenix/modules/hm/hyprland/options.nix | 198 ++++++++++++++++++++ hydenix/modules/hm/hyprland/shaders.nix | 67 +++++++ hydenix/modules/hm/hyprland/windowrules.nix | 30 +++ hydenix/modules/hm/hyprland/workflows.nix | 66 +++++++ 14 files changed, 677 insertions(+), 168 deletions(-) delete mode 100644 hydenix/modules/hm/hyprland.nix create mode 100644 hydenix/modules/hm/hyprland/animations.nix create mode 100644 hydenix/modules/hm/hyprland/default.nix create mode 100644 hydenix/modules/hm/hyprland/hypridle.nix create mode 100644 hydenix/modules/hm/hyprland/keybindings.nix create mode 100644 hydenix/modules/hm/hyprland/monitors.nix create mode 100644 hydenix/modules/hm/hyprland/nvidia.nix create mode 100644 hydenix/modules/hm/hyprland/options.nix create mode 100644 hydenix/modules/hm/hyprland/shaders.nix create mode 100644 hydenix/modules/hm/hyprland/windowrules.nix create mode 100644 hydenix/modules/hm/hyprland/workflows.nix diff --git a/TODO.md b/TODO.md index c1c9c68e..fc6e3603 100644 --- a/TODO.md +++ b/TODO.md @@ -5,8 +5,8 @@ - docs: improved configuration guide - docs: better hardware configuration guide, no default hardware options -- feat: more hyprland options - - explicit configuration +- feat: move hyprlock to hyprland module, swaylock should just be swaylock module + - assertion to not have both enabled - feat: new themes to build ## next api update @@ -20,6 +20,7 @@ ## backlog - finish demo-vm for video +- docs: documentation generation? - feat: config.toml options - chore: remove iso builder and ci, close issue related to it in favor of (hyde)nixos-anywhere - chore: remove old vm builder diff --git a/docs/options.md b/docs/options.md index aaba0629..53661979 100644 --- a/docs/options.md +++ b/docs/options.md @@ -123,7 +123,55 @@ Below will be the default options for hydenix. hyde.enable = true; # enable hyde module hyprland = { enable = true; # enable hyprland module - extraConfig = ""; # extra hyprland config text + extraConfig = ""; # extra config appended to userprefs.conf + overrideMain = null; # complete override of hyprland.conf + # Animation configurations + animations = { + enable = true; # enable animation configurations + preset = "standard"; # animation preset: "classic", "diablo-1", "diablo-2", "dynamic", "disable", "eevee-1", "eevee-2", "high", "low-1", "low-2", "minimal-1", "minimal-2", "moving", "optimized", "standard", "vertical", "LimeFrenzy" + extraConfig = ""; # additional animation configuration + overrides = { }; # override specific animation files by name + }; + # Shader configurations + shaders = { + enable = true; # enable shader configurations + overrides = { }; # override or add custom shaders + }; + # Workflow configurations + workflows = { + enable = true; # enable workflow configurations + active = "default"; # active workflow preset: "default", "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) + }; + # 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 diff --git a/hydenix/modules/hm/default.nix b/hydenix/modules/hm/default.nix index d70c0c75..331f22d3 100644 --- a/hydenix/modules/hm/default.nix +++ b/hydenix/modules/hm/default.nix @@ -15,7 +15,7 @@ ./gtk.nix ./git.nix ./hyde.nix - ./hyprland.nix + ./hyprland ./lockscreen.nix ./notifications.nix ./qt.nix diff --git a/hydenix/modules/hm/hyprland.nix b/hydenix/modules/hm/hyprland.nix deleted file mode 100644 index f5e21717..00000000 --- a/hydenix/modules/hm/hyprland.nix +++ /dev/null @@ -1,164 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - cfg = config.hydenix.hm.hyprland; -in -{ - - options.hydenix.hm.hyprland = { - enable = lib.mkOption { - type = lib.types.bool; - default = config.hydenix.hm.enable; - description = "Enable hyprland module"; - }; - - extraConfig = lib.mkOption { - type = lib.types.lines; - default = ""; - description = "Extra config for hyprland"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - hyprcursor - hyprutils - xdg-desktop-portal-hyprland - hyprpicker - hypridle - ]; - - home.activation.createHyprConfigs = lib.hm.dag.entryAfter [ "mutableGeneration" ] '' - mkdir -p "$HOME/.config/hypr/animations" - mkdir -p "$HOME/.config/hypr/themes" - - touch "$HOME/.config/hypr/animations/theme.conf" - touch "$HOME/.config/hypr/themes/colors.conf" - touch "$HOME/.config/hypr/themes/theme.conf" - touch "$HOME/.config/hypr/themes/wallbash.conf" - - chmod 644 "$HOME/.config/hypr/animations/theme.conf" - chmod 644 "$HOME/.config/hypr/themes/colors.conf" - chmod 644 "$HOME/.config/hypr/themes/theme.conf" - chmod 644 "$HOME/.config/hypr/themes/wallbash.conf" - ''; - - home.file = { - ".config/hypr/hyprland.conf" = { - source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/hyprland.conf"; - force = true; - }; - ".config/hypr/hyde.conf".source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/hyde.conf"; - ".config/hypr/keybindings.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/keybindings.conf"; - ".config/hypr/monitors.conf".source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/monitors.conf"; - ".config/hypr/nvidia.conf".source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/nvidia.conf"; - ".config/hypr/userprefs.conf" = { - text = '' - ${cfg.extraConfig} - ''; - force = true; - }; - ".config/hypr/windowrules.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/windowrules.conf"; - ".config/hypr/animations.conf" = { - source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations.conf"; - force = true; - mutable = true; - }; - ".config/hypr/animations/classic.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/classic.conf"; - ".config/hypr/animations/diablo-1.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/diablo-1.conf"; - ".config/hypr/animations/diablo-2.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/diablo-2.conf"; - ".config/hypr/animations/dynamic.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/dynamic.conf"; - ".config/hypr/animations/disable.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/disable.conf"; - ".config/hypr/animations/eevee-1.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/eevee-1.conf"; - ".config/hypr/animations/eevee-2.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/eevee-2.conf"; - ".config/hypr/animations/high.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/high.conf"; - ".config/hypr/animations/low-1.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/low-1.conf"; - ".config/hypr/animations/low-2.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/low-2.conf"; - ".config/hypr/animations/minimal-1.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/minimal-1.conf"; - ".config/hypr/animations/minimal-2.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/minimal-2.conf"; - ".config/hypr/animations/moving.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/moving.conf"; - ".config/hypr/animations/optimized.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/optimized.conf"; - ".config/hypr/animations/standard.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/standard.conf"; - ".config/hypr/animations/vertical.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/vertical.conf"; - ".config/hypr/animations/LimeFrenzy.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/LimeFrenzy.conf"; - ".config/hypr/hypridle.conf".source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/hypridle.conf"; - - # Shaders - ".config/hypr/shaders/blue-light-filter.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/blue-light-filter.frag"; - ".config/hypr/shaders/color-vision.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/color-vision.frag"; - ".config/hypr/shaders/.compiled.cache.glsl" = { - source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/.compiled.cache.glsl"; - force = true; - mutable = true; - }; - ".config/hypr/shaders.conf" = { - source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders.conf"; - force = true; - mutable = true; - }; - ".config/hypr/shaders/custom.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/custom.frag"; - ".config/hypr/shaders/disable.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/disable.frag"; - ".config/hypr/shaders/grayscale.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/grayscale.frag"; - ".config/hypr/shaders/invert-colors.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/invert-colors.frag"; - ".config/hypr/shaders/oled.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/oled.frag"; - ".config/hypr/shaders/oled-saver.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/oled-saver.frag"; - ".config/hypr/shaders/paper.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/paper.frag"; - ".config/hypr/shaders/vibrance.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/vibrance.frag"; - ".config/hypr/shaders/wallbash.frag".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/wallbash.frag"; - ".config/hypr/shaders/wallbash.inc".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/wallbash.inc"; - - # Workflows - ".config/hypr/workflows.conf" = { - source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows.conf"; - force = true; - mutable = true; - }; - ".config/hypr/workflows/default.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/default.conf"; - ".config/hypr/workflows/editing.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/editing.conf"; - ".config/hypr/workflows/gaming.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/gaming.conf"; - ".config/hypr/workflows/powersaver.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/powersaver.conf"; - ".config/hypr/workflows/snappy.conf".source = - "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/snappy.conf"; - }; - }; -} diff --git a/hydenix/modules/hm/hyprland/animations.nix b/hydenix/modules/hm/hyprland/animations.nix new file mode 100644 index 00000000..deb90882 --- /dev/null +++ b/hydenix/modules/hm/hyprland/animations.nix @@ -0,0 +1,72 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; + + animationPresets = [ + "classic" + "diablo-1" + "diablo-2" + "dynamic" + "disable" + "eevee-1" + "eevee-2" + "high" + "low-1" + "low-2" + "minimal-1" + "minimal-2" + "moving" + "optimized" + "standard" + "vertical" + "LimeFrenzy" + ]; +in +{ + config = lib.mkIf (cfg.enable && cfg.animations.enable) { + home.file = lib.mkMerge [ + # Active animation preset + { + ".config/hypr/animations.conf" = + if cfg.animations.overrides ? ${cfg.animations.preset} then + { + text = '' + ${cfg.animations.overrides.${cfg.animations.preset}} + ${cfg.animations.extraConfig} + ''; + force = true; + mutable = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/${cfg.animations.preset}.conf"; + force = true; + mutable = true; + }; + } + + # All animation presets (with overrides) + (lib.listToAttrs ( + map (preset: { + name = ".config/hypr/animations/${preset}.conf"; + value = + if cfg.animations.overrides ? ${preset} then + { + text = cfg.animations.overrides.${preset}; + force = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/animations/${preset}.conf"; + }; + }) animationPresets + )) + ]; + }; +} diff --git a/hydenix/modules/hm/hyprland/default.nix b/hydenix/modules/hm/hyprland/default.nix new file mode 100644 index 00000000..a245861c --- /dev/null +++ b/hydenix/modules/hm/hyprland/default.nix @@ -0,0 +1,72 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + imports = [ + ./options.nix + ./animations.nix + ./shaders.nix + ./workflows.nix + ./hypridle.nix + ./keybindings.nix + ./windowrules.nix + ./nvidia.nix + ./monitors.nix + ]; + + config = lib.mkIf cfg.enable { + # Always include packages and base setup + home.packages = with pkgs; [ + hyprcursor + hyprutils + xdg-desktop-portal-hyprland + hyprpicker + hypridle + ]; + + home.activation.createHyprConfigs = lib.hm.dag.entryAfter [ "mutableGeneration" ] '' + mkdir -p "$HOME/.config/hypr/animations" + mkdir -p "$HOME/.config/hypr/themes" + mkdir -p "$HOME/.config/hypr/shaders" + mkdir -p "$HOME/.config/hypr/workflows" + + touch "$HOME/.config/hypr/animations/theme.conf" + touch "$HOME/.config/hypr/themes/colors.conf" + touch "$HOME/.config/hypr/themes/theme.conf" + touch "$HOME/.config/hypr/themes/wallbash.conf" + + chmod 644 "$HOME/.config/hypr/animations/theme.conf" + chmod 644 "$HOME/.config/hypr/themes/colors.conf" + chmod 644 "$HOME/.config/hypr/themes/theme.conf" + chmod 644 "$HOME/.config/hypr/themes/wallbash.conf" + ''; + + home.file = { + ".config/hypr/hyprland.conf" = + if cfg.overrideMain != null then + { + text = cfg.overrideMain; + force = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/hyprland.conf"; + force = true; + }; + + ".config/hypr/hyde.conf".source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/hyde.conf"; + + ".config/hypr/userprefs.conf" = { + text = cfg.extraConfig; + force = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/hypridle.nix b/hydenix/modules/hm/hyprland/hypridle.nix new file mode 100644 index 00000000..b80b4054 --- /dev/null +++ b/hydenix/modules/hm/hyprland/hypridle.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + config = lib.mkIf (cfg.enable && cfg.hypridle.enable) { + home.file = { + ".config/hypr/hypridle.conf" = + if cfg.hypridle.overrideConfig != null then + { + text = cfg.hypridle.overrideConfig; + force = true; + } + else + { + text = '' + ${lib.readFile "${pkgs.hydenix.hyde}/Configs/.config/hypr/hypridle.conf"} + ${cfg.hypridle.extraConfig} + ''; + force = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/keybindings.nix b/hydenix/modules/hm/hyprland/keybindings.nix new file mode 100644 index 00000000..dfe5f7de --- /dev/null +++ b/hydenix/modules/hm/hyprland/keybindings.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + config = lib.mkIf (cfg.enable && cfg.keybindings.enable) { + home.file = { + ".config/hypr/keybindings.conf" = + if cfg.keybindings.overrideConfig != null then + { + text = cfg.keybindings.overrideConfig; + force = true; + } + else + { + text = '' + ${lib.readFile "${pkgs.hydenix.hyde}/Configs/.config/hypr/keybindings.conf"} + ${cfg.keybindings.extraConfig} + ''; + force = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/monitors.nix b/hydenix/modules/hm/hyprland/monitors.nix new file mode 100644 index 00000000..7bd962f3 --- /dev/null +++ b/hydenix/modules/hm/hyprland/monitors.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + config = lib.mkIf (cfg.enable && cfg.monitors.enable) { + home.file = { + ".config/hypr/monitors.conf" = + if cfg.monitors.overrideConfig != null then + { + text = cfg.monitors.overrideConfig; + force = true; + mutable = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/monitors.conf"; + force = true; + mutable = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/nvidia.nix b/hydenix/modules/hm/hyprland/nvidia.nix new file mode 100644 index 00000000..11842ac6 --- /dev/null +++ b/hydenix/modules/hm/hyprland/nvidia.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + config = lib.mkIf (cfg.enable && cfg.nvidia.enable) { + home.file = { + ".config/hypr/nvidia.conf" = + if cfg.nvidia.overrideConfig != null then + { + text = cfg.nvidia.overrideConfig; + force = true; + } + else + { + text = '' + ${lib.readFile "${pkgs.hydenix.hyde}/Configs/.config/hypr/nvidia.conf"} + ${cfg.nvidia.extraConfig} + ''; + force = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/options.nix b/hydenix/modules/hm/hyprland/options.nix new file mode 100644 index 00000000..2644919c --- /dev/null +++ b/hydenix/modules/hm/hyprland/options.nix @@ -0,0 +1,198 @@ +{ + config, + lib, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + options.hydenix.hm.hyprland = { + enable = lib.mkOption { + type = lib.types.bool; + default = config.hydenix.hm.enable; + description = "Enable hyprland module"; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Extra config appended to userprefs.conf"; + }; + overrideMain = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete override of hyprland.conf"; + }; + + # Animation configurations + animations = { + enable = lib.mkEnableOption "animation configurations" // { + default = cfg.enable; + }; + preset = lib.mkOption { + type = lib.types.enum [ + "classic" + "diablo-1" + "diablo-2" + "dynamic" + "disable" + "eevee-1" + "eevee-2" + "high" + "low-1" + "low-2" + "minimal-1" + "minimal-2" + "moving" + "optimized" + "standard" + "vertical" + "LimeFrenzy" + ]; + default = "standard"; + description = "Animation preset to use"; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Additional animation configuration"; + }; + overrides = lib.mkOption { + type = lib.types.attrsOf lib.types.lines; + default = { }; + description = "Override specific animation files by name"; + example = lib.literalExpression '' + { + "classic" = ''' + animation = windows, 1, 5, default + '''; + } + ''; + }; + }; + + # Shader configurations + shaders = { + enable = lib.mkEnableOption "shader configurations" // { + default = cfg.enable; + }; + overrides = lib.mkOption { + type = lib.types.attrsOf lib.types.lines; + default = { }; + description = "Override or add custom shaders"; + example = lib.literalExpression '' + { + "my-filter.frag" = ''' + precision mediump float; + // Custom shader code + '''; + } + ''; + }; + }; + + # Workflow configurations + workflows = { + enable = lib.mkEnableOption "workflow configurations" // { + default = cfg.enable; + }; + active = lib.mkOption { + type = lib.types.enum [ + "default" + "editing" + "gaming" + "powersaver" + "snappy" + ]; + default = "default"; + description = "Active workflow preset"; + }; + overrides = lib.mkOption { + type = lib.types.attrsOf lib.types.lines; + default = { }; + description = "Override or add custom workflows"; + }; + }; + + # Hypridle configurations + hypridle = { + enable = lib.mkEnableOption "hypridle configurations" // { + default = cfg.enable; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Additional hypridle configuration"; + }; + overrideConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete hypridle configuration override"; + }; + }; + + # Keybindings configurations + keybindings = { + enable = lib.mkEnableOption "keybindings configurations" // { + default = cfg.enable; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Additional keybindings configuration"; + }; + overrideConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete keybindings configuration override"; + }; + }; + + # Window rules configurations + windowrules = { + enable = lib.mkEnableOption "window rules configurations" // { + default = cfg.enable; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Additional window rules configuration"; + }; + overrideConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete window rules configuration override"; + }; + }; + + # NVIDIA configurations + nvidia = { + enable = lib.mkEnableOption "NVIDIA configurations" // { + default = config.hardware.nvidia.enabled or false; + }; + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Additional NVIDIA configuration"; + }; + overrideConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete NVIDIA configuration override"; + }; + }; + + # Monitor configurations + monitors = { + enable = lib.mkEnableOption "monitor configurations" // { + default = cfg.enable; + }; + overrideConfig = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = "Complete monitor configuration override"; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/shaders.nix b/hydenix/modules/hm/hyprland/shaders.nix new file mode 100644 index 00000000..223eefc1 --- /dev/null +++ b/hydenix/modules/hm/hyprland/shaders.nix @@ -0,0 +1,67 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; + + standardShaders = [ + "blue-light-filter" + "color-vision" + "custom" + "disable" + "grayscale" + "invert-colors" + "oled" + "oled-saver" + "paper" + "vibrance" + "wallbash" + ]; +in +{ + config = lib.mkIf (cfg.enable && cfg.shaders.enable) { + home.file = lib.mkMerge [ + # Standard shaders (generated from list) + (lib.mkMerge [ + # Generate standard shader files from list + (lib.listToAttrs ( + map (shader: { + name = ".config/hypr/shaders/${shader}.frag"; + value = { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/${shader}.frag"; + }; + }) standardShaders + )) + + # Additional shader files + { + ".config/hypr/shaders/.compiled.cache.glsl" = { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/.compiled.cache.glsl"; + force = true; + mutable = true; + }; + ".config/hypr/shaders.conf" = { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders.conf"; + force = true; + mutable = true; + }; + ".config/hypr/shaders/wallbash.inc".source = + "${pkgs.hydenix.hyde}/Configs/.config/hypr/shaders/wallbash.inc"; + } + ]) + + # Custom/override shaders + (lib.mapAttrs' (name: content: { + name = ".config/hypr/shaders/${name}"; + value = { + text = content; + force = true; + }; + }) cfg.shaders.overrides) + ]; + }; +} diff --git a/hydenix/modules/hm/hyprland/windowrules.nix b/hydenix/modules/hm/hyprland/windowrules.nix new file mode 100644 index 00000000..889ba059 --- /dev/null +++ b/hydenix/modules/hm/hyprland/windowrules.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; +in +{ + config = lib.mkIf (cfg.enable && cfg.windowrules.enable) { + home.file = { + ".config/hypr/windowrules.conf" = + if cfg.windowrules.overrideConfig != null then + { + text = cfg.windowrules.overrideConfig; + force = true; + } + else + { + text = '' + ${lib.readFile "${pkgs.hydenix.hyde}/Configs/.config/hypr/windowrules.conf"} + ${cfg.windowrules.extraConfig} + ''; + force = true; + }; + }; + }; +} diff --git a/hydenix/modules/hm/hyprland/workflows.nix b/hydenix/modules/hm/hyprland/workflows.nix new file mode 100644 index 00000000..241bb93c --- /dev/null +++ b/hydenix/modules/hm/hyprland/workflows.nix @@ -0,0 +1,66 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; + + workflowPresets = [ + "default" + "editing" + "gaming" + "powersaver" + "snappy" + ]; +in +{ + config = lib.mkIf (cfg.enable && cfg.workflows.enable) { + home.file = lib.mkMerge [ + # Active workflow + { + ".config/hypr/workflows.conf" = + if cfg.workflows.overrides ? ${cfg.workflows.active} then + { + text = cfg.workflows.overrides.${cfg.workflows.active}; + force = true; + mutable = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/${cfg.workflows.active}.conf"; + force = true; + mutable = true; + }; + } + + # All workflow presets (with overrides) + (lib.listToAttrs ( + map (workflow: { + name = ".config/hypr/workflows/${workflow}.conf"; + value = + if cfg.workflows.overrides ? ${workflow} then + { + text = cfg.workflows.overrides.${workflow}; + force = true; + } + else + { + source = "${pkgs.hydenix.hyde}/Configs/.config/hypr/workflows/${workflow}.conf"; + }; + }) workflowPresets + )) + + # Custom workflows (exclude the standard presets) + (lib.mapAttrs' (name: content: { + name = ".config/hypr/workflows/${name}.conf"; + value = { + text = content; + force = true; + }; + }) (lib.filterAttrs (name: _: !(lib.elem name workflowPresets)) cfg.workflows.overrides)) + ]; + }; +} From 47ad99c3c40d31fd4e2c9ada3ce607f7e27c90d8 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:52:46 -0700 Subject: [PATCH 03/12] feat: assertions for hm.hyprland and suppressWarnings option --- TODO.md | 4 +- docs/options.md | 4 ++ hydenix/modules/hm/hyprland/assertions.nix | 53 ++++++++++++++++++++++ hydenix/modules/hm/hyprland/default.nix | 1 + hydenix/modules/hm/hyprland/options.nix | 12 +++++ 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 hydenix/modules/hm/hyprland/assertions.nix diff --git a/TODO.md b/TODO.md index fc6e3603..72ad49ea 100644 --- a/TODO.md +++ b/TODO.md @@ -4,6 +4,7 @@ ## now / notes - docs: improved configuration guide +- docs: better documented first edits - docs: better hardware configuration guide, no default hardware options - feat: move hyprlock to hyprland module, swaylock should just be swaylock module - assertion to not have both enabled @@ -16,6 +17,8 @@ - fix: nix-index should be a module in hydenix only, its declared twice - fix: rename nix-index home-manager module whatever new name - feat: hydenix follows nixpkgs, no userPkgs overlays +- feat: vscode-nix-ide part of editors, enabled by default +- feat: themes as part of hydenix flake inputs ## backlog @@ -24,7 +27,6 @@ - feat: config.toml options - chore: remove iso builder and ci, close issue related to it in favor of (hyde)nixos-anywhere - chore: remove old vm builder -- docs: better documented first edits - refactor: revise module hierarchy to be more clear and concise - feat: assertions for common requirements - feat: spicetify theme support? flatpak? diff --git a/docs/options.md b/docs/options.md index 53661979..3d1afa0e 100644 --- a/docs/options.md +++ b/docs/options.md @@ -3,6 +3,7 @@ - [Hydenix Options](#hydenix-options) - [Module Documentation](#module-documentation) - [Required Options](#required-options) + - [Default Options](#default-options) ## Module Documentation @@ -65,6 +66,8 @@ You *must* set these options or else hydenix will not load. } ``` +## Default Options + Below will be the default options for hydenix. ```nix @@ -125,6 +128,7 @@ Below will be the default options for hydenix. 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 diff --git a/hydenix/modules/hm/hyprland/assertions.nix b/hydenix/modules/hm/hyprland/assertions.nix new file mode 100644 index 00000000..6c193a07 --- /dev/null +++ b/hydenix/modules/hm/hyprland/assertions.nix @@ -0,0 +1,53 @@ +{ + config, + lib, + ... +}: + +let + cfg = config.hydenix.hm.hyprland; + + # Collect all active overrides + activeOverrides = lib.filter (x: x != null && x != "") [ + (lib.optionalString (cfg.hypridle.overrideConfig != null) "hypridle.overrideConfig") + (lib.optionalString (cfg.keybindings.overrideConfig != null) "keybindings.overrideConfig") + (lib.optionalString (cfg.windowrules.overrideConfig != null) "windowrules.overrideConfig") + (lib.optionalString (cfg.nvidia.overrideConfig != null) "nvidia.overrideConfig") + (lib.optionalString (cfg.monitors.overrideConfig != null) "monitors.overrideConfig") + (lib.optionalString (cfg.overrideMain != null) "overrideMain") + ]; +in +{ + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = cfg.hypridle.overrideConfig == null || cfg.hypridle.overrideConfig != ""; + message = "hydenix.hm.hyprland.hypridle.overrideConfig is set but empty. This will override Hyde defaults and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + { + assertion = cfg.keybindings.overrideConfig == null || cfg.keybindings.overrideConfig != ""; + message = "hydenix.hm.hyprland.keybindings.overrideConfig is set but empty. This will override Hyde defaults and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + { + assertion = cfg.windowrules.overrideConfig == null || cfg.windowrules.overrideConfig != ""; + message = "hydenix.hm.hyprland.windowrules.overrideConfig is set but empty. This will override Hyde defaults and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + { + assertion = cfg.nvidia.overrideConfig == null || cfg.nvidia.overrideConfig != ""; + message = "hydenix.hm.hyprland.nvidia.overrideConfig is set but empty. This will override Hyde defaults and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + { + assertion = cfg.monitors.overrideConfig == null || cfg.monitors.overrideConfig != ""; + message = "hydenix.hm.hyprland.monitors.overrideConfig is set but empty. This will override Hyde defaults and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + { + assertion = cfg.overrideMain == null || cfg.overrideMain != ""; + message = "hydenix.hm.hyprland.overrideMain is set but empty. This will completely override Hyde's hyprland.conf and may break the system. Set to null to use Hyde defaults or provide valid configuration."; + } + ]; + + warnings = lib.optionals (cfg.enable && activeOverrides != [ ] && !cfg.suppressWarnings) [ + "hydenix.hm.hyprland: The following configs are overriding Hyde defaults. Note this may break hydenix, hope you know what you're doing! (set suppressWarnings = true to hide this warning): ${lib.concatStringsSep ", " activeOverrides}" + ]; + }; +} diff --git a/hydenix/modules/hm/hyprland/default.nix b/hydenix/modules/hm/hyprland/default.nix index a245861c..27f1d4c0 100644 --- a/hydenix/modules/hm/hyprland/default.nix +++ b/hydenix/modules/hm/hyprland/default.nix @@ -11,6 +11,7 @@ in { imports = [ ./options.nix + ./assertions.nix ./animations.nix ./shaders.nix ./workflows.nix diff --git a/hydenix/modules/hm/hyprland/options.nix b/hydenix/modules/hm/hyprland/options.nix index 2644919c..474b2288 100644 --- a/hydenix/modules/hm/hyprland/options.nix +++ b/hydenix/modules/hm/hyprland/options.nix @@ -24,6 +24,11 @@ in default = null; description = "Complete override of hyprland.conf"; }; + suppressWarnings = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Suppress warnings about configuration overrides"; + }; # Animation configurations animations = { @@ -112,6 +117,13 @@ in type = lib.types.attrsOf lib.types.lines; default = { }; description = "Override or add custom workflows"; + example = lib.literalExpression '' + { + "my-workflow.conf" = ''' + // Custom workflow configuration + '''; + } + ''; }; }; From 9dd36630132831944d7b2ab49b4f064f4732c08b Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 29 Jul 2025 21:56:48 -0700 Subject: [PATCH 04/12] refactor: cleaned up flake in preparation for next api update removed old vm builder removed iso, closes #53 in favor of a future nixos-anywhere implementation --- TODO.md | 10 +- flake.nix | 100 ++---- hydenix/sources/overlay.nix | 3 - lib/config/default.nix | 2 +- lib/dev-shell.nix | 3 +- lib/hyde-update/default.nix | 3 +- lib/iso/default.nix | 326 ----------------- lib/iso/nixos-install.sh | 332 ------------------ lib/vms/hydevm/README.md | 148 -------- lib/vms/hydevm/default.nix | 291 --------------- lib/vms/iso-vm.nix | 47 --- vm/arch-vm.nix | 113 ------ vm/fedora-vm.nix | 148 -------- vm/scripts/install-nix.sh | 10 - vm/scripts/install/arch-setup.sh | 131 ------- vm/scripts/install/darwin-setup.sh | 99 ------ vm/scripts/install/debian-setup.sh | 2 - vm/scripts/install/fedora-setup.sh | 128 ------- vm/scripts/install/nixos-setup.sh | 2 - vm/scripts/install/ubuntu-setup.sh | 15 - vm/scripts/preseed/arch-preseed.sh | 76 ---- .../preseed/fedora-kickstart.ks.template | 67 ---- vm/scripts/vm-host/arch-setup.sh | 53 --- vm/scripts/vm-host/darwin-setup.sh | 42 --- vm/scripts/vm-host/debian-setup.sh | 41 --- vm/scripts/vm-host/fedora-setup.sh | 38 -- vm/scripts/vm-host/nixos-setup.sh | 26 -- vm/scripts/vm-host/ubuntu-setup.sh | 41 --- vm/vm-utils.nix | 77 ---- 29 files changed, 40 insertions(+), 2334 deletions(-) delete mode 100644 lib/iso/default.nix delete mode 100644 lib/iso/nixos-install.sh delete mode 100644 lib/vms/hydevm/README.md delete mode 100644 lib/vms/hydevm/default.nix delete mode 100644 lib/vms/iso-vm.nix delete mode 100644 vm/arch-vm.nix delete mode 100644 vm/fedora-vm.nix delete mode 100644 vm/scripts/install-nix.sh delete mode 100644 vm/scripts/install/arch-setup.sh delete mode 100644 vm/scripts/install/darwin-setup.sh delete mode 100644 vm/scripts/install/debian-setup.sh delete mode 100644 vm/scripts/install/fedora-setup.sh delete mode 100644 vm/scripts/install/nixos-setup.sh delete mode 100644 vm/scripts/install/ubuntu-setup.sh delete mode 100644 vm/scripts/preseed/arch-preseed.sh delete mode 100644 vm/scripts/preseed/fedora-kickstart.ks.template delete mode 100755 vm/scripts/vm-host/arch-setup.sh delete mode 100755 vm/scripts/vm-host/darwin-setup.sh delete mode 100755 vm/scripts/vm-host/debian-setup.sh delete mode 100755 vm/scripts/vm-host/fedora-setup.sh delete mode 100755 vm/scripts/vm-host/nixos-setup.sh delete mode 100755 vm/scripts/vm-host/ubuntu-setup.sh delete mode 100644 vm/vm-utils.nix diff --git a/TODO.md b/TODO.md index 72ad49ea..d08ec8fd 100644 --- a/TODO.md +++ b/TODO.md @@ -3,6 +3,11 @@ ## now / notes +- refactor: cleaned up flake in preparation for next api update + +removed old vm builder +removed iso, closes #53 in favor of a future nixos-anywhere implementation + - docs: improved configuration guide - docs: better documented first edits - docs: better hardware configuration guide, no default hardware options @@ -12,8 +17,7 @@ ## next api update -- refactor: hydenix nixOsModules to nixosModules -- refactor: outputs more flexible +- refactor: removed hydenix.lib to standardize outputs, hydenix nixOsModules to nixosModules - fix: nix-index should be a module in hydenix only, its declared twice - fix: rename nix-index home-manager module whatever new name - feat: hydenix follows nixpkgs, no userPkgs overlays @@ -25,8 +29,6 @@ - finish demo-vm for video - docs: documentation generation? - feat: config.toml options -- chore: remove iso builder and ci, close issue related to it in favor of (hyde)nixos-anywhere -- chore: remove old vm builder - refactor: revise module hierarchy to be more clear and concise - feat: assertions for common requirements - feat: spicetify theme support? flatpak? diff --git a/flake.nix b/flake.nix index 9c80522c..f2a1280b 100644 --- a/flake.nix +++ b/flake.nix @@ -24,23 +24,21 @@ }; outputs = - { ... }@hydenix-pre-inputs: + inputs@{ hydenix-nixpkgs, ... }: let - # TODO: multi system support? system = "x86_64-linux"; - hydenix-inputs = hydenix-pre-inputs // { - pkgs = import hydenix-pre-inputs.hydenix-nixpkgs { - inherit system; - }; - lib = { - overlays = import ./hydenix/sources/overlay.nix { inputs = hydenix-pre-inputs; }; - nixOsModules = import ./hydenix/modules/system; - homeModules = import ./hydenix/modules/hm; - iso = import ./lib/iso/default.nix; - mkTheme = import ./hydenix/sources/themes/utils/mkTheme.nix; - inherit system; - }; + # Create lib attribute that template expects + lib = { + inherit system; + overlays = import ./hydenix/sources/overlay.nix { inherit inputs; }; + nixOsModules = ./hydenix/modules/system; + homeModules = ./hydenix/modules/hm; + }; + + # Internal inputs for building packages and configurations + hydenix-inputs = inputs // { + inherit lib; }; defaultConfig = import ./lib/config { @@ -53,78 +51,38 @@ inherit hydenix-inputs; }; - isoConfig = hydenix-inputs.lib.iso { - inherit hydenix-inputs; - }; - - isoVmConfig = import ./lib/vms/iso-vm.nix { - inherit hydenix-inputs; - }; - demoVmConfig = import ./lib/vms/demo-vm.nix { inherit hydenix-inputs; }; - hydevm = import ./lib/vms/hydevm/default.nix { - pkgs = hydenix-inputs.pkgs; - lib = hydenix-inputs.pkgs.lib; - }; - in { - lib = hydenix-inputs.lib; - - templates = { - default = { - path = ./template; - description = "Hydenix template"; - welcomeText = '' - ``` _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ - ``` - 1. edit `configuration.nix` with your preferences for hydenix - - visit https://github.com/richen604/hydenix for module documentation - 2. run `sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix` - 3. `git init && git add .` (flakes have to be managed via git) - 4. run any of the packages in your new `flake.nix` - - for rebuild, use `sudo nixos-rebuild switch --flake .` - 5. DON'T FORGET: change your password for all users with `passwd` from initialPassword set in `configuration.nix` - 6. NOTE: After rebuild, the first boot may take a while depending on how many `hydenix.hm.themes` are enabled, as the system generates cache. - ''; - }; + # Main API that template uses + # Will be depreciated in the next api update + inherit lib; + + # Direct module access + homeModules.default = ./hydenix/modules/hm; + nixosModules.default = ./hydenix/modules/system; + + overlays.default = import ./hydenix/sources/overlay.nix { inherit inputs; }; + + templates.default = { + path = ./template; + description = "Template for hydenix configuration"; }; + nixosConfigurations.default = defaultConfig; + packages.${system} = { # Use the VM configuration as default default = vmConfig.config.system.build.vm; - # Original NixOS configuration - nixos = defaultConfig.config.system.build.toplevel; - - # Explicitly named VM configuration - nixos-vm = vmConfig.config.system.build.vm; + # WIP: For a future demo installation & usage video demo-vm = demoVmConfig.config.system.build.vm; - # Demo VM configuration - iso-vm = isoVmConfig; - - # ISO configuration - iso = isoConfig.build-iso; - - # Add the burn-iso script as a package - burn-iso = isoConfig.burn-iso; - - # Add hyde-update package + # Helper to manage hyde updates hyde-update = import ./lib/hyde-update { inherit hydenix-inputs; }; - - # Add hydevm packages - hydevm = hydevm.defaultPackage; }; devShells.${system}.default = import ./lib/dev-shell.nix { inherit hydenix-inputs; }; diff --git a/hydenix/sources/overlay.nix b/hydenix/sources/overlay.nix index 4a9bf729..2ee43409 100644 --- a/hydenix/sources/overlay.nix +++ b/hydenix/sources/overlay.nix @@ -6,12 +6,9 @@ let # Define all packages packages = { # Hyde core packages - hyde-cli = callPackage ./hyde-cli.nix { }; hyde-gallery = callPackage ./hyde-gallery.nix { }; - hyprdots = callPackage ./hyprdots.nix { }; # Additional packages pokego = callPackage ./pokego.nix { }; - pokemon-colorscripts = callPackage ./pokemon-colorscripts.nix { }; python-pyamdgpuinfo = callPackage ./python-pyamdgpuinfo.nix { }; Tela-circle-dracula = callPackage ./Tela-circle-dracula.nix { }; Bibata-Modern-Ice = callPackage ./Bibata-Modern-Ice.nix { }; diff --git a/lib/config/default.nix b/lib/config/default.nix index 4f33352f..a3a9423c 100644 --- a/lib/config/default.nix +++ b/lib/config/default.nix @@ -4,7 +4,7 @@ }: hydenix-inputs.hydenix-nixpkgs.lib.nixosSystem { - inherit (hydenix-inputs.lib) system; + system = "x86_64-linux"; specialArgs = { inherit hydenix-inputs; }; diff --git a/lib/dev-shell.nix b/lib/dev-shell.nix index f6716650..9ca2f927 100644 --- a/lib/dev-shell.nix +++ b/lib/dev-shell.nix @@ -1,8 +1,9 @@ { hydenix-inputs }: let + system = "x86_64-linux"; pkgs = import hydenix-inputs.hydenix-nixpkgs { - inherit (hydenix-inputs.lib) system; + inherit system; config.allowUnfree = true; }; in diff --git a/lib/hyde-update/default.nix b/lib/hyde-update/default.nix index c135eae9..0dabb5ee 100644 --- a/lib/hyde-update/default.nix +++ b/lib/hyde-update/default.nix @@ -3,8 +3,9 @@ }: let + system = "x86_64-linux"; pkgs = import hydenix-inputs.hydenix-nixpkgs { - inherit (hydenix-inputs.lib) system; + inherit system; config.allowUnfree = true; }; diff --git a/lib/iso/default.nix b/lib/iso/default.nix deleted file mode 100644 index 795606d1..00000000 --- a/lib/iso/default.nix +++ /dev/null @@ -1,326 +0,0 @@ -{ - hydenix-inputs, - flakePath ? null, - ... -}: -let - - hydenix-pkgs = import hydenix-inputs.hydenix-nixpkgs { - inherit (hydenix-inputs.lib) system; - config.allowUnfree = true; - overlays = [ - hydenix-inputs.lib.overlays - ]; - }; - - # Add the ISO image module - isoImageModule = "${hydenix-inputs.hydenix-nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; - - # Create the base ISO configuration - isoSystem = hydenix-inputs.hydenix-nixpkgs.lib.nixosSystem { - inherit (hydenix-inputs.lib) system; - modules = [ - isoImageModule - { - # Explicitly allow unfree packages in the ISO - nixpkgs.config.allowUnfree = true; - - # Enable nix experimental features - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - # Live USB settings - isoImage.makeEfiBootable = true; - isoImage.makeUsbBootable = true; - isoImage.squashfsCompression = "zstd -Xcompression-level 6"; # Better compression ratio and speed - - # ISO-specific configuration - isoImage = { - edition = hydenix-pkgs.lib.mkForce "hydenix"; - isoBaseName = hydenix-pkgs.lib.mkForce "hydenix"; - isoName = hydenix-pkgs.lib.mkForce "hydenix.iso"; - volumeID = hydenix-pkgs.lib.mkForce "HYDENIX"; - }; - - # Improve boot experience - boot.kernelParams = [ - # Better hardware compatibility - "nomodeset" - "i915.modeset=1" - "nouveau.modeset=1" - # Improve boot messages - "boot.shell_on_fail" - # Memory management improvements - "zswap.enabled=1" - ]; - - # Better hardware support - hardware.enableRedistributableFirmware = true; - hardware.enableAllFirmware = true; - - # Add installation script and required packages to ISO - environment.systemPackages = with hydenix-pkgs; [ - (writeScriptBin "hydenix-install" (builtins.readFile ./nixos-install.sh)) - # Required by installation script - fzf - parted - dosfstools # for mkfs.fat - e2fsprogs # for mkfs.ext4 - util-linux # for wipefs, lsblk - util-linux.bin - git - vim - nano # More beginner-friendly editor - curl - wget - htop # System monitoring - - # Networking tools - networkmanager # Includes nmcli - iw - wirelesstools - - # Hardware detection and management - pciutils # for lspci - usbutils # for lsusb - dmidecode # for system information - - # Filesystem tools - gptfdisk # for gdisk/sgdisk (advanced partitioning) - ntfs3g # for NTFS support (dual-boot scenarios) - btrfs-progs # for btrfs support - xfsprogs # for XFS support - - # Compression tools - gzip - bzip2 - xz - zip - unzip - - # Troubleshooting tools - lshw # List hardware - smartmontools # Disk health - - # Documentation - man-pages - man-pages-posix - ]; - - # Enable NetworkManager - networking.networkmanager.enable = true; - networking.wireless.enable = false; # Disable wpa_supplicant as we're using NetworkManager - - # Better hardware support - services.xserver.videoDrivers = [ - "modesetting" - "fbdev" - "vesa" - ]; - services.fwupd.enable = true; # Firmware updates - - # Improve console experience - console = { - font = "Lat2-Terminus16"; - keyMap = hydenix-pkgs.lib.mkForce "us"; - useXkbConfig = true; - }; - - # Copy installation script to home directory - system.activationScripts.copyTemplate = - let - # This allows us to use this script for both the default ISO and user template flake - configPath = if flakePath == null then ../../template else flakePath; - in - '' - mkdir -p /home/nixos - cp -r ${configPath} /home/nixos/hydenix - chmod -R u+w /home/nixos/hydenix - chown -R nixos:nixos /home/nixos/hydenix - - # Create a helpful README in the home directory - cat > /home/nixos/README.txt << 'EOF' - HydeNix Installation Guide - ========================= - - Quick Start: - 1. Run 'hydenix-install' for guided installation - - For WiFi: - - Run 'nmtui' for a text-based network manager - - Or use 'nmcli device wifi connect password ' - - For troubleshooting: - - Check hardware: lspci, lsusb, lshw - - Check disks: fdisk -l, smartctl -a /dev/sdX - - Check logs: journalctl -xe - - Need more help? Visit: https://github.com/richen604/hydenix - EOF - - chmod 644 /home/nixos/README.txt - chown nixos:nixos /home/nixos/README.txt - ''; - - # Display welcome message and instructions at boot - services.getty.helpLine = '' - Welcome to HydeNix! 💻 - - WiFi Setup: - - Use 'nmtui' for text-based network configuration - - Or use 'nmcli device wifi connect password ' - - To start the installation: - 1. Run 'hydenix-install' to start the guided installation - 2. Follow the on-screen prompts - - For help, read /home/nixos/README.txt or visit: https://github.com/richen604/hydeni - ''; - - # Better internationalization support - i18n = { - supportedLocales = [ "all" ]; - defaultLocale = "en_US.UTF-8"; - }; - - # Auto-login for live system - services.getty.autologinUser = "nixos"; - - # Set timezone to UTC by default - time.timeZone = "UTC"; - } - ]; - }; -in -{ - - # Add a build-iso script that can be run with 'nix run' - build-iso = hydenix-pkgs.writeScriptBin "build-iso" '' - #!/usr/bin/env bash - set -euo pipefail - - # Colors for output - GREEN='\033[0;32m' - BLUE='\033[0;34m' - NC='\033[0m' # No Color - - # Get the actual ISO path - ISO_DIR="${isoSystem.config.system.build.isoImage}" - - echo -e "''${BLUE}Building HydeNix ISO...''${NC}" - echo -e "''${BLUE}This may take a while depending on your system.''${NC}" - - # Create the output directory if it doesn't exist - mkdir -p ./result - - # Find the ISO file - if [ -d "$ISO_DIR/iso" ]; then - ISO_PATH=$(find "$ISO_DIR/iso" -name "*.iso" -type f) - else - ISO_PATH=$(find "$ISO_DIR" -name "*.iso" -type f) - fi - - if [ -z "$ISO_PATH" ]; then - echo -e "''${RED}Error: Could not find ISO file in $ISO_DIR''${NC}" - echo "Directory contents:" - find "$ISO_DIR" -type f | sort - exit 1 - fi - - # Copy the ISO to the current directory - echo -e "''${BLUE}Copying ISO to ./result directory...''${NC}" - cp -v "$ISO_PATH" ./result/ - - ISO_FILENAME=$(basename "$ISO_PATH") - - echo -e "''${GREEN}ISO built successfully!''${NC}" - echo -e "''${BLUE}Your ISO is available at:''${NC} ./result/$ISO_FILENAME" - echo - echo -e "''${BLUE}To burn this ISO to a USB drive, you can use:''${NC}" - echo "nix run .#burn-iso -- ./result/$ISO_FILENAME /dev/sdX" - echo -e "''${BLUE}(Replace /dev/sdX with your USB device)''${NC}" - ''; - - burn-iso = hydenix-pkgs.writeScriptBin "burn-iso" '' - #!/usr/bin/env bash - set -euo pipefail - - # Colors for output - RED='\033[0;31m' - GREEN='\033[0;32m' - BLUE='\033[0;34m' - NC='\033[0m' # No Color - - if [ $# -ne 2 ]; then - echo -e "''${BLUE}Usage:''${NC} burn-iso " - echo -e "''${BLUE}Example:''${NC} burn-iso hydenix.iso /dev/sdb" - echo -e "\n''${BLUE}Available devices:''${NC}" - lsblk -d -o NAME,SIZE,TYPE,MODEL,MOUNTPOINT - exit 1 - fi - - ISO_FILE=$1 - DEVICE=$2 - - if [ ! -f "$ISO_FILE" ]; then - echo -e "''${RED}Error: ISO file '$ISO_FILE' not found''${NC}" - exit 1 - fi - - # Check if device exists - if [ ! -b "$DEVICE" ]; then - echo -e "''${RED}Error: Device '$DEVICE' does not exist or is not a block device''${NC}" - echo -e "''${BLUE}Available devices:''${NC}" - lsblk -d -o NAME,SIZE,TYPE,MODEL,MOUNTPOINT - exit 1 - fi - - # Check if device is mounted - if grep -q "$DEVICE" /proc/mounts; then - echo -e "''${RED}Warning: Device '$DEVICE' is currently mounted''${NC}" - echo "Mounted partitions:" - grep "$DEVICE" /proc/mounts - echo -e "''${BLUE}Please unmount all partitions before continuing''${NC}" - read -p "Attempt to unmount all partitions? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - for mount in $(grep "$DEVICE" /proc/mounts | awk '{print $2}'); do - echo "Unmounting $mount..." - sudo umount "$mount" - done - else - exit 1 - fi - fi - - echo -e "''${RED}WARNING: This will ERASE ALL DATA on $DEVICE''${NC}" - echo -e "''${BLUE}Device details:''${NC}" - lsblk "$DEVICE" -o NAME,SIZE,TYPE,MODEL,MOUNTPOINT - echo - echo -e "''${RED}Double-check that this is the correct device!''${NC}" - read -p "Are you absolutely sure you want to continue? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - echo -e "''${BLUE}Formatting device...''${NC}" - sudo wipefs -a "$DEVICE" - - echo -e "''${BLUE}Writing ISO to device...''${NC}" - # Calculate ISO size for progress reporting - ISO_SIZE=$(stat -c %s "$ISO_FILE") - sudo dd bs=4M if="$ISO_FILE" of="$DEVICE" conv=fsync status=progress - - echo -e "''${BLUE}Syncing...''${NC}" - sync - - echo -e "''${GREEN}Done! You can now safely remove the device.''${NC}" - echo -e "''${BLUE}To boot from this device:''${NC}" - echo "1. Restart your computer" - echo "2. Enter your BIOS/UEFI settings (usually by pressing F2, F12, DEL, or ESC during startup)" - echo "3. Select this device as the boot device" - echo "4. Save and exit" - fi - ''; - isoSystem = isoSystem; -} diff --git a/lib/iso/nixos-install.sh b/lib/iso/nixos-install.sh deleted file mode 100644 index e53e9d4b..00000000 --- a/lib/iso/nixos-install.sh +++ /dev/null @@ -1,332 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -cat <<"EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -# Check if running as root -if [ "$EUID" -ne 0 ]; then - echo -e "${RED}Please run as root${NC}" - exit 1 -fi - -# Check for required commands -check_requirements() { - local required_commands=("wipefs" "parted" "mkfs.fat" "mkfs.ext4" "lsblk" "fzf") - local missing_commands=() - - for cmd in "${required_commands[@]}"; do - if ! command -v "$cmd" >/dev/null 2>&1; then - missing_commands+=("$cmd") - fi - done - - if [ ${#missing_commands[@]} -ne 0 ]; then - echo -e "${RED}Error: Required commands not found: ${missing_commands[*]}${NC}" - exit 1 - fi -} - -# Calculate swap size based on RAM -get_swap_size() { - local mem_kb=$(grep MemTotal /proc/meminfo | awk '{print $2}') - local mem_gb=$((mem_kb / 1024 / 1024)) - - if [ $mem_gb -le 2 ]; then - echo $((mem_gb * 2)) - elif [ $mem_gb -le 8 ]; then - echo $mem_gb - else - echo 8 - fi -} - -# Select installation drive -select_drive() { - # Check if any block devices exist - if ! lsblk -d -p -n -l -o NAME,SIZE,MODEL > /dev/null 2>&1; then - echo -e "${RED}Error: Unable to list block devices. Are you running in a virtual environment?${NC}" - echo -e "${RED}Debug info:${NC}" - ls -l /dev/sd* /dev/nvme* /dev/vd* 2>&1 || true - echo - exit 1 - fi - - local drives=$(lsblk -d -p -n -l -o NAME,SIZE,MODEL | grep -v "loop") - if [ -z "$drives" ]; then - echo -e "${RED}Error: No valid drives found${NC}" - exit 1 - fi - - # Quote the selection to handle whitespace properly - local selection - selection=$(echo "$drives" | fzf --header "Select installation drive" --height=10) - if [ -z "$selection" ]; then - echo -e "${RED}No drive selected${NC}" - exit 1 - fi - # Extract just the device path and ensure it's trimmed - echo "$selection" | awk '{print $1}' | tr -d '[:space:]' -} - -# Detect boot mode -detect_boot_mode() { - if [ -d "/sys/firmware/efi" ]; then - echo "uefi" - else - echo -e "${RED}Warning: UEFI boot mode not detected. NixOS strongly recommends UEFI boot.${NC}" - read -p "Continue with legacy BIOS boot anyway? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - exit 1 - fi - echo "bios" - fi -} - -# Main installation function -main() { - # Check requirements first - check_requirements - - echo -e "${RED}╔════════════════════════════════════════════════════════════════╗${NC}" - echo -e "${RED}║ STOP! READ CAREFULLY OR YOU MAY PERMANENTLY LOSE DATA! ║${NC}" - echo -e "${RED}╚════════════════════════════════════════════════════════════════╝${NC}" - echo - - # Explain partitioning scheme and give option to exit - echo -e "${BLUE}This script will perform a simple automated NixOS installation with:${NC}" - echo " • A two-partition layout (boot + root)" - echo " • No separate partitions for /home, /var, etc." - echo " • A swap file instead of a swap partition" - echo - echo -e "For UEFI systems (recommended):" - echo " • GPT partition table" - echo " • 512MiB EFI System Partition (ESP) formatted as FAT32" - echo " • Remaining space as ext4 root partition" - echo - echo -e "For Legacy BIOS systems (fallback):" - echo " • MBR partition table" - echo " • 512MiB boot partition" - echo " • Remaining space as ext4 root partition" - echo - - # Calculate and show swap size - local swap_size - swap_size=$(get_swap_size) - echo -e "${BLUE}Based on your system memory:${NC}" - echo " • Swap file size: ${swap_size}GB" - echo - - echo -e "${RED}WARNING: THIS WILL COMPLETELY ERASE THE SELECTED DRIVE!${NC}" - echo -e "${BLUE}If you need a custom partition layout (separate /home, encryption, etc.),${NC}" - echo -e "${BLUE}please exit and follow the manual partitioning instructions at:${NC}" - echo -e "${GREEN}https://nixos.org/manual/nixos/stable/#ch-installation${NC}" - echo - - # SECTION 1: PARTITIONING - echo -e "${BLUE}=== SECTION 1: DRIVE SELECTION AND PARTITIONING ===${NC}" - read -p "Continue with drive selection and partitioning? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo -e "${GREEN}Exiting installation. No changes were made.${NC}" - exit 0 - fi - - # Select drive - local selected_drive - selected_drive="$(select_drive)" - if [ ! -b "$selected_drive" ]; then - echo -e "${RED}Error: Invalid drive selected: $selected_drive${NC}" - exit 1 - fi - echo -e "${GREEN}Selected drive: $selected_drive${NC}" - - # Confirm selection - read -p "This will ERASE ALL DATA on $selected_drive. Continue? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo -e "${GREEN}Exiting installation. No changes were made.${NC}" - exit 1 - fi - - # Detect boot mode - local boot_mode - boot_mode=$(detect_boot_mode) - echo -e "${BLUE}Detected boot mode: $boot_mode${NC}" - - # Calculate sizes - local swap_size - swap_size=$(get_swap_size) - echo -e "${BLUE}Calculated swap size: ${swap_size}GB${NC}" - - # Wipe existing signatures - wipefs -a "$selected_drive" - - # Partition drive - if [ "$boot_mode" = "uefi" ]; then - # GPT/UEFI partitioning (preferred) - parted "$selected_drive" -- mklabel gpt - parted "$selected_drive" -- mkpart ESP fat32 1MiB 512MiB - parted "$selected_drive" -- set 1 esp on - parted "$selected_drive" -- mkpart primary 512MiB 100% - else - # MBR/BIOS partitioning (fallback) - echo -e "${RED}Warning: Using legacy BIOS boot mode. Some NixOS features may not work correctly.${NC}" - parted "$selected_drive" -- mklabel msdos - parted "$selected_drive" -- mkpart primary 1MiB 512MiB - parted "$selected_drive" -- set 1 boot on - parted "$selected_drive" -- mkpart primary 512MiB 100% - fi - - # Format partitions - local boot_partition - local root_partition - - # Handle different drive naming schemes (NVME vs SATA/IDE) - if [[ "$selected_drive" == *"nvme"* ]]; then - boot_partition="${selected_drive}p1" - root_partition="${selected_drive}p2" - else - boot_partition="${selected_drive}1" - root_partition="${selected_drive}2" - fi - - mkfs.fat -F 32 -n NIXBOOT "$boot_partition" - mkfs.ext4 -L NIXROOT "$root_partition" - - echo -e "${GREEN}Partitioning and formatting complete!${NC}" - - # SECTION 2: MOUNTING AND SWAP - echo -e "${BLUE}=== SECTION 2: MOUNTING PARTITIONS AND CREATING SWAP ===${NC}" - read -p "Continue with mounting partitions and creating swap? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo -e "${GREEN}Partitioning completed but installation aborted. Your drive has been partitioned but no files were copied.${NC}" - exit 0 - fi - - # Mount partitions - if [ -e "/dev/disk/by-label/NIXROOT" ] && [ -e "/dev/disk/by-label/NIXBOOT" ]; then - # Try mounting by labels first - mount /dev/disk/by-label/NIXROOT /mnt - mkdir -p /mnt/boot - mount /dev/disk/by-label/NIXBOOT /mnt/boot - else - # Fall back to direct device mounting - echo -e "${BLUE}Waiting for partition labels to be available...${NC}" - sleep 2 # Give udev a moment to create the labels - - # Try one more time with labels - if [ -e "/dev/disk/by-label/NIXROOT" ] && [ -e "/dev/disk/by-label/NIXBOOT" ]; then - mount /dev/disk/by-label/NIXROOT /mnt - mkdir -p /mnt/boot - mount /dev/disk/by-label/NIXBOOT /mnt/boot - else - # Fall back to direct device mounting - echo -e "${BLUE}Mounting partitions directly by device...${NC}" - mount "$root_partition" /mnt - mkdir -p /mnt/boot - mount "$boot_partition" /mnt/boot - fi - fi - - # Create and enable swap file - dd if=/dev/zero of=/mnt/.swapfile bs=1G count=$swap_size status=progress - chmod 600 /mnt/.swapfile - mkswap /mnt/.swapfile - swapon /mnt/.swapfile - - # Generate NixOS config - nixos-generate-config --root /mnt - - echo -e "${GREEN}Partitions mounted and swap file created!${NC}" - - # SECTION 3: HYDENIX TEMPLATING AND INSTALLATION - echo -e "${BLUE}=== SECTION 3: CONFIGURATION AND INSTALLATION ===${NC}" - read -p "Continue with configuration and installation? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo -e "${GREEN}Partitioning and mounting completed but installation aborted.${NC}" - echo -e "${BLUE}Your drive has been partitioned and mounted at /mnt.${NC}" - echo -e "${BLUE}You can continue with manual installation if desired.${NC}" - exit 0 - fi - - # Copy template to installation target - if [ -d "/home/nixos/hydenix" ]; then - echo -e "${GREEN}Hydenix configuration template found!${NC}" - echo -e "${BLUE}Copying Hydenix template to installation target...${NC}" - cp -r /home/nixos/hydenix /mnt/etc/ - chmod -R u+w /mnt/etc/hydenix - - # Generate hardware configuration - echo -e "${BLUE}Generating hardware configuration...${NC}" - nixos-generate-config --root /mnt --show-hardware-config > /mnt/etc/hydenix/hardware-configuration.nix - - echo -e "${GREEN}Basic system configuration complete!${NC}" - - # Ask if user wants to edit configuration before installing - echo -e "${BLUE}Would you like to edit configuration.nix before installing? (y/N)${NC}" - read -r edit_config - - if [[ $edit_config =~ ^[Yy]$ ]]; then - # Determine which editor to use - if command -v nano >/dev/null 2>&1; then - EDITOR="nano" - else - EDITOR="vim" - fi - - echo -e "${BLUE}Opening configuration.nix with $EDITOR...${NC}" - $EDITOR /mnt/etc/hydenix/configuration.nix - - echo -e "${GREEN}Configuration saved!${NC}" - fi - - # Final confirmation before installation - echo -e "${BLUE}Ready to install NixOS. This is the final step.${NC}" - read -p "Proceed with installation? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo -e "${GREEN}Configuration completed but installation aborted.${NC}" - echo -e "${BLUE}Your drive has been partitioned, mounted, and configured at /mnt.${NC}" - echo -e "${BLUE}You can continue with manual installation by running: nixos-install --root /mnt --flake \"/mnt/etc/hydenix#nixos\"${NC}" - exit 0 - fi - - # Install with default hostname and prompt for root password - echo -e "${BLUE}Installing Hydenix using flake...${NC}" - echo -e "${BLUE}You will be prompted to set the root password during installation.${NC}" - nixos-install --root /mnt --flake "/mnt/etc/hydenix#nixos" - - echo -e "${GREEN}Hydenix installation complete!${NC}" - echo -e "${BLUE}You can now reboot into your new system.${NC}" - echo "Run: reboot" - else - echo -e "${RED}Hydenix template not found. Falling back to manual configuration.${NC}" - echo -e "${GREEN}Basic system configuration complete!${NC}" - echo -e "${BLUE}Next steps:${NC}" - echo "1. Edit /mnt/etc/nixos/configuration.nix" - echo "2. Run nixos-install" - echo "3. Set root password" - echo "4. Reboot" - fi -} - -main "$@" \ No newline at end of file diff --git a/lib/vms/hydevm/README.md b/lib/vms/hydevm/README.md deleted file mode 100644 index 0150e76b..00000000 --- a/lib/vms/hydevm/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# HydeVM - Simplified VM Tool for HyDE Contributors - -HydeVM is a streamlined development tool that automatically sets up HyDE desktop environment in a virtual machine for testing different branches and commits. - -## Why? - -- **Zero Configuration**: Automatically downloads Arch Linux base image and sets up HyDE -- **Branch Testing**: Easily test any HyDE branch or commit hash -- **Smart Caching**: Creates cached snapshots for faster subsequent runs -- **Optional Persistence**: Choose whether changes should be saved or discarded -- **Contributor Focused**: Designed specifically for HyDE development workflow - -## Quick Start - -```bash -# Test master branch (non-persistent) -hydevm - -# Test a specific branch -hydevm feature-branch - -# Test with persistence (changes saved) -hydevm --persist dev-branch - -# Test specific commit -hydevm abc123def -``` - -## Usage - -### Basic Commands - -```bash -# Run master branch (default, non-persistent) -hydevm - -# Run specific branch or commit -hydevm [branch-name|commit-hash] - -# Run with persistence (changes will be saved) -hydevm --persist [branch-name|commit-hash] - -# List cached snapshots -hydevm --list - -# Clean all cached data -hydevm --clean - -# Show help -hydevm --help -``` - -### Examples - -```bash -# Test master branch, changes discarded on exit -hydevm - -# Test development branch with persistence -hydevm --persist dev - -# Test specific commit hash -hydevm a1b2c3d4 - -# Test feature branch, changes discarded -hydevm new-feature - -# List all cached snapshots -hydevm --list - -# Clean cache to start fresh -hydevm --clean -``` - -### Configuration - -Set these environment variables to customize VM resources: - -```bash -# Set VM memory (default: 4G) -VM_MEMORY=8G hydevm - -# Set VM CPU count (default: 2) -VM_CPUS=4 hydevm - -# Both together -VM_MEMORY=8G VM_CPUS=4 hydevm --persist dev -``` - -## First-Time Setup - -When you run a new branch/commit for the first time, hydevm will: - -1. Show a VM window with setup instructions -2. You'll need to: - - Login as `arch` / `arch` - - Run the provided curl command to download and execute the setup script - - Wait for HyDE installation to complete - - Run `sudo poweroff` to shutdown and create the snapshot - -**Example first run:** - -```bash -hydevm my-feature-branch -# VM opens with instructions -# Login as arch/arch, run the curl command shown -# Wait for installation, then sudo poweroff -# Snapshot is created automatically -``` - -**Subsequent runs are instant:** - -```bash -hydevm my-feature-branch # Uses cached snapshot - starts immediately! -``` - -## VM Details - -- **Login**: `arch` / `arch` -- **SSH Access**: `ssh arch@localhost -p 2222` -- **Persistence**: Optional flag determines if changes are saved -- **Snapshots**: Stored in `./.hyde-cache/hydevm/snapshots/` -- **Base Image**: Cached in `./.hyde-cache/hydevm/archbase.qcow2` - -## Development Workflow - -```bash -# Test your feature branch -hydevm my-feature - -# Make changes and test with persistence -hydevm --persist my-feature - -# Test different commits -hydevm abc123 # older commit -hydevm def456 # newer commit - -# Clean up when done -hydevm --clean -``` - -## Technical Notes - -- Uses KVM acceleration when available -- Copy-on-write snapshots minimize disk usage -- Automatic branch/commit detection and checkout -- SSH port forwarding for remote access -- Non-persistent mode uses temporary overlays diff --git a/lib/vms/hydevm/default.nix b/lib/vms/hydevm/default.nix deleted file mode 100644 index 56c56885..00000000 --- a/lib/vms/hydevm/default.nix +++ /dev/null @@ -1,291 +0,0 @@ -{ - pkgs ? import { }, - lib ? pkgs.lib, -}: - -let - archImageUrl = "https://geo.mirror.pkgbuild.com/images/v20250415.336224/Arch-Linux-x86_64-basic-20250415.336224.qcow2"; - - hydevmScript = pkgs.writeShellScriptBin "hydevm" '' - set -e - - # Configuration - CACHE_DIR="$(pwd)/.hyde-cache/hydevm" - BASE_IMAGE="$CACHE_DIR/archbase.qcow2" - SNAPSHOTS_DIR="$CACHE_DIR/snapshots" - HYDE_REPO="https://github.com/HyDE-Project/HyDE.git" - - # Create cache directories - mkdir -p "$CACHE_DIR" "$SNAPSHOTS_DIR" - - function print_usage() { - echo "HydeVM - Simplified VM tool for HyDE contributors" - echo "" - echo "Usage: hydevm [OPTIONS] [BRANCH/COMMIT]" - echo "" - echo "Arguments:" - echo " BRANCH/COMMIT Git branch or commit hash (default: master)" - echo "" - echo "Options:" - echo " --persist Make VM changes persistent" - echo " --list List available snapshots" - echo " --clean Clean all cached data" - echo " --help Show this help" - echo "" - echo "Environment Variables:" - echo " VM_MEMORY=8G Set VM memory (default: 4G)" - echo " VM_CPUS=4 Set VM CPU count (default: 2)" - echo "" - echo "Examples:" - echo " hydevm # Run master branch (non-persistent)" - echo " hydevm --persist # Run master branch (persistent)" - echo " hydevm feature-branch # Run specific branch" - echo " hydevm abc123 # Run specific commit" - echo " hydevm --persist dev # Run dev branch with persistence" - } - - function download_archbox() { - if [ ! -f "$BASE_IMAGE" ]; then - echo "📦 Downloading Arch Linux base image..." - ${pkgs.curl}/bin/curl -L "${archImageUrl}" -o "$BASE_IMAGE" - echo "✅ Base image downloaded successfully" - fi - } - - function get_snapshot_name() { - local ref="$1" - if [ -z "$ref" ]; then - echo "master" - else - # Sanitize branch/commit name for filename - echo "$ref" | sed 's/[^a-zA-Z0-9._-]/_/g' - fi - } - - function create_hyde_snapshot() { - local ref="''${1:-master}" - local snapshot_name=$(get_snapshot_name "$ref") - local snapshot_path="$SNAPSHOTS_DIR/hyde-$snapshot_name.qcow2" - - # Check if snapshot already exists - if [ -f "$snapshot_path" ]; then - echo "📸 Snapshot for '$ref' already exists" - return 0 - fi - - echo "🔨 Creating HyDE snapshot for '$ref'..." - - # Create temporary VM image for setup - local temp_image="$CACHE_DIR/temp-setup.qcow2" - ${pkgs.qemu}/bin/qemu-img create -f qcow2 -F qcow2 -b "$BASE_IMAGE" "$temp_image" - - # Create setup script that will be available in the VM - local setup_script="$CACHE_DIR/setup.sh" - cat > "$setup_script" </dev/null; then - echo "Checking out branch: $ref" - git checkout -b "$ref" "origin/$ref" - else - echo "Checking out commit: $ref" - git checkout "$ref" - fi - fi - - echo "" - echo "🎨 HyDE repository cloned and ready!" - echo "🚀 Starting HyDE installation..." - cd /home/arch/HyDE/Scripts - ./install.sh - - echo "" - echo "✅ HyDE installation complete!" - echo "💾 Please shutdown the VM now by running: sudo poweroff" - echo " This will create the snapshot for future use." - SETUP_EOF - - chmod +x "$setup_script" - - echo "" - echo "🖥️ Starting VM for HyDE installation..." - echo "📋 SETUP INSTRUCTIONS:" - echo " 1. Wait for the VM to boot to login prompt" - echo " 2. Login as: arch / arch" - echo " 3. Run: curl -s http://10.0.2.2:8000/setup.sh -o ./setup.sh" - echo " 4. Run: chmod +x ./setup.sh" - echo " 5. Run: ./setup.sh" - echo " 6. Wait for installation to complete" - echo " 7. Run: sudo poweroff" - echo "" - echo "Starting simple HTTP server for script delivery..." - - # Start simple HTTP server in background to serve the setup script - cd "$CACHE_DIR" - ${pkgs.python3}/bin/python3 -m http.server 8000 & - local server_pid=$! - - # Start VM for setup - ${pkgs.qemu}/bin/qemu-system-x86_64 \ - -m "''${VM_MEMORY:-8G}" \ - -smp "''${VM_CPUS:-4}" \ - -enable-kvm \ - -cpu host \ - -drive file="$temp_image",format=qcow2,if=virtio \ - -device virtio-vga-gl \ - -display gtk,gl=on,grab-on-hover=on \ - -device virtio-net,netdev=net0 \ - -netdev user,id=net0 \ - -boot menu=on - - # Kill the HTTP server - kill $server_pid 2>/dev/null || true - - echo "" - echo "💾 Converting VM to snapshot..." - - # Convert temporary image to final snapshot - ${pkgs.qemu}/bin/qemu-img convert -O qcow2 "$temp_image" "$snapshot_path" - - # Cleanup - rm -f "$temp_image" "$setup_script" - - echo "✅ Snapshot created: hyde-$snapshot_name" - echo "🚀 You can now run: hydevm $ref" - } - - function run_vm() { - local ref="''${1:-master}" - local persistent="''${2:-false}" - local snapshot_name=$(get_snapshot_name "$ref") - local snapshot_path="$SNAPSHOTS_DIR/hyde-$snapshot_name.qcow2" - - # Ensure snapshot exists - if [ ! -f "$snapshot_path" ]; then - echo "📸 Snapshot for '$ref' not found, creating it..." - create_hyde_snapshot "$ref" - fi - - local vm_disk - if [ "$persistent" = "true" ]; then - echo "🔒 Running in persistent mode - changes will be saved" - vm_disk="$snapshot_path" - else - echo "🔄 Running in non-persistent mode - changes will be discarded" - vm_disk="$(mktemp -p "$CACHE_DIR" overlay.XXXXXX.qcow2)" - ${pkgs.qemu}/bin/qemu-img create -f qcow2 -F qcow2 -b "$snapshot_path" "$vm_disk" - trap "rm -f '$vm_disk'" EXIT - fi - - echo "🚀 Starting HyDE VM (branch/commit: $ref)..." - echo " Login: arch / arch" - echo " SSH: ssh arch@localhost -p 2222" - - ${pkgs.qemu}/bin/qemu-system-x86_64 \ - -m "''${VM_MEMORY:-4G}" \ - -smp "''${VM_CPUS:-2}" \ - -enable-kvm \ - -cpu host \ - -drive file="$vm_disk",format=qcow2,if=virtio \ - -device virtio-vga-gl \ - -display gtk,gl=on,grab-on-hover=on \ - -device virtio-net,netdev=net0 \ - -netdev user,id=net0,hostfwd=tcp::2222-:22 \ - -boot menu=on \ - ''${VM_EXTRA_ARGS:-} - } - - function list_snapshots() { - echo "📸 Available HyDE snapshots:" - if [ -d "$SNAPSHOTS_DIR" ]; then - find "$SNAPSHOTS_DIR" -name "hyde-*.qcow2" -exec basename {} \; | \ - sed 's/^hyde-//' | sed 's/\.qcow2$//' | sort - else - echo "No snapshots found" - fi - } - - function clean_cache() { - echo "🧹 Cleaning HydeVM cache..." - rm -rf "$CACHE_DIR" - echo "✅ Cache cleaned" - } - - # Main logic - persistent="false" - ref="master" - - # Parse arguments - while [ $# -gt 0 ]; do - case "$1" in - --persist) - persistent="true" - shift - ;; - --list) - list_snapshots - exit 0 - ;; - --clean) - clean_cache - exit 0 - ;; - --help|-h) - print_usage - exit 0 - ;; - -*) - echo "❌ Unknown option: $1" - print_usage - exit 1 - ;; - *) - ref="$1" - shift - ;; - esac - done - - # Ensure archbox is available - download_archbox - - # Run VM - run_vm "$ref" "$persistent" - ''; -in -{ - defaultPackage = hydevmScript; - - mkHydeVM = - { - memory ? "4G", - cpus ? 2, - extraArgs ? "", - }: - pkgs.writeShellScriptBin "run-hydevm" '' - VM_MEMORY="${memory}" VM_CPUS="${toString cpus}" VM_EXTRA_ARGS="${extraArgs}" ${hydevmScript}/bin/hydevm "$@" - ''; -} diff --git a/lib/vms/iso-vm.nix b/lib/vms/iso-vm.nix deleted file mode 100644 index a5fae2d0..00000000 --- a/lib/vms/iso-vm.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ hydenix-inputs, ... }: -let - # Define pkgs for easier access - pkgs = import hydenix-inputs.hydenix-nixpkgs { - inherit (hydenix-inputs.lib) system; - config.allowUnfree = true; - }; - - # Import the ISO configuration - isoConfig = ( - import ../iso/default.nix { - inherit hydenix-inputs; - } - ); - - # Get the actual path to the ISO image file - isoPath = "${isoConfig.isoSystem.config.system.build.isoImage}/iso/hydenix.iso"; - - # TODO: needs uefi bootloader - # TODO: fix resolution/display -in -# Instead of a NixOS system, create a direct VM script -pkgs.writeShellScriptBin "run-demo-vm" '' - QEMU=${pkgs.qemu}/bin/qemu-system-x86_64 - - # Create a virtual disk if it doesn't exist yet - if [ ! -f ./nixos-disk.qcow2 ]; then - ${pkgs.qemu}/bin/qemu-img create -f qcow2 ./nixos-disk.qcow2 30G - fi - - # Run QEMU with the ISO as boot device - $QEMU \ - -enable-kvm \ - -m 8192 \ - -smp 6 \ - -cpu host \ - -machine q35,accel=kvm \ - -drive file=./nixos-disk.qcow2,if=virtio,cache=writeback \ - -drive media=cdrom,file=${isoPath},readonly=on \ - -boot d \ - -device virtio-vga-gl \ - -display gtk,gl=on,grab-on-hover=on \ - -usb -device usb-tablet \ - -device intel-iommu \ - -device ich9-intel-hda \ - -device hda-output \ -'' diff --git a/vm/arch-vm.nix b/vm/arch-vm.nix deleted file mode 100644 index 5628bf20..00000000 --- a/vm/arch-vm.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ pkgs, userConfig, ... }: - -let - vmUtils = import ./vm-utils.nix { inherit pkgs; }; - vmName = "arch-vm"; - vmImage = "output-arch-vm/arch-vm"; - - archVmHcl = pkgs.writeText "arch-vm.pkr.hcl" '' - packer { - required_plugins { - qemu = { - version = ">= 1.0.0" - source = "github.com/hashicorp/qemu" - } - } - } - - source "qemu" "arch" { - iso_url = "https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso" - iso_checksum = "file:https://geo.mirror.pkgbuild.com/iso/latest/sha256sums.txt" - output_directory = "output-arch-vm" - shutdown_command = "echo 'packer' | sudo -S shutdown -P now" - disk_size = "${toString userConfig.vm.diskSize}" - format = "qcow2" - accelerator = "kvm" - ssh_username = "${userConfig.username}" - ssh_password = "${userConfig.defaultPassword}" - ssh_timeout = "20m" - vm_name = "arch-vm" - memory = "${toString userConfig.vm.memorySize}" - cpus = "${toString userConfig.vm.cores}" - headless = false - boot_wait = "8s" - boot_command = [ - "", - "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/arch-preseed.sh", - "/usr/bin/bash arch-preseed.sh" - ] - http_directory = "${toString ./.}/scripts/preseed" - ssh_handshake_attempts = "20" - } - - build { - sources = ["source.qemu.arch"] - - provisioner "shell" { - inline = [ - "sudo pacman -Syu --noconfirm", - "sudo pacman -S --noconfirm base-devel git vim", - ] - } - - provisioner "shell" { - script = "${toString ./.}/scripts/install-nix.sh" - } - - provisioner "shell" { - script = "${toString ./.}/../../lib/gen-config.sh" - } - - provisioner "shell" { - inline = [ - "mkdir -p /home/${userConfig.username}/hydenix" - ] - } - - provisioner "file" { - source = "${toString ./.}/../../" - destination = "/home/${userConfig.username}/hydenix" - } - - provisioner "shell" { - script = "${toString ./.}/scripts/install/arch-setup.sh" - } - - provisioner "shell" { - inline = [ - "cd /home/${userConfig.username}/hydenix", - ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh", - "nix run home-manager/master -- switch --flake .#${userConfig.username}-generic", - "nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update", - "nix-env -iA nixgl.auto.nixGLDefault", - ] - } - - } - ''; -in -pkgs.writeShellScriptBin "run-arch-vm" '' - # Check if VM image exists, if not, build it - if [ ! -f "${vmImage}" ]; then - echo "VM image not found. Building it now..." - - # Clean up existing output directory - rm -rf output-arch-vm - - ${vmUtils.cleanupVM vmName} - - ${pkgs.packer}/bin/packer init ${archVmHcl} - ${pkgs.packer}/bin/packer build ${archVmHcl} - - # Check if build was successful - if [ ! -f "${vmImage}" ]; then - echo "Failed to build VM image. Exiting." - exit 1 - fi - fi - - ${vmUtils.createAndStartVM { - inherit vmName vmImage userConfig; - osVariant = "archlinux"; - }} -'' diff --git a/vm/fedora-vm.nix b/vm/fedora-vm.nix deleted file mode 100644 index 1f1da45f..00000000 --- a/vm/fedora-vm.nix +++ /dev/null @@ -1,148 +0,0 @@ -{ pkgs, userConfig, ... }: - -let - vmUtils = import ./vm-utils.nix { inherit pkgs; }; - vmName = "fedora-vm"; - vmImage = "output-fedora-vm/fedora-vm"; - - generateKickstartScript = pkgs.writeShellScriptBin "generate-kickstart" '' - #!/bin/bash - # Define variables from userConfig - ROOT_PASSWORD="${userConfig.defaultPassword}" - USERNAME="${userConfig.username}" - USER_PASSWORD="${userConfig.defaultPassword}" - DISK_SIZE=${toString userConfig.vm.diskSize} - - # Calculate partition sizes based on disk size - ROOT_SIZE=$((DISK_SIZE * 70 / 100)) # 70% for root - HOME_SIZE=$((DISK_SIZE * 20 / 100)) # 20% for home - SWAP_SIZE=$((DISK_SIZE * 5 / 100)) # 5% for swap - - # Path to the original Kickstart template - KICKSTART_TEMPLATE="${toString ./.}/scripts/preseed/fedora-kickstart.ks.template" - - # Use a temporary directory for the processed Kickstart file - TEMP_DIR="/tmp/fedora-kickstart" - mkdir -p $TEMP_DIR - KICKSTART_PROCESSED="$TEMP_DIR/fedora-kickstart.ks" - - # Replace placeholders with actual values - sudo sed -e "s/{{ root_password }}/$ROOT_PASSWORD/g" \ - -e "s/{{ username }}/$USERNAME/g" \ - -e "s/{{ user_password }}/$USER_PASSWORD/g" \ - -e "s/{{ root_size }}/$ROOT_SIZE/g" \ - -e "s/{{ home_size }}/$HOME_SIZE/g" \ - -e "s/{{ swap_size }}/$SWAP_SIZE/g" \ - $KICKSTART_TEMPLATE > $KICKSTART_PROCESSED - ''; - - fedoraVmHcl = pkgs.writeText "fedora-vm.pkr.hcl" '' - packer { - required_plugins { - qemu = { - version = ">= 1.0.0" - source = "github.com/hashicorp/qemu" - } - } - } - - source "qemu" "fedora" { - iso_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/40/Server/x86_64/iso/Fedora-Server-dvd-x86_64-40-1.14.iso" - iso_checksum = "32d9ab1798fc8106a0b06e873bdcd83a3efea8412c9401dfe4097347ed0cfc65" - output_directory = "output-fedora-vm" - shutdown_command = "echo 'packer' | sudo -S shutdown -P now" - disk_size = "${toString userConfig.vm.diskSize}" - format = "qcow2" - accelerator = "kvm" - ssh_username = "${userConfig.username}" - ssh_password = "${userConfig.defaultPassword}" - ssh_timeout = "20m" - vm_name = "fedora-vm" - memory = "${toString userConfig.vm.memorySize}" - cpus = "${toString userConfig.vm.cores}" - headless = false - boot_command = [ - "", - "e", - "", - " inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/fedora-kickstart.ks" - ] - http_directory = "/tmp/fedora-kickstart" - ssh_handshake_attempts = "20" - } - - build { - sources = ["source.qemu.fedora"] - - provisioner "shell" { - inline = [ - "sudo dnf update -y", - "sudo dnf install -y git vim", - "echo 'Size of /root:' && sudo du -sh /root", - "echo 'Size of /home:' && sudo du -sh /home" - ] - } - - provisioner "shell" { - script = "${toString ./.}/scripts/install-nix.sh" - } - - provisioner "shell" { - script = "${toString ./.}/../../lib/gen-config.sh" - } - - provisioner "shell" { - inline = [ - "mkdir -p /home/${userConfig.username}/hydenix/hydenix" - ] - } - - provisioner "file" { - source = "${toString ./.}/../../" - destination = "/home/${userConfig.username}/hydenix" - } - - provisioner "shell" { - script = "${toString ./.}/scripts/install/fedora-setup.sh" - } - - provisioner "shell" { - inline = [ - "cd /home/${userConfig.username}/hydenix/hydenix", - ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh", - "nix run home-manager/master -- switch --flake .#${userConfig.username}-generic", - "nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update", - "nix-env -iA nixgl.auto.nixGLDefault", - ] - } - } - ''; -in -pkgs.writeShellScriptBin "run-fedora-vm" '' - # Check if VM image exists, if not, build it - if [ ! -f "${vmImage}" ]; then - echo "VM image not found. Building it now..." - - # Generate the Kickstart file - ${generateKickstartScript}/bin/generate-kickstart - - # Clean up existing output directory - rm -rf output-fedora-vm - - ${vmUtils.cleanupVM vmName} - - ${pkgs.packer}/bin/packer init ${fedoraVmHcl} - ${pkgs.packer}/bin/packer build ${fedoraVmHcl} - - # Check if build was successful - if [ ! -f "${vmImage}" ]; then - echo "Failed to build VM image. Exiting." - exit 1 - fi - fi - - ${vmUtils.createAndStartVM { - inherit vmName vmImage userConfig; - osVariant = "fedora37"; - }} -'' diff --git a/vm/scripts/install-nix.sh b/vm/scripts/install-nix.sh deleted file mode 100644 index 9afa2c40..00000000 --- a/vm/scripts/install-nix.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm - -# Add Nix to PATH for the current session and future logins -echo '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' >>~/.bashrc -echo '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' >>~/.bash_profile - -# Source Nix environment for the current session -. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh diff --git a/vm/scripts/install/arch-setup.sh b/vm/scripts/install/arch-setup.sh deleted file mode 100644 index 89d05c06..00000000 --- a/vm/scripts/install/arch-setup.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash -set -e - -cat <<"EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will set up Arch Linux for Hydenix." -# read -p "Do you want to proceed? (y/n) " REPLY -# echo -# if [[ ! $REPLY =~ ^[Yy]$ ]]; then -# echo "Setup cancelled." -# exit 0 -# fi - -CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/hydenix/config.nix" - -if [ -f "$CONFIG_FILE" ]; then - echo "Config file found. Contents:" - cat "$CONFIG_FILE" -else - echo "Config file not found at $CONFIG_FILE" - exit 1 -fi - -echo "Using config file: $CONFIG_FILE" - -# Function to read values from config.nix -read_config() { - local result - result=$(grep "^[[:space:]]*$1[[:space:]]*=" "$CONFIG_FILE" | cut -d '=' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr -d '";') - if [ -n "$result" ]; then - echo "$result" - else - echo "Error: Failed to read $1 from config file" >&2 - return 1 - fi -} - -# Read configuration values -USERNAME=$(read_config "username") -TIMEZONE=$(read_config "timezone") -LOCALE=$(read_config "locale") -DEFAULT_PASSWORD=$(read_config "defaultPassword") - -echo "Setting up Arch Linux with the following configuration:" -echo "Username: $USERNAME" -echo "Timezone: $TIMEZONE" -echo "Locale: $LOCALE" -echo - -# read -p "Is this correct? (y/n) " CONFIRM -# if [[ ! $CONFIRM =~ ^[Yy]$ ]]; then -# echo "Please update your config.nix file and run this script again." -# exit 1 -# fi - -# Enable parallel downloads in pacman -echo "Enabling parallel downloads in pacman..." -sudo sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf - -# Update mirrorlist -echo "Updating mirrorlist..." -sudo pacman -S --noconfirm --needed reflector -sudo reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist - -# Update package database -sudo pacman -Sy --noconfirm - -# Install base packages -echo "Installing base packages..." - -# TODO: review -sudo pacman -S --needed --noconfirm \ - zsh polkit udisks2 openssh \ - pipewire pipewire-pulse \ - sddm \ - networkmanager \ - qemu-guest-agent spice-vdagent \ - libvirt \ - upower \ - iptables \ - libinput \ - xf86-input-libinput \ - dconf - -# Enable services (without starting them yet) -sudo systemctl enable \ - sshd \ - NetworkManager \ - upower \ - libvirtd - -# Set timezone -sudo timedatectl set-timezone "$TIMEZONE" - -# Set locale -sudo localectl set-locale LANG="$LOCALE" - -# Edit existing user -sudo usermod -aG wheel,video "$USERNAME" -sudo chsh -s /bin/zsh "$USERNAME" -echo "$USERNAME:$DEFAULT_PASSWORD" | sudo chpasswd - -# Set up Hyprland to run on boot -echo "Setting up Hyprland to run on boot..." -sudo mkdir -p /usr/share/wayland-sessions -sudo tee /usr/share/wayland-sessions/hyprland.desktop >/dev/null </dev/null < < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will set up macOS for Hydenix." -read -p "Do you want to proceed? (y/n) " REPLY -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Setup cancelled." - exit 0 -fi - -CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/hydenix/config.nix" - -if [ -f "$CONFIG_FILE" ]; then - echo "A config.nix file already exists at $CONFIG_FILE" - read -p "Do you want to use the existing config? (y/n) " USE_EXISTING - if [[ ! $USE_EXISTING =~ ^[Yy]$ ]]; then - echo "Please run gen-config to create a new config file." - exit 1 - fi -else - echo "No config file found. Please run gen-config first." - exit 1 -fi - -# Function to read values from config.nix -read_config() { - nix eval --impure --expr "let config = import $CONFIG_FILE; in config.$1" 2>/dev/null | tr -d '"' -} - -# Read configuration values -USERNAME=$(read_config "username") -TIMEZONE=$(read_config "timezone") -LOCALE=$(read_config "locale") -DEFAULT_PASSWORD=$(read_config "defaultPassword") - -echo "Setting up macOS with the following configuration:" -echo "Username: $USERNAME" -echo "Timezone: $TIMEZONE" -echo "Locale: $LOCALE" -echo - -read -p "Is this correct? (y/n) " CONFIRM -if [[ ! $CONFIRM =~ ^[Yy]$ ]] -then - echo "Please update your config.nix file and run this script again." - exit 1 -fi - -# Install Homebrew if not already installed -if ! command -v brew &> /dev/null; then - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -fi - -# Install necessary packages -brew install \ - zsh \ - dbus \ - openssh \ - pipewire \ - wireplumber - -# Set timezone -sudo systemsetup -settimezone "$TIMEZONE" - -# Set locale -sudo languagesetup -langspec "$LOCALE" - -# Create user -sudo dscl . -create /Users/"$USERNAME" -sudo dscl . -create /Users/"$USERNAME" UserShell /bin/zsh -sudo dscl . -create /Users/"$USERNAME" RealName "$USERNAME" -sudo dscl . -create /Users/"$USERNAME" UniqueID "1001" -sudo dscl . -create /Users/"$USERNAME" PrimaryGroupID 20 -sudo dscl . -create /Users/"$USERNAME" NFSHomeDirectory /Users/"$USERNAME" -sudo dscl . -passwd /Users/"$USERNAME" "$DEFAULT_PASSWORD" -sudo dscl . -append /Groups/admin GroupMembership "$USERNAME" - -# Install Nix -curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install - -# Source Nix -if [ -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then - . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh -fi - -echo "macOS setup complete. Please restart your system." diff --git a/vm/scripts/install/debian-setup.sh b/vm/scripts/install/debian-setup.sh deleted file mode 100644 index cfe7d5a7..00000000 --- a/vm/scripts/install/debian-setup.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -# TODO: Debian setup script and VM diff --git a/vm/scripts/install/fedora-setup.sh b/vm/scripts/install/fedora-setup.sh deleted file mode 100644 index bb166bfd..00000000 --- a/vm/scripts/install/fedora-setup.sh +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash -set -e - -cat <<"EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will set up Fedora for Hydenix." - -# TODO: add confirmation and confirmation skip flag -# read -p "Do you want to proceed? (y/n) " REPLY -# echo -# if [[ ! $REPLY =~ ^[Yy]$ ]]; then -# echo "Setup cancelled." -# exit 0 -# fi - -CONFIG_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/hydenix/config.nix" - -if [ -f "$CONFIG_FILE" ]; then - echo "Config file found. Contents:" - cat "$CONFIG_FILE" -else - echo "Config file not found at $CONFIG_FILE" - exit 1 -fi - -echo "Using config file: $CONFIG_FILE" - -# Function to read values from config.nix -read_config() { - local result - result=$(grep "^[[:space:]]*$1[[:space:]]*=" "$CONFIG_FILE" | cut -d '=' -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | tr -d '";') - if [ -n "$result" ]; then - echo "$result" - else - echo "Error: Failed to read $1 from config file" >&2 - return 1 - fi -} - -# Read configuration values -USERNAME=$(read_config "username") -TIMEZONE=$(read_config "timezone") -LOCALE=$(read_config "locale") -DEFAULT_PASSWORD=$(read_config "defaultPassword") - -echo "Setting up Fedora with the following configuration:" -echo "Username: $USERNAME" -echo "Timezone: $TIMEZONE" -echo "Locale: $LOCALE" -echo - -# TODO: add confirmation and confirmation skip flag -# read -p "Is this correct? (y/n) " CONFIRM -# if [[ ! $CONFIRM =~ ^[Yy]$ ]]; then -# echo "Please update your config.nix file and run this script again." -# exit 1 -# fi - -# Enable fastest mirror -echo "Enabling fastest mirror..." -sudo dnf config-manager --save --setopt=fastestmirror=True - -# Update package database and upgrade system -sudo dnf update -y - -# Install base packages -echo "Installing base packages..." - -# TODO: review -sudo dnf install -y \ - zsh polkit udisks2 openssh \ - pipewire pipewire-pulseaudio \ - sddm \ - NetworkManager \ - qemu-guest-agent spice-vdagent \ - libvirt \ - upower \ - iptables \ - libinput \ - xorg-x11-drv-libinput - -# Enable services (without starting them yet) -sudo systemctl enable \ - sshd \ - NetworkManager \ - upower \ - libvirtd - -# Set timezone -sudo timedatectl set-timezone "$TIMEZONE" - -# Set locale -sudo localectl set-locale LANG="$LOCALE" - -# Edit existing user -sudo usermod -aG wheel,video "$USERNAME" -sudo chsh -s /bin/zsh "$USERNAME" -echo "$USERNAME:$DEFAULT_PASSWORD" | sudo chpasswd - -# Set up Hyprland to run on boot -echo "Setting up Hyprland to run on boot..." -sudo mkdir -p /usr/share/wayland-sessions -sudo tee /usr/share/wayland-sessions/hyprland.desktop >/dev/null </dev/null < < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -# TODO: Ubuntu setup script diff --git a/vm/scripts/preseed/arch-preseed.sh b/vm/scripts/preseed/arch-preseed.sh deleted file mode 100644 index 64ce3334..00000000 --- a/vm/scripts/preseed/arch-preseed.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -set -ex - -# Set up partitions -parted /dev/vda --script mklabel gpt -parted /dev/vda --script mkpart primary 1 3 -parted /dev/vda --script set 1 bios_grub on -parted /dev/vda --script mkpart primary ext4 3 100% - -# Format partitions -mkfs.ext4 /dev/vda2 - -# Mount partitions -mount /dev/vda2 /mnt - -# Initialize pacman keyring -pacman-key --init -pacman-key --populate archlinux - -# Install base system -pacstrap /mnt base linux linux-firmware - -# Generate fstab -genfstab -U /mnt >>/mnt/etc/fstab - -# Chroot and configure system -arch-chroot /mnt /bin/bash < /etc/locale.gen -locale-gen -echo "LANG=en_US.UTF-8" > /etc/locale.conf - -# Set hostname -echo "hydenix" > /etc/hostname - -# Set root password -echo "root:hydenix" | chpasswd - -# Install and configure bootloader -pacman -S --noconfirm grub -grub-install --target=i386-pc --boot-directory=/boot --recheck /dev/vda -grub-mkconfig -o /boot/grub/grub.cfg - -# Enable network services -pacman -S --noconfirm networkmanager -systemctl enable NetworkManager - -# Enable SSH -pacman -S --noconfirm openssh -systemctl enable sshd - -# Create a non-root user -useradd -m -G wheel -s /bin/bash hydenix -echo "hydenix:hydenix" | chpasswd -echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - -# Install additional useful packages -pacman -S --noconfirm vim sudo - -# Ensure mkinitcpio is run -mkinitcpio -P -EOF - -# Unmount partitions -umount -R /mnt - -# Force sync to ensure all writes are completed -sync - -# Reboot -reboot diff --git a/vm/scripts/preseed/fedora-kickstart.ks.template b/vm/scripts/preseed/fedora-kickstart.ks.template deleted file mode 100644 index 1e0c346f..00000000 --- a/vm/scripts/preseed/fedora-kickstart.ks.template +++ /dev/null @@ -1,67 +0,0 @@ -# Kickstart file for Fedora automated installation - -# Use text mode install -text - -# Set the language and keyboard -lang en_US.UTF-8 -keyboard us - -# Set the timezone -timezone UTC - -# Configure network -network --bootproto=dhcp --device=link --activate - -# Set the root password -rootpw --plaintext {{ root_password }} - -# Create user -user --name={{ username }} --groups=wheel --password={{ user_password }} - -# System services -services --enabled="sshd,NetworkManager" - -# Custom partitioning -part biosboot --size=1 # 1MB for BIOS boot -part / --size={{ root_size }} --grow # Root partition size, grows to fill space -part /home --size={{ home_size }} --grow # Home partition size, grows to fill space -part swap --size={{ swap_size }} # Swap partition size - -# Use the first available disk (vda in this case) -ignoredisk --only-use=vda - -# Clear all partitions -clearpart --all --initlabel --drives=vda - -# System bootloader configuration -bootloader --location=mbr --boot-drive=vda - -# Disable the Setup Agent on first boot -firstboot --disable - -# Accept the EULA -eula --agreed - -# Reboot after installation -reboot - -# Package selection -%packages -@core -vim -sudo -openssh-server -%end - -# Post-installation script -%post -# Enable sudo for wheel group -echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - -# Update all packages -dnf upgrade -y - -# Enable SELinux -sed -i 's/SELINUX=.*$/SELINUX=enforcing/' /etc/selinux/config -%end diff --git a/vm/scripts/vm-host/arch-setup.sh b/vm/scripts/vm-host/arch-setup.sh deleted file mode 100755 index 55b1641e..00000000 --- a/vm/scripts/vm-host/arch-setup.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -# Add a new variable for the skip confirmation flag -SKIP_CONFIRM=false - -# Parse command line arguments -while [[ "$#" -gt 0 ]]; do - case $1 in - --skip-confirm) SKIP_CONFIRM=true ;; - *) echo "Unknown parameter: $1"; exit 1 ;; - esac - shift -done - -echo "This script will install the necessary dependencies for running VMs on Arch Linux." -echo "These dependencies include QEMU, libvirt, and virt-manager, which are required for creating and managing virtual machines." -echo "The script will also configure your system to run libvirtd service and add your user to the libvirt group." - -# Only ask for confirmation if SKIP_CONFIRM is false -if [ "$SKIP_CONFIRM" = false ]; then - read -p "Do you want to proceed with the installation? (y/n) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]] - then - echo "Installation cancelled." - exit 1 - fi -fi - -# Install required packages -sudo pacman -S --noconfirm qemu libvirt virt-manager ebtables dnsmasq - -# Start and enable libvirtd service -sudo systemctl enable --now libvirtd.service - -# Add user to libvirt group -sudo usermod -aG libvirt $USER - -echo "Arch Linux host dependencies installed successfully." -echo "Please log out and log back in for group changes to take effect." diff --git a/vm/scripts/vm-host/darwin-setup.sh b/vm/scripts/vm-host/darwin-setup.sh deleted file mode 100755 index f9d65a6d..00000000 --- a/vm/scripts/vm-host/darwin-setup.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will install the necessary dependencies for running VMs on macOS (Darwin)." -echo "These dependencies include QEMU and libvirt, which are required for creating and managing virtual machines." -echo "Note that GUI applications like virt-manager are not available on macOS, so you may need to use command-line tools or consider alternatives like UTM." - -read -p "Do you want to proceed with the installation? (y/n) " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Installation cancelled." - exit 1 -fi - -# Check if Homebrew is installed -if ! command -v brew &> /dev/null; then - echo "Homebrew is not installed. Please install it first: https://brew.sh/" - exit 1 -fi - -# Install required packages -brew install qemu libvirt - -# Start libvirt service -brew services start libvirt - -echo "macOS (Darwin) host dependencies installed successfully." -echo "Note: GUI applications like virt-manager are not available on macOS." -echo "You may need to use command-line tools or consider alternatives like UTM." diff --git a/vm/scripts/vm-host/debian-setup.sh b/vm/scripts/vm-host/debian-setup.sh deleted file mode 100755 index 829ab800..00000000 --- a/vm/scripts/vm-host/debian-setup.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will install the necessary dependencies for running VMs on Debian." -echo "These dependencies include QEMU, libvirt, and virt-manager, which are required for creating and managing virtual machines." -echo "The script will also configure your system to run libvirtd service and add your user to the libvirt group." - -read -p "Do you want to proceed with the installation? (y/n) " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Installation cancelled." - exit 1 -fi - -# Update package lists -sudo apt update - -# Install required packages -sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager - -# Add user to libvirt group -sudo usermod -aG libvirt $USER - -# Start and enable libvirtd service -sudo systemctl enable --now libvirtd - -echo "Debian host dependencies installed successfully." -echo "Please log out and log back in for group changes to take effect." diff --git a/vm/scripts/vm-host/fedora-setup.sh b/vm/scripts/vm-host/fedora-setup.sh deleted file mode 100755 index 345483d8..00000000 --- a/vm/scripts/vm-host/fedora-setup.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will install the necessary dependencies for running VMs on Fedora." -echo "These dependencies include the virtualization group package, which contains QEMU, libvirt, and other required tools for creating and managing virtual machines." -echo "The script will also configure your system to run libvirtd service and add your user to the libvirt group." - -read -p "Do you want to proceed with the installation? (y/n) " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Installation cancelled." - exit 1 -fi - -# Install required packages -sudo dnf install -y @virtualization - -# Start and enable libvirtd service -sudo systemctl enable --now libvirtd - -# Add user to libvirt group -sudo usermod -aG libvirt $USER - -echo "Fedora host dependencies installed successfully." -echo "Please log out and log back in for group changes to take effect." diff --git a/vm/scripts/vm-host/nixos-setup.sh b/vm/scripts/vm-host/nixos-setup.sh deleted file mode 100755 index 22b14b31..00000000 --- a/vm/scripts/vm-host/nixos-setup.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script provides instructions for setting up NixOS as a host for running VMs." -echo "The required configuration includes enabling libvirtd, adding your user to the libvirt group, and installing virt-manager." -echo "These changes are necessary to create and manage virtual machines on your NixOS system." - -echo "To set up NixOS as a host for running VMs, add the following to your configuration.nix:" -echo -echo "virtualisation.libvirtd.enable = true;" -echo "users.users..extraGroups = [ \"libvirtd\" ];" -echo "environment.systemPackages = with pkgs; [ virt-manager ];" -echo -echo "Then, run 'sudo nixos-rebuild switch' to apply the changes." diff --git a/vm/scripts/vm-host/ubuntu-setup.sh b/vm/scripts/vm-host/ubuntu-setup.sh deleted file mode 100755 index 57eebd4c..00000000 --- a/vm/scripts/vm-host/ubuntu-setup.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cat << "EOF" - _ _ _ _ - | | | | | | (_) - | |__| |_ _ __| | ___ _ __ ___ __ - | __ | | | |/ _` |/ _ \ '_ \| \ \/ / - | | | | |_| | (_| | __/ | | | |> < - |_| |_|\__, |\__,_|\___|_| |_|_/_/\_\ - __/ | - |___/ ❄️ Powered by Nix ❄️ -EOF - -echo "This script will install the necessary dependencies for running VMs on Ubuntu." -echo "These dependencies include QEMU, libvirt, and virt-manager, which are required for creating and managing virtual machines." -echo "The script will also configure your system to run libvirtd service and add your user to the libvirt group." - -read -p "Do you want to proceed with the installation? (y/n) " -n 1 -r -echo -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Installation cancelled." - exit 1 -fi - -# Update package lists -sudo apt update - -# Install required packages -sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager - -# Add user to libvirt group -sudo usermod -aG libvirt $USER - -# Start and enable libvirtd service -sudo systemctl enable --now libvirtd - -echo "Ubuntu host dependencies installed successfully." -echo "Please log out and log back in for group changes to take effect." diff --git a/vm/vm-utils.nix b/vm/vm-utils.nix deleted file mode 100644 index cf77519e..00000000 --- a/vm/vm-utils.nix +++ /dev/null @@ -1,77 +0,0 @@ -{ pkgs }: -rec { - # Common function to create default network - createDefaultNetwork = '' - if ! sudo ${pkgs.libvirt}/bin/virsh net-list --all | grep -q "default"; then - sudo ${pkgs.libvirt}/bin/virsh net-define /dev/stdin < - default - - - - - - - - - EOF - sudo ${pkgs.libvirt}/bin/virsh net-start default - sudo ${pkgs.libvirt}/bin/virsh net-autostart default - fi - ''; - - # Common function to clean up existing VM - cleanupVM = vmName: '' - if sudo ${pkgs.libvirt}/bin/virsh list --all | grep -q "${vmName}"; then - sudo ${pkgs.libvirt}/bin/virsh destroy "${vmName}" || true - sudo ${pkgs.libvirt}/bin/virsh undefine "${vmName}" --remove-all-storage - fi - ''; - - # Common function to launch VM viewer - launchViewer = vmName: userConfig: '' - echo "To connect to the VM, use: virt-viewer --connect qemu:///system --attach ${vmName}" - echo "Default login: username '${userConfig.username}', password '${userConfig.defaultPassword}'" - - sleep 5 - - if [ "$DISPLAY" != "" ]; then - ${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$(id -un) - sudo -E ${pkgs.virt-viewer}/bin/virt-viewer --connect qemu:///system --attach "${vmName}" - else - echo "No display detected. Unable to open virt-viewer automatically." - echo "You can try running 'virt-viewer --connect qemu:///system --attach ${vmName}' manually when X is available." - fi - ''; - - # Common function to create and start VM - createAndStartVM = - { - vmName, - vmImage, - osVariant, - userConfig, - }: - '' - ${createDefaultNetwork} - - ${cleanupVM vmName} - - sudo ${pkgs.virt-manager}/bin/virt-install \ - --connect qemu:///system \ - --name "${vmName}" \ - --memory ${toString userConfig.vm.memorySize} \ - --vcpus ${toString userConfig.vm.cores} \ - --disk path=${vmImage},format=qcow2 \ - --import \ - --os-variant ${osVariant} \ - --network network=default \ - --graphics spice,gl.enable=yes,listen=none,rendernode=/dev/dri/renderD128 \ - --video virtio \ - --noautoconsole - - sudo ${pkgs.libvirt}/bin/virsh --connect qemu:///system start "${vmName}" - - ${launchViewer vmName userConfig} - ''; -} From 50b7645059cde7b726a72896e692e534ba0f974f Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 5 Aug 2025 22:21:45 -0700 Subject: [PATCH 05/12] chore: update theme hash --- hydenix/sources/themes/Moonlight.nix | 2 +- hydenix/sources/themes/Piece-Of-Mind.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hydenix/sources/themes/Moonlight.nix b/hydenix/sources/themes/Moonlight.nix index e2248d98..95587962 100644 --- a/hydenix/sources/themes/Moonlight.nix +++ b/hydenix/sources/themes/Moonlight.nix @@ -6,7 +6,7 @@ mkTheme rec { repo = "Moonlight"; rev = "main"; name = name; - sha256 = "sha256-e3qgwSzmKQnhzEsvdFmOlI8lv55XddTsNIEf6Aig5uM="; + sha256 = "sha256-1ZzLxHREUJqm/ckcsmc/95ka4PyoCRR9FF+xoH+egro="; }; meta = { description = "HyDE Theme: Moonlight"; diff --git a/hydenix/sources/themes/Piece-Of-Mind.nix b/hydenix/sources/themes/Piece-Of-Mind.nix index 8270315b..051466f4 100644 --- a/hydenix/sources/themes/Piece-Of-Mind.nix +++ b/hydenix/sources/themes/Piece-Of-Mind.nix @@ -6,7 +6,7 @@ mkTheme rec { repo = "Piece-Of-Mind"; rev = "main"; name = name; - sha256 = "sha256-eOnAOY/VERojV3TrHMtrDPtXsYPi3p4mz5InAt1Q7xo="; + sha256 = "sha256-KpFxJZBD6uvfpnrafW5wDfXRPOQXdxUCaT7pINb4IHI="; }; meta = { name = name; From c64902fda210d291cfaeac35557f6ce438257b34 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 5 Aug 2025 22:22:22 -0700 Subject: [PATCH 06/12] feat: update nixpkgs --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 15d98adb..42e5abaa 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1751824240, - "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", + "lastModified": 1754365350, + "narHash": "sha256-NLWIkn1qM0wxtZu/2NXRaujWJ4Y1PSZlc7h0y6pOzOQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", + "rev": "c5d7e957397ecb7d48b99c928611c6e780db1b56", "type": "github" }, "original": { @@ -60,11 +60,11 @@ ] }, "locked": { - "lastModified": 1751774635, - "narHash": "sha256-DuOznGdgMxeSlPpUu6Wkq0ZD5e2Cfv9XRZeZlHWMd1s=", + "lastModified": 1754195341, + "narHash": "sha256-YL71IEf2OugH3gmAsxQox6BJI0KOcHKtW2QqT/+s2SA=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "85686025ba6d18df31cc651a91d5adef63378978", + "rev": "b7fcd4e26d67fca48e77de9b0d0f954b18ae9562", "type": "github" }, "original": { @@ -75,11 +75,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1751432711, - "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=", + "lastModified": 1754316476, + "narHash": "sha256-Ry1gd1BQrNVJJfT11cpVP0FY8XFMx4DJV2IDp01CH9w=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f", + "rev": "9368056b73efb46eb14fd4667b99e0f81b805f28", "type": "github" }, "original": { From 0d61d2da734e985071d747f9148aa958a931057f Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 5 Aug 2025 22:22:43 -0700 Subject: [PATCH 07/12] fix: zsh configuration updates for home-manager --- hydenix/modules/hm/shell.nix | 282 ++++++++++++++++++----------------- 1 file changed, 142 insertions(+), 140 deletions(-) diff --git a/hydenix/modules/hm/shell.nix b/hydenix/modules/hm/shell.nix index ab178c05..bc461b84 100644 --- a/hydenix/modules/hm/shell.nix +++ b/hydenix/modules/hm/shell.nix @@ -93,8 +93,8 @@ in fastfetch ] ++ lib.optionals (cfg.zsh.enable || cfg.fish.enable) [ - eza - duf + eza + duf ] ++ lib.optionals cfg.zsh.enable [ zsh @@ -117,28 +117,138 @@ in enable = true; plugins = cfg.zsh.plugins; }; - initContent = '' - ${lib.optionalString cfg.pokego.enable '' - pokego --no-title -r 1,3,6 - ''} - ${lib.optionalString cfg.starship.enable '' - eval "$(${pkgs.starship}/bin/starship init zsh)" - export STARSHIP_CACHE=$XDG_CACHE_HOME/starship - export STARSHIP_CONFIG=$XDG_CONFIG_HOME/starship/starship.toml - ''} - ${lib.optionalString cfg.p10k.enable '' - # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. - # Initialization code that may require console input (password prompts, [y/n] - # confirmations, etc.) must go above this block; everything else may go below. - if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then - source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" - fi - source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme - ''} - ${lib.optionalString cfg.fastfetch.enable '' - fastfetch --logo-type kitty - ''} - ''; + + # Custom shell aliases integrated into programs.zsh + shellAliases = { + c = "clear"; + vc = "code"; + fastfetch = "fastfetch --logo-type kitty"; + ".." = "cd .."; + "..." = "cd ../.."; + ".3" = "cd ../../.."; + ".4" = "cd ../../../.."; + ".5" = "cd ../../../../.."; + mkdir = "mkdir -p"; + ffec = "_fuzzy_edit_search_file_content"; + ffcd = "_fuzzy_change_directory"; + ffe = "_fuzzy_edit_search_file"; + df = "_df"; + }; + + # Using the new initContent API with proper ordering + initContent = lib.mkMerge [ + # Early initialization (before completion init) - order 550 + (lib.mkOrder 550 '' + #!/usr/bin/env zsh + function no_such_file_or_directory_handler { + local red='\e[1;31m' reset='\e[0m' + printf "''${red}zsh: no such file or directory: %s''${reset}\n" "$1" + return 127 + } + + # best fzf aliases ever + _fuzzy_change_directory() { + local initial_query="$1" + local selected_dir + local fzf_options=('--preview=ls -p {}' '--preview-window=right:60%') + fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) + local max_depth=7 + + if [[ -n "$initial_query" ]]; then + fzf_options+=("--query=$initial_query") + fi + + #type -d + selected_dir=$(find . -maxdepth $max_depth \( -name .git -o -name node_modules -o -name .venv -o -name target -o -name .cache \) -prune -o -type d -print 2>/dev/null | fzf "''${fzf_options[@]}") + + if [[ -n "$selected_dir" && -d "$selected_dir" ]]; then + cd "$selected_dir" || return 1 + else + return 1 + fi + } + + _fuzzy_edit_search_file_content() { + # [f]uzzy [e]dit [s]earch [f]ile [c]ontent + local selected_file + selected_file=$(grep -irl "''${1:-}" ./ | fzf --height "80%" --layout=reverse --preview-window right:60% --cycle --preview 'cat {}' --preview-window right:60%) + + if [[ -n "$selected_file" ]]; then + if command -v "$EDITOR" &>/dev/null; then + "$EDITOR" "$selected_file" + else + echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" + vim "$selected_file" + fi + else + echo "No file selected or search returned no results." + fi + } + + _fuzzy_edit_search_file() { + local initial_query="$1" + local selected_file + local fzf_options=() + fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) + local max_depth=5 + + if [[ -n "$initial_query" ]]; then + fzf_options+=("--query=$initial_query") + fi + + # -type f: only find files + selected_file=$(find . -maxdepth $max_depth -type f 2>/dev/null | fzf "''${fzf_options[@]}") + + if [[ -n "$selected_file" && -f "$selected_file" ]]; then + if command -v "$EDITOR" &>/dev/null; then + "$EDITOR" "$selected_file" + else + echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" + vim "$selected_file" + fi + else + return 1 + fi + } + + _df() { + if [[ $# -ge 1 && -e "''${@: -1}" ]]; then + duf "''${@: -1}" + else + duf + fi + } + + # Some binds won't work on first prompt when deferred + bindkey '\e[H' beginning-of-line + bindkey '\e[F' end-of-line + '') + + # Regular initialization content + '' + ${lib.optionalString cfg.pokego.enable '' + pokego --no-title -r 1,3,6 + ''} + ${lib.optionalString cfg.starship.enable '' + eval "$(${pkgs.starship}/bin/starship init zsh)" + export STARSHIP_CACHE=$XDG_CACHE_HOME/starship + export STARSHIP_CONFIG=$XDG_CONFIG_HOME/starship/starship.toml + ''} + ${lib.optionalString cfg.p10k.enable '' + # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. + # Initialization code that may require console input (password prompts, [y/n] + # confirmations, etc.) must go above this block; everything else may go below. + if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then + source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" + fi + source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme + ''} + ${lib.optionalString cfg.fastfetch.enable '' + fastfetch --logo-type kitty + ''} + ${cfg.zsh.configText} + '' + ]; }; programs.fish = lib.mkIf cfg.fish.enable { @@ -147,10 +257,10 @@ in interactiveShellInit = '' # Disable greeting set -g fish_greeting - + # Source Hyde configuration source ${pkgs.hydenix.hyde}/Configs/.config/fish/hyde_config.fish - + ${lib.optionalString cfg.starship.enable '' if type -q starship starship init fish | source @@ -158,20 +268,20 @@ in set -gx STARSHIP_CONFIG $XDG_CONFIG_HOME/starship/starship.toml end ''} - + # fzf integration if type -q fzf fzf --fish | source end - + # Color settings set fish_pager_color_prefix cyan set fish_color_autosuggestion brblack - + ${lib.optionalString cfg.pokego.enable '' pokego --no-title -r 1,3,6 ''} - + ${lib.optionalString cfg.fastfetch.enable '' fastfetch --logo-type kitty ''} @@ -196,115 +306,6 @@ in home.file = lib.mkMerge [ (lib.mkIf cfg.zsh.enable { - # Shell configs - ".zshrc".text = '' - ${cfg.zsh.configText} - ''; - - # we are writing our own .zshenv/hyde.zshrc file to ensure that its properly sourcing nix paths, and removes all the arch nonsense - ".zshenv".text = '' - #!/usr/bin/env zsh - function no_such_file_or_directory_handler { - local red='\e[1;31m' reset='\e[0m' - printf "''${red}zsh: no such file or directory: %s''${reset}\n" "$1" - return 127 - } - - # best fzf aliases ever - _fuzzy_change_directory() { - local initial_query="$1" - local selected_dir - local fzf_options=('--preview=ls -p {}' '--preview-window=right:60%') - fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) - local max_depth=7 - - if [[ -n "$initial_query" ]]; then - fzf_options+=("--query=$initial_query") - fi - - #type -d - selected_dir=$(find . -maxdepth $max_depth \( -name .git -o -name node_modules -o -name .venv -o -name target -o -name .cache \) -prune -o -type d -print 2>/dev/null | fzf "''${fzf_options[@]}") - - if [[ -n "$selected_dir" && -d "$selected_dir" ]]; then - cd "$selected_dir" || return 1 - else - return 1 - fi - } - - _fuzzy_edit_search_file_content() { - # [f]uzzy [e]dit [s]earch [f]ile [c]ontent - local selected_file - selected_file=$(grep -irl "''${1:-}" ./ | fzf --height "80%" --layout=reverse --preview-window right:60% --cycle --preview 'cat {}' --preview-window right:60%) - - if [[ -n "$selected_file" ]]; then - if command -v "$EDITOR" &>/dev/null; then - "$EDITOR" "$selected_file" - else - echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" - vim "$selected_file" - fi - - else - echo "No file selected or search returned no results." - fi - } - - _fuzzy_edit_search_file() { - local initial_query="$1" - local selected_file - local fzf_options=() - fzf_options+=(--height "80%" --layout=reverse --preview-window right:60% --cycle) - local max_depth=5 - - if [[ -n "$initial_query" ]]; then - fzf_options+=("--query=$initial_query") - fi - - # -type f: only find files - selected_file=$(find . -maxdepth $max_depth -type f 2>/dev/null | fzf "''${fzf_options[@]}") - - if [[ -n "$selected_file" && -f "$selected_file" ]]; then - if command -v "$EDITOR" &>/dev/null; then - "$EDITOR" "$selected_file" - else - echo "EDITOR is not specified. using vim. (you can export EDITOR in ~/.zshrc)" - vim "$selected_file" - fi - else - return 1 - fi - } - - _df() { - if [[ $# -ge 1 && -e "''${@: -1}" ]]; then - duf "''${@: -1}" - else - duf - fi - } - - - alias c='clear' \ - vc='code' \ - fastfetch='fastfetch --logo-type kitty' \ - ..='cd ..' \ - ...='cd ../..' \ - .3='cd ../../..' \ - .4='cd ../../../..' \ - .5='cd ../../../../..' \ - mkdir='mkdir -p' \ - ffec='_fuzzy_edit_search_file_content' \ - ffcd='_fuzzy_change_directory' \ - ffe='_fuzzy_edit_search_file' \ - df='_df' - - # Some binds won't work on first prompt when deferred - bindkey '\e[H' beginning-of-line - bindkey '\e[F' end-of-line - - ''; - ".p10k.zsh" = { source = "${pkgs.hydenix.hyde}/Configs/.p10k.zsh"; enable = cfg.p10k.enable; @@ -313,7 +314,8 @@ in (lib.mkIf cfg.fish.enable { # Fish configs - ".config/fish/hyde_config.fish".source = "${pkgs.hydenix.hyde}/Configs/.config/fish/hyde_config.fish"; + ".config/fish/hyde_config.fish".source = + "${pkgs.hydenix.hyde}/Configs/.config/fish/hyde_config.fish"; ".config/fish/functions/df.fish".source = "${pkgs.hydenix.hyde}/Configs/.config/fish/functions/df.fish"; ".config/fish/functions/ffcd.fish".source = From d10bd82bd780d484b705885438b18c5c24c4bdf6 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 5 Aug 2025 22:25:02 -0700 Subject: [PATCH 08/12] docs: better documented first edits & hardware configuration guide - closes #135 --- README.md | 32 +++++--- TODO.md | 36 ++++----- docs/options.md | 2 +- template/README.md | 140 +++++++++++++++++++-------------- template/configuration.nix | 157 +++++++++++++++++++++++++++---------- 5 files changed, 232 insertions(+), 135 deletions(-) diff --git a/README.md b/README.md index bd4e25f3..09b2b90f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ @@ -102,14 +102,22 @@ Why Nix?: ```bash # Create a new directory and initialize the template - mkdir hydenix-config && cd hydenix-config + mkdir hydenix && cd hydenix nix flake init -t github:richen604/hydenix ``` 2. **Configure your system** - - Edit `configuration.nix` with your preferences - - Options requiring changes are marked with `! EDIT` - - *(Optional)* Review `./configuration.nix` and `./modules/hm/default.nix` for additional configuration options and overriding defaults, see [Module Options](./docs/options.md) for more information. + + Edit `configuration.nix` following the detailed comments: + + - **Required Changes:** + - Set your username (replace "hydenix" in two places) + - Set your hostname, timezone, and locale + - Configure your hardware (GPU/CPU modules) + + - **Optional:** + - Review `./modules/hm/default.nix` for home-manager options + - See [Module Options](./docs/options.md) for advanced configuration 3. **Generate hardware configuration** @@ -131,21 +139,21 @@ Why Nix?: sudo nixos-rebuild switch --flake .#nixos ``` -6. **Set user passwords** +6. **IMPORTANT: Set your password** ```bash passwd ``` - > **Important:** Change passwords for all users from the `initialPassword` set in `configuration.nix` +7. **Launch Hydenix** -### Post-Installation + Reboot and log in. -After launching Hydenix, you can generate cache for remaining themes: + After first login, generate theme cache (you only need to do this once): -```bash -hyde-shell reload -``` + ```bash + hyde-shell reload + ``` ## Running The Hydenix VM diff --git a/TODO.md b/TODO.md index d08ec8fd..25c7c918 100644 --- a/TODO.md +++ b/TODO.md @@ -1,28 +1,27 @@ -# todo / roadmap +# todo / roadmaphydenix-inputs.lib -## now / notes +## now / note -- refactor: cleaned up flake in preparation for next api update - -removed old vm builder -removed iso, closes #53 in favor of a future nixos-anywhere implementation - -- docs: improved configuration guide -- docs: better documented first edits -- docs: better hardware configuration guide, no default hardware options +- docs: options.md use hydenix.hm.theme as an example instead of hydenix.hm.hyprland +- feat: hyprland flake packages rather than nixpkgs +- feat: new themes to build - feat: move hyprlock to hyprland module, swaylock should just be swaylock module - assertion to not have both enabled -- feat: new themes to build + +- feat: update hyde ## next api update - refactor: removed hydenix.lib to standardize outputs, hydenix nixOsModules to nixosModules - fix: nix-index should be a module in hydenix only, its declared twice - fix: rename nix-index home-manager module whatever new name -- feat: hydenix follows nixpkgs, no userPkgs overlays +- feat: user now owns their nixosSystem, depreciated hydenix-nixpkgs.lib.nixosSystem +- feat: hydenix follows its own nixpkgs, no userPkgs overlays, template hydenix follows nixpkgs by default + - update docs to reflect this - feat: vscode-nix-ide part of editors, enabled by default -- feat: themes as part of hydenix flake inputs +- feat: update.sh for themes, map name to hash (check daily), passThru update.sh caller github action + - ## backlog @@ -40,14 +39,11 @@ removed iso, closes #53 in favor of a future nixos-anywhere implementation ## notes -using nixos-anywhere to install hydenix - -- must be part of the template flake or a new template flake, as it will be used for the user configuration -- document disko configuration clearly, the issue is ive never used disko -- most likely will need its own video installation guide - +- using nixos-anywhere to install hydenix: + - must be part of the template flake or a new template flake, as it will be used for the user configuration + - document disko configuration clearly, the issue is ive never used disko + - most likely will need its own video installation guide - cleanupOnDisable activation script and option - - nh by default? ## Hyde repo diff --git a/docs/options.md b/docs/options.md index 3d1afa0e..60d40d8b 100644 --- a/docs/options.md +++ b/docs/options.md @@ -7,7 +7,7 @@ ## Module Documentation -The Nix options system *is* the 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.hyprland`. diff --git a/template/README.md b/template/README.md index 18292187..e65f94f4 100644 --- a/template/README.md +++ b/template/README.md @@ -1,79 +1,101 @@ # Hydenix Template -Welcome to the Hydenix template! +Welcome to your Hydenix configuration! -This template is designed to help you get started with Hydenix. It includes a basic configuration for Hydenix and some common modules. +This template provides a self-documenting NixOS configuration with the HyDE desktop environment. -If you just templated this flake, you can follow these steps to get started: +## Quick Setup -1. edit `configuration.nix` with your preferences for hydenix - - options needing to be changed are marked with `! EDIT` - - (optional) in your template flake folder, review both `./configuration.nix` and `./modules/hm/default.nix` for more options -2. run `sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix` -3. `git init && git add .` (flakes have to be managed via git) -4. run any of the packages in your new `flake.nix` - - for rebuild, use `sudo nixos-rebuild switch --flake .` -5. DON'T FORGET: change your password for all users with `passwd` from initialPassword set in `configuration.nix` +### 1. Configure Your System -NOTE: After launching hydenix, you can run `hyde-shell reload` to generate cache for remaining themes if you want. +Edit `configuration.nix` following the detailed comments: -All module options are documented [here](https://github.com/richen604/hydenix/blob/main/docs/faq.md#What-are-the-module-options). +**Required Changes:** -Other than that, this is your own nixos configuration. You can do whatever you want with it. -Add modules, change packages, add flakes, even disable hydenix and try something else! +- Set your username (replace "hydenix" in two places) +- Set your hostname, timezone, and locale +- Configure your hardware (GPU/CPU modules) -If you have any questions, please refer to the [FAQ](https://github.com/richen604/hydenix/blob/main/docs/faq.md) or [Hydenix README](https://github.com/richen604/hydenix/blob/main/README.md). +**User Account Setup:** -You can also reach out to me on the [Hyde Discord](https://discord.gg/AYbJ9MJez7) or [Hydenix GitHub Discussions](https://github.com/richen604/hydenix/discussions). +- Find the "USER ACCOUNT SETUP" section +- Replace `"hydenix"` with your desired username (appears in 2 places) +- Choose your shell: `pkgs.zsh`, `pkgs.bash`, or `pkgs.fish` -## Upgrading +**System Settings:** + +- Set your `hostname` (computer network name) +- Set your `timezone` (run `timedatectl list-timezones` for options) +- Set your `locale` (language/region format) + +**Hardware Configuration:** -Hydenix can be upgraded, downgraded, or version locked easy. -in your template flake folder, update hydenix to main using +- Uncomment your GPU type (NVIDIA or AMD) +- Uncomment your CPU type (Intel or AMD) +- Add any additional hardware modules (laptop, SSD, high-DPI, etc.) + +**For NVIDIA users:** If you have hybrid graphics (laptop), you'll also need to: ```bash -nix flake update hydenix +# Find your GPU bus IDs: +lspci | grep VGA + +# Then set in configuration.nix: +# hardware.nvidia.prime.intelBusId = "PCI:0:2:0"; +# hardware.nvidia.prime.nvidiaBusId = "PCI:1:0:0"; +``` + +### 2. Generate Hardware Configuration + +```bash +sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix +``` + +### 3. Initialize Git Repository + +```bash +git init && git add . +``` + +### 4. Build Your System + +```bash +sudo nixos-rebuild switch --flake .#nixos ``` -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/ - # Version: github:richen604/hydenix/v1.0.0 - url = "github:richen604/hydenix"; - }; - }; +### 5. IMPORTANT: Set Your Password + +```bash +passwd ``` -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
Review Release Notes for API Changes] - C --> F[New Features
Safe to Update] - D --> G[Bug Fixes
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 +### 6. Launch Hydenix + +After first login, generate theme cache (you only need to do this once): + +```bash +hyde-shell reload +``` + +## Next Steps + +- Review `./modules/hm/default.nix` for home-manager options +- See [Module Options](https://github.com/richen604/hydenix/blob/main/docs/options.md) for advanced configuration +- Check the [FAQ](https://github.com/richen604/hydenix/blob/main/docs/faq.md) and [Troubleshooting](https://github.com/richen604/hydenix/blob/main/docs/troubleshooting.md) guides + +## Getting Help + +- [Hydenix Documentation](https://github.com/richen604/hydenix) +- [Hyde Discord](https://discord.gg/AYbJ9MJez7) +- [GitHub Discussions](https://github.com/richen604/hydenix/discussions) + +## Upgrading + +Update Hydenix: + +```bash +nix flake update hydenix +sudo nixos-rebuild switch --flake .#nixos ``` -- **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 - \ No newline at end of file +This is now your personal NixOS configuration. Add packages, customize themes, or even try other desktop environments. Enjoy the full power of Nix! diff --git a/template/configuration.nix b/template/configuration.nix index 2273a470..7ab3380c 100644 --- a/template/configuration.nix +++ b/template/configuration.nix @@ -3,8 +3,11 @@ ... }: let - # Package declaration - # --------------------- + # ======================================== + # PACKAGE CONFIGURATION + # ======================================== + # This sets up the package system with proper overlays + # Most users won't need to modify this section pkgs = import inputs.hydenix.inputs.hydenix-nixpkgs { inherit (inputs.hydenix.lib) system; @@ -20,42 +23,75 @@ let }; in { - - # Set pkgs for hydenix globally, any file that imports pkgs will use this + # Set pkgs for hydenix globally nixpkgs.pkgs = pkgs; + # ======================================== + # MODULE IMPORTS + # ======================================== imports = [ + # Required modules - don't modify unless you know what you're doing inputs.hydenix.inputs.home-manager.nixosModules.home-manager - ./hardware-configuration.nix inputs.hydenix.lib.nixOsModules - ./modules/system + ./modules/system # Your custom system modules + ./hardware-configuration.nix # Auto-generated hardware config - # === GPU-specific configurations === + # ======================================== + # HARDWARE CONFIGURATION + # ======================================== + # Uncomment the lines that match your hardware + # Run `lshw -short` or `lspci` to identify your hardware - /* - For drivers, we are leveraging nixos-hardware - Most common drivers are below, but you can see more options here: https://github.com/NixOS/nixos-hardware - */ + # ---------------------------------------- + # GPU Configuration (choose one) + # ---------------------------------------- - #! EDIT THIS SECTION - # For NVIDIA setups + # NVIDIA GPUs: + # 1. Uncomment the line below: # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-gpu-nvidia - - # For AMD setups + # + # 2. If you have hybrid graphics (laptop), also set these: + # hardware.nvidia.prime.intelBusId = "PCI:0:2:0"; # Run: lspci | grep VGA + # hardware.nvidia.prime.nvidiaBusId = "PCI:1:0:0"; # to get correct IDs + # + # 3. For newer cards, you might want open drivers: + # hardware.nvidia.open = true; + + # AMD GPUs: # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-gpu-amd - # === CPU-specific configurations === - # For AMD CPUs + # ---------------------------------------- + # CPU Configuration (choose one) + # ---------------------------------------- + + # AMD CPUs: # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-cpu-amd - # For Intel CPUs - inputs.hydenix.inputs.nixos-hardware.nixosModules.common-cpu-intel + # Intel CPUs (also enables Intel graphics): + # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-cpu-intel + + # ---------------------------------------- + # Additional Hardware Modules + # ---------------------------------------- + # Uncomment based on your system type: - # === Other common modules === - inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc - inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc-ssd + # For high-DPI displays (4K, etc.): + # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-hidpi + + # For laptops: + # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc-laptop + + # For SSD storage: + # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc-ssd + + # For HDD storage: + # inputs.hydenix.inputs.nixos-hardware.nixosModules.common-pc-hdd ]; + # ======================================== + # HOME MANAGER CONFIGURATION + # ======================================== + # This manages user-specific configurations (dotfiles, themes, etc.) home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -63,42 +99,77 @@ in inherit inputs; }; - #! EDIT THIS USER (must match users defined below) + # ---------------------------------------- + # User Configuration + # ---------------------------------------- + # REQUIRED: Change "hydenix" to your actual username + # This must match the username you define in users.users below users."hydenix" = { ... }: { imports = [ inputs.hydenix.lib.homeModules - # Nix-index-database - for comma and command-not-found + # Command-not-found and comma tool support inputs.nix-index-database.hmModules.nix-index - ./modules/hm + ./modules/hm # Your custom home-manager modules ]; }; }; - hydenix = { - enable = true; # Enable the Hydenix module + # ======================================== + # USER ACCOUNT SETUP + # ======================================== + # REQUIRED: This creates your user account + # Change "hydenix" to your desired username (must match above) + users.users.hydenix = { + isNormalUser = true; + # SECURITY: Change this password after first login with `passwd` + initialPassword = "hydenix"; - #! EDIT THESE VALUES - hostname = "hydenix"; # Change to your preferred hostname - timezone = "America/Vancouver"; # Change to your timezone - locale = "en_CA.UTF-8"; # Change to your preferred locale + # User groups (determines permissions): + extraGroups = [ + "wheel" # Sudo access (admin privileges) + "networkmanager" # Network configuration + "video" # Graphics/display access + ]; - # Visit https://github.com/richen604/hydenix/blob/main/docs/options.md for more options + # Default shell (options: pkgs.bash, pkgs.zsh, pkgs.fish) + shell = pkgs.zsh; }; - #! EDIT THESE VALUES (must match users defined above) - users.users.hydenix = { - isNormalUser = true; # Regular user account - initialPassword = "hydenix"; # Default password (CHANGE THIS after first login with passwd) - extraGroups = [ - "wheel" # For sudo access - "networkmanager" # For network management - "video" # For display/graphics access - # Add other groups as needed - ]; - shell = pkgs.zsh; # Change if you prefer a different shell + # ======================================== + # HYDENIX CONFIGURATION + # ======================================== + # Main configuration for the Hydenix desktop environment + hydenix = { + enable = true; # Enable Hydenix modules + + # ---------------------------------------- + # Basic System Settings (REQUIRED) + # ---------------------------------------- + # REQUIRED: Set your computer's network name + hostname = "hydenix"; # Change to something unique + + # REQUIRED: Set your timezone + # Examples: "America/New_York", "Europe/London", "Asia/Tokyo" + # Full list: `timedatectl list-timezones` + timezone = "America/Vancouver"; + + # REQUIRED: Set your locale/language + # Examples: "en_US.UTF-8", "en_GB.UTF-8", "de_DE.UTF-8" + locale = "en_CA.UTF-8"; + + # ---------------------------------------- + # Optional Settings + # ---------------------------------------- + # For more configuration options, see: + # https://github.com/richen604/hydenix/blob/main/docs/options.md }; + # ---------------------------------------- + # System Version + # ---------------------------------------- + # Don't change this unless you know what you're doing + # This helps with system upgrades and compatibility system.stateVersion = "25.05"; } From a235af031e3c05f63ad3cb2f59678c3ce051602a Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Tue, 5 Aug 2025 23:08:43 -0700 Subject: [PATCH 09/12] fix: animation list for hyprland --- hydenix/modules/hm/hyprland/animations.nix | 13 +++++++------ hydenix/modules/hm/hyprland/options.nix | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/hydenix/modules/hm/hyprland/animations.nix b/hydenix/modules/hm/hyprland/animations.nix index deb90882..1b008750 100644 --- a/hydenix/modules/hm/hyprland/animations.nix +++ b/hydenix/modules/hm/hyprland/animations.nix @@ -9,23 +9,24 @@ let cfg = config.hydenix.hm.hyprland; animationPresets = [ + "LimeFrenzy" "classic" "diablo-1" "diablo-2" - "dynamic" "disable" - "eevee-1" - "eevee-2" + "dynamic" + "end4" + "fast" "high" - "low-1" - "low-2" + "ja" + "me-1" + "me-2" "minimal-1" "minimal-2" "moving" "optimized" "standard" "vertical" - "LimeFrenzy" ]; in { diff --git a/hydenix/modules/hm/hyprland/options.nix b/hydenix/modules/hm/hyprland/options.nix index 474b2288..e960841e 100644 --- a/hydenix/modules/hm/hyprland/options.nix +++ b/hydenix/modules/hm/hyprland/options.nix @@ -37,23 +37,24 @@ in }; preset = lib.mkOption { type = lib.types.enum [ + "LimeFrenzy" "classic" "diablo-1" "diablo-2" - "dynamic" "disable" - "eevee-1" - "eevee-2" + "dynamic" + "end4" + "fast" "high" - "low-1" - "low-2" + "ja" + "me-1" + "me-2" "minimal-1" "minimal-2" "moving" "optimized" "standard" "vertical" - "LimeFrenzy" ]; default = "standard"; description = "Animation preset to use"; From e3a330f62396b6ea4a9751ce3f60ba85ac322022 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:38:44 -0700 Subject: [PATCH 10/12] docs: restyled and updated docs, moved docs to template/docs --- README.md | 226 +++------------- TODO.md | 43 ++- docs/options.md | 237 ----------------- docs/troubleshooting.md | 34 --- template/README.md | 114 ++------ .../docs}/assets/option-search.png | Bin template/docs/community.md | 8 + {docs => template/docs}/contributing.md | 36 +-- {docs => template/docs}/faq.md | 248 +++++++++--------- template/docs/installation.md | 68 +++++ template/docs/options.md | 239 +++++++++++++++++ template/docs/troubleshooting.md | 28 ++ template/docs/upgrading.md | 54 ++++ 13 files changed, 619 insertions(+), 716 deletions(-) delete mode 100644 docs/options.md delete mode 100644 docs/troubleshooting.md rename {docs => template/docs}/assets/option-search.png (100%) create mode 100644 template/docs/community.md rename {docs => template/docs}/contributing.md (56%) rename {docs => template/docs}/faq.md (57%) create mode 100644 template/docs/installation.md create mode 100644 template/docs/options.md create mode 100644 template/docs/troubleshooting.md create mode 100644 template/docs/upgrading.md diff --git a/README.md b/README.md index 09b2b90f..cee1f08e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -###### *
// design by t2
* -
-[![NixOS Unstable](https://img.shields.io/badge/NixOS-unstable-blue.svg?style=flat-square&logo=NixOS&logoColor=white)](https://nixos.org) -[![Release](https://img.shields.io/github/v/release/richen604/hydenix?style=flat-square)](https://github.com/richen604/hydenix/releases) -[![Last Commit](https://img.shields.io/github/last-commit/richen604/hydenix/main?style=flat-square)](https://github.com/richen604/hydenix/commits/main) - -[![Nix Flake Check](https://github.com/richen604/hydenix/actions/workflows/flake-check.yml/badge.svg?style=flat-square)](https://github.com/richen604/hydenix/actions/workflows/flake-check.yml) +[![NixOS Unstable](https://img.shields.io/badge/NixOS-unstable-ebbcba.svg?style=flat-square&logo=NixOS&logoColor=white)](https://nixos.org) +[![Release](https://img.shields.io/github/v/release/richen604/hydenix?style=flat-square&color=c79bf0)](https://github.com/richen604/hydenix/releases) +[![Last Commit](https://img.shields.io/github/last-commit/richen604/hydenix/main?style=flat-square&color=ebbcba)](https://github.com/richen604/hydenix/commits/main) +[![Nix Flake Check](https://img.shields.io/github/actions/workflow/status/richen604/hydenix/flake-check.yml?style=flat-square&color=c79bf0&label=flake%20check)](https://github.com/richen604/hydenix/actions/workflows/flake-check.yml)
@@ -16,204 +13,59 @@ - - -
- - ![hyde_banner](https://raw.githubusercontent.com/prasanthrangan/hyprdots/main/Source/assets/hyde_banner.png) + -
+

- - - -
NixOS
+
NixOS
+
-# Hydenix +# hydenix -Hydenix is a Nix & home-manager configuration for [HyDE](https://github.com/HyDE-Project/HyDE). -The nix ecosystem brings a reproducable environment to the HyDE experience; allowing for build-time configuration options, easy updates, and more. +a nixos and home-manager configuration for [HyDE](https://github.com/HyDE-Project/HyDE) -Features: +**features / why nixos? :** -- `hydenix` and `hydenix.hm` (home-manager) options for easy configuration -- Themes are fetched at build-time, for faster setup +- declarative `hydenix` and `hydenix.hm` configuration options +- leveraged module system, easily extend disable or override any module +- close feature parity with [HyDE](https://github.com/HyDE-Project/HyDE) +- every community [hyde-gallery theme](https://github.com/HyDE-Project/hyde-gallery) +- reproducible environments with easy rollbacks +- version control for your desktop -Why Nix?: +## requirements -- Reproducible environment -- Easy to manage packages, dependencies, and configurations -- changes in configuration can be rolled back easily -- home-manager for managing dotfiles +- minimal install of nixos, follow instructions on [nixos iso](https://nixos.org/download/#nixos-iso) > [!IMPORTANT] -> Experience in functional programming is recommended. -> If you are new to Nix, please refer to the [Nix Resources](docs/faq.md#how-do-i-learn-more-about-nix). -> Feel free to ask questions in discussions or discord. - ---- - -## Requirements - -- minimal install of NixOS, follow instructions on [NixOS ISO](https://nixos.org/download/#nixos-iso) -- experimental features enabled: - - ```bash - # Add to /etc/nixos/configuration.nix - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # then rebuild your system - sudo nixos-rebuild switch - ``` - -- git (`nix-shell -p git`) - ---- - -## Documentation - -- [Installation](#installation) -- [Module Options](./docs/options.md) -- [FAQ](./docs/faq.md) -- [Troubleshooting & Issues](./docs/troubleshooting.md) -- [Contributing](./docs/contributing.md) - -## Installation - -> [!CAUTION] -> The templated flake is designed for a minimal install of NixOS. Install NixOS first, then follow the instructions below. - -### Quick Start - -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 - ``` +> functional programming experience recommended.
+> new to nix? see [nix resources](./template/docs/faq.md#how-do-i-learn-more-about-nix) or ask in discussions/discord. -2. **Configure your system** +## documentation - Edit `configuration.nix` following the detailed comments: +- [installation](./template/docs/installation.md) +- [upgrading](./template/docs/upgrading.md) +- [module options](./template/docs/options.md) +- [faq](./template/docs/faq.md) +- [troubleshooting & issues](./template/docs/troubleshooting.md) +- [contributing](./template/docs/contributing.md) +- [community configs](./template/docs/community.md) +- [todo - sneak peak of whats coming soon](./TODO.md) - - **Required Changes:** - - Set your username (replace "hydenix" in two places) - - Set your hostname, timezone, and locale - - Configure your hardware (GPU/CPU modules) +## hydenix vm - - **Optional:** - - Review `./modules/hm/default.nix` for home-manager options - - See [Module Options](./docs/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 . - ``` - - > **Note:** Flakes must be managed via git - -5. **Build and switch to the new configuration** - - ```bash - sudo nixos-rebuild switch --flake .#nixos - ``` - -6. **IMPORTANT: Set your password** - - ```bash - passwd - ``` - -7. **Launch Hydenix** - - Reboot and log in. - - After first login, generate theme cache (you only need to do this once): - - ```bash - hyde-shell reload - ``` - -## Running The Hydenix VM - -If your system supports it, the NixOS VM is a great way to try out hydenix without installing it. -If you encounter issues running the VM, refer to the [virtio guide](docs/faq.md#how-do-i-run-hyprland-in-a-vm) +if your system supports it, the nixos vm is a great way to try out hydenix without installing it. +if you encounter issues running the vm, refer to the [virtio guide](./template/docs/faq.md#how-do-i-run-hyprland-in-a-vm) ```bash # 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. - -## 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/ - # 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
Review Release Notes for API Changes] - C --> F[New Features
Safe to Update] - D --> G[Bug Fixes
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 -``` +> [!NOTE] +> any changes require the vm to be rebuilt. run `rm hydenix.qcow2` to remove the old one. -- **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 + diff --git a/TODO.md b/TODO.md index 25c7c918..52c3215c 100644 --- a/TODO.md +++ b/TODO.md @@ -1,17 +1,29 @@ -# todo / roadmaphydenix-inputs.lib +# todo -## now / note +## now +- docs: restyled docs, moved docs to template/docs - docs: options.md use hydenix.hm.theme as an example instead of hydenix.hm.hyprland + +## next + - feat: hyprland flake packages rather than nixpkgs - feat: new themes to build - feat: move hyprlock to hyprland module, swaylock should just be swaylock module - assertion to not have both enabled - - feat: update hyde +- feat: update.sh for themes, map name to hash (check daily), passThru update.sh caller github action + - +- feat: vscode-nix-ide part of editors, enabled by default +- feat: hyde config.toml options +- feat: extending more options for feature parity with hyde + - fastfetch + - hyprlock + - rofi + - waybar -## next api update +## 5.0.0 - refactor: removed hydenix.lib to standardize outputs, hydenix nixOsModules to nixosModules - fix: nix-index should be a module in hydenix only, its declared twice @@ -19,18 +31,11 @@ - feat: user now owns their nixosSystem, depreciated hydenix-nixpkgs.lib.nixosSystem - feat: hydenix follows its own nixpkgs, no userPkgs overlays, template hydenix follows nixpkgs by default - update docs to reflect this -- feat: vscode-nix-ide part of editors, enabled by default -- feat: update.sh for themes, map name to hash (check daily), passThru update.sh caller github action - - ## backlog - finish demo-vm for video -- docs: documentation generation? -- feat: config.toml options -- refactor: revise module hierarchy to be more clear and concise - feat: assertions for common requirements -- feat: spicetify theme support? flatpak? - chore: review bug template to make it more clear (easier with scripts?) ## future @@ -45,16 +50,6 @@ - most likely will need its own video installation guide - cleanupOnDisable activation script and option - nh by default? - -## Hyde repo - -- theme makers should be able to precache walls before patching - - requires arch vm (w/ commit hash param and snapshot functionality) - - hyde-theme-starter to implement /lib with swwwallcache and wallbash - - whatever generates dcols and wallcaches - - hyde repo themepatcher implement reading for .cache in theme to cp cache and skip - - validation - - themepatcher should still generate on missing cache per wall - - PR's for all themes to bring cache - - hydenix implementation (just home.file mutable) - - FUTURE: wallbash should be a seperate lib +- docs: documentation generation? +- refactor: revise module hierarchy to be more clear and concise? +- feat: spicetify theme support? flatpak? diff --git a/docs/options.md b/docs/options.md deleted file mode 100644 index 60d40d8b..00000000 --- a/docs/options.md +++ /dev/null @@ -1,237 +0,0 @@ -# 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.hyprland`. - -The easiest way is to search the GitHub repo for the options: - -[search for `hydenix.hm.hyprland`](https://github.com/richen604/hydenix/search?q=hydenix.hm.hyprland) - -You'll see the options in the search results, something like this: - -![options search example](./assets/option-search.png) - -Click on the file to see the actual options definition, which looks something like this: - -```nix - options.hydenix.hm.hyprland = { - enable = lib.mkOption { - type = lib.types.bool; - default = config.hydenix.hm.enable; - description = "Enable hyprland module"; - }; - - extraConfig = lib.mkOption { - type = lib.types.lines; - default = ""; - description = "Extra config for hyprland"; - }; - }; -``` - -Notice that `extraConfig` has type `lines`, which means it accepts multiline strings. -So you'd configure it like this: - -```nix -hydenix.hm.hyprland.extraConfig = '' - # hyprland.conf - windowrule = float, ^(.*) -'' -``` - -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 will be the default options for hydenix. - -```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 - theme = "Candy" # or "Corners" - }; - system.enable = true; # enable system module - - #! Home Manager hydenix options - hm = { - enable = true; # enable home-manager module - #! Below are defaults - 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.enable = 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"; # animation preset: "classic", "diablo-1", "diablo-2", "dynamic", "disable", "eevee-1", "eevee-2", "high", "low-1", "low-2", "minimal-1", "minimal-2", "moving", "optimized", "standard", "vertical", "LimeFrenzy" - extraConfig = ""; # additional animation configuration - overrides = { }; # override specific animation files by name - }; - # Shader configurations - shaders = { - enable = true; # enable shader configurations - overrides = { }; # override or add custom shaders - }; - # Workflow configurations - workflows = { - enable = true; # enable workflow configurations - active = "default"; # active workflow preset: "default", "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) - }; - # 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 - }; - }; -} diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md deleted file mode 100644 index a2a1ba56..00000000 --- a/docs/troubleshooting.md +++ /dev/null @@ -1,34 +0,0 @@ -# Troubleshooting & Issues - -## Nix errors - -Nix errors can be tricky to diagnose, but the following information is required when creating an issue, please provide as much as possible. - -> [!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" - ``` - -3. **Configuration** - - Must have a github repo with your templated flake - -> [!NOTE] -> Custom modules and configurations have limited support. diff --git a/template/README.md b/template/README.md index e65f94f4..bede3be6 100644 --- a/template/README.md +++ b/template/README.md @@ -1,101 +1,33 @@ -# Hydenix Template +
-Welcome to your Hydenix configuration! +
NixOS
-This template provides a self-documenting NixOS configuration with the HyDE desktop environment. +# your nixos configuration -## Quick Setup +This is now your personal NixOS configuration.
+Add packages, customize themes, or even disable hydenix and setup your own wm/de.
+Enjoy the full power of Nix!
-### 1. Configure Your System +## documentation -Edit `configuration.nix` following the detailed comments: +- [installation](./docs/installation.md) +- [module options](./docs/options.md) +- [faq](./docs/faq.md) +- [troubleshooting & issues](./docs/troubleshooting.md) +- [upgrading](./docs/upgrading.md) +- [contributing](./docs/contributing.md) +- [community configs](./docs/community.md) -**Required Changes:** +## next steps -- Set your username (replace "hydenix" in two places) -- Set your hostname, timezone, and locale -- Configure your hardware (GPU/CPU modules) +- to learn more about nix, see [nix resources](./docs/faq.md#how-do-i-learn-more-about-nix) +- see [module options](./docs/options.md) for configuration +- check the [faq](./docs/faq.md) and [troubleshooting](./docs/troubleshooting.md) guides -**User Account Setup:** +## getting help -- Find the "USER ACCOUNT SETUP" section -- Replace `"hydenix"` with your desired username (appears in 2 places) -- Choose your shell: `pkgs.zsh`, `pkgs.bash`, or `pkgs.fish` +- [hydenix issues](https://github.com/richen604/hydenix/issues) +- [hydenix discussions](https://github.com/richen604/hydenix/discussions) +- [hyde discord](https://discord.gg/AYbJ9MJez7) -**System Settings:** - -- Set your `hostname` (computer network name) -- Set your `timezone` (run `timedatectl list-timezones` for options) -- Set your `locale` (language/region format) - -**Hardware Configuration:** - -- Uncomment your GPU type (NVIDIA or AMD) -- Uncomment your CPU type (Intel or AMD) -- Add any additional hardware modules (laptop, SSD, high-DPI, etc.) - -**For NVIDIA users:** If you have hybrid graphics (laptop), you'll also need to: - -```bash -# Find your GPU bus IDs: -lspci | grep VGA - -# Then set in configuration.nix: -# hardware.nvidia.prime.intelBusId = "PCI:0:2:0"; -# hardware.nvidia.prime.nvidiaBusId = "PCI:1:0:0"; -``` - -### 2. Generate Hardware Configuration - -```bash -sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix -``` - -### 3. Initialize Git Repository - -```bash -git init && git add . -``` - -### 4. Build Your System - -```bash -sudo nixos-rebuild switch --flake .#nixos -``` - -### 5. IMPORTANT: Set Your Password - -```bash -passwd -``` - -### 6. Launch Hydenix - -After first login, generate theme cache (you only need to do this once): - -```bash -hyde-shell reload -``` - -## Next Steps - -- Review `./modules/hm/default.nix` for home-manager options -- See [Module Options](https://github.com/richen604/hydenix/blob/main/docs/options.md) for advanced configuration -- Check the [FAQ](https://github.com/richen604/hydenix/blob/main/docs/faq.md) and [Troubleshooting](https://github.com/richen604/hydenix/blob/main/docs/troubleshooting.md) guides - -## Getting Help - -- [Hydenix Documentation](https://github.com/richen604/hydenix) -- [Hyde Discord](https://discord.gg/AYbJ9MJez7) -- [GitHub Discussions](https://github.com/richen604/hydenix/discussions) - -## Upgrading - -Update Hydenix: - -```bash -nix flake update hydenix -sudo nixos-rebuild switch --flake .#nixos -``` - -This is now your personal NixOS configuration. Add packages, customize themes, or even try other desktop environments. Enjoy the full power of Nix! +
diff --git a/docs/assets/option-search.png b/template/docs/assets/option-search.png similarity index 100% rename from docs/assets/option-search.png rename to template/docs/assets/option-search.png diff --git a/template/docs/community.md b/template/docs/community.md new file mode 100644 index 00000000..6a9fe221 --- /dev/null +++ b/template/docs/community.md @@ -0,0 +1,8 @@ +# 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. diff --git a/docs/contributing.md b/template/docs/contributing.md similarity index 56% rename from docs/contributing.md rename to template/docs/contributing.md index 04af45b1..e3a0f6dd 100644 --- a/docs/contributing.md +++ b/template/docs/contributing.md @@ -1,16 +1,16 @@ -# Contributing +# contributing -This project uses [direnv](https://direnv.net/) for pre-commit hooks. Please install it first: +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` +- **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) +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: +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 @@ -20,7 +20,7 @@ type(optional-scope): subject [optional footer(s)] ``` -Where: +where: - **type** must be one of: - `feat`: A new feature @@ -41,23 +41,23 @@ Where: - not end with a period - be descriptive -Examples: +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 +## 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 +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 +## changelog -The changelog is automatically generated from commit messages. Clear, well-formatted commit messages ensure your changes are properly documented. +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/). +for more details, see the [conventional commits specification](https://www.conventionalcommits.org/). diff --git a/docs/faq.md b/template/docs/faq.md similarity index 57% rename from docs/faq.md rename to template/docs/faq.md index f8c23e80..840593bc 100644 --- a/docs/faq.md +++ b/template/docs/faq.md @@ -1,41 +1,41 @@ -# 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) +# 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) - [`error: hash mismatch in fixed-output derivation`](#error-hash-mismatch-in-fixed-output-derivation) - [`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. + - [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. -### How do I learn more about Nix? +### 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: +> 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 +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) +- [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) -## Hydenix FAQ +## hydenix FAQ -### How do I upgrade Hydenix? +### how do I upgrade hydenix? -Hydenix can be upgraded, downgraded, or version locked easy. +hydenix can be upgraded, downgraded, or version locked easy. in your template flake folder, update hydenix to main using ```bash @@ -92,16 +92,16 @@ inputs = { run `nix flake update hydenix` again to load the update, then rebuild your system to apply the changes -### When should I upgrade? +### when should I upgrade? ```mermaid graph TD - A[v2.3.1] --> B[MAJOR] - A --> C[MINOR] - A --> D[PATCH] - B --> E[Breaking Changes
Review Release Notes for API Changes] - C --> F[New Features
Safe to Update] - D --> G[Bug Fixes
Safe to Update] + A[v2.3.1] --> B[major] + A --> C[minor] + A --> D[patch] + B --> E[breaking changes
review release notes for api changes] + C --> F[new features
safe to update] + D --> G[bug fixes
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 @@ -112,22 +112,22 @@ graph TD 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 +- **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)? +### 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). +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 +### common errors #### `error: hash mismatch in fixed-output derivation` -This error occurs when Nix expects a specific hash for a downloaded file, but the actual file has a different hash due to upstream changes. +this error occurs when nix expects a specific hash for a downloaded file, but the actual file has a different hash due to upstream changes. -These usually happen with themes as they are updated frequently. +these usually happen with themes as they are updated frequently. Example: @@ -137,19 +137,19 @@ error: hash mismatch in fixed-output derivation '/nix/store/2s2n054di1wg8d3sw50w got: sha256-HHC15pPHJ+ylQ56yYysEoKjKYUAoye2WHmt4Q2vyffk= ``` -**Solution: Override the package in configuration.nix** +**solution: override the package in configuration.nix** -If I haven't updated this in the repo yet, add this overlay to your existing overlays in `configuration.nix` to fix the error: +if I haven't updated this in the repo yet, add this overlay to your existing overlays in `configuration.nix` to fix the error: ```nix overlays = [ inputs.hydenix.lib.overlays - # Fix hash mismatch errors for Catppuccin Mocha + # fix hash mismatch errors for catppuccin mocha (final: prev: { - # Replace 'hydenix.themes."Catppuccin Mocha"' with the actual failing package, for theme names check https://github.com/richen604/hydenix/blob/main/hydenix/sources/themes/default.nix + # replace 'hydenix.themes."catppuccin mocha"' with the actual failing package, for theme names check https://github.com/richen604/hydenix/blob/main/hydenix/sources/themes/default.nix hydenix.themes."Catppuccin Mocha" = prev.hydenix.themes."Catppuccin Mocha".overrideAttrs (oldAttrs: { src = prev.fetchFromGitHub { - # Use the hash from error message under "got:" + # use the hash from error message under "got:" sha256 = "HHC15pPHJ+ylQ56yYysEoKjKYUAoye2WHmt4Q2vyffk="; }; }); @@ -164,17 +164,17 @@ overlays = [ #### `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. +this error occurs when home-manager tries to manage a file that already exists and wasn't created by home-manager. -Example: +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)** +**solution 1: remove existing files (recommended)** -Remove the conflicting files and let home-manager recreate them: +remove the conflicting files and let home-manager recreate them: ```bash # Remove the specific file @@ -184,9 +184,9 @@ rm ~/.config/kitty/kitty.conf rm -rf ~/.config/kitty/ ``` -**Solution 2: Backup existing files** +**solution 2: backup existing files** -If you want to preserve your existing configuration: +if you want to preserve your existing configuration: ```bash # Create backup @@ -196,9 +196,9 @@ mv ~/.config/kitty/kitty.conf ~/.config/kitty/kitty.conf.backup sudo nixos-rebuild switch ``` -**Solution 3: Force home-manager to backup automatically** +**solution 3: force home-manager to backup automatically** -Add this to your `configuration.nix` to automatically backup conflicting files: +add this to your `configuration.nix` to automatically backup conflicting files: ```nix { @@ -206,22 +206,22 @@ Add this to your `configuration.nix` to automatically backup conflicting files: } ``` -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. +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 +> 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? +### what are the module options? Visit [options.md](./options.md) for more information on the module options. -### What if I want to customize hydenix? +### 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. +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. +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. +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. -### What are some example configurations? - -Here's a list, feel free to make a PR to add your own! +### what are some example configurations? -- [richen604/richendots](https://github.com/richen604/richendots) +see [community configs](./community.md) for examples. -### How do I persist changes on reboot/rebuild/etc? +### how do I persist changes on reboot/rebuild/etc? > [!IMPORTANT] -> Do not edit any mutable files at runtime as they will be overwritten on rebuild
-> All edits must be done in your flake via nixos & home-manager options +> do not edit any mutable files at runtime as they may be overwritten on rebuild
+> all edits must be done in your flake via nixos & home-manager options -Some state files in HyDE are mutable by design. This allows certain theme changes during runtime. +some state files in hydenix are mutable by design. this allows certain theme changes during runtime. -Example: +example: -Lets say you have the default theme set to `Catppuccin Mocha` in `hydenix.hm.theme.active`. +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`. +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 { @@ -256,7 +254,7 @@ Your config is unchanged so when you reboot/relog/rebuild, the theme will revert } ``` -Simply change the theme in your config to match your desired theme and rebuild. +simply change the theme in your config to match your desired theme and rebuild. ```nix { @@ -264,7 +262,7 @@ Simply change the theme in your config to match your desired theme and rebuild. } ``` -But what about file you want to stop from reverting? waybar position or kitty config? +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 @@ -293,24 +291,24 @@ see [home.file options](https://home-manager-options.extranix.com/?query=home.fi -### How do I add a new theme? +### how do I add a new theme? -### What is mutable.nix? +### what is mutable.nix? > [!IMPORTANT] -> Do not edit any mutable files at runtime as they will be overwritten on rebuild
-> All edits must be done in your flake via nixos & home-manager options +> do not edit any mutable files at runtime as they may be overwritten on rebuild
+> 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: +`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 +- 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: +example usage in scripts: ```nix home.activation = { @@ -320,7 +318,7 @@ home.activation = { } ``` -Credit: [@piousdeer](https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa) +credit: [@piousdeer](https://gist.github.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa) -### Why do themes still show after I remove them from `hydenix.hm.theme.themes`? +### 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. +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. -### Requesting features +### requesting features -Please open a [feature request](https://github.com/richen604/hydenix/issues/new?template=feature_request.md) if you have any feature requests. +please open a [feature request](https://github.com/richen604/hydenix/issues/new?template=feature_request.md) if you have any feature requests. -## Other FAQ +## other faq -### How do I run Hyprland in a VM? +### 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) +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 +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 .` +non-nixos hosts should run with [nixGL](https://github.com/nix-community/nixGL) eg `nixGL nix run .`
-Hardware Requirements +hardware requirements CPU - Intel CPU with VT-x or AMD CPU with AMD-V @@ -378,7 +376,7 @@ GPU
-1. Install Drivers +1. install drivers ```bash # Nvidia @@ -424,7 +422,7 @@ modprobe kvm_intel # or kvm_amd
-2. Verify Setup +2. verify setup ```bash # Verify KVM support @@ -440,11 +438,11 @@ glxinfo | grep "OpenGL"
-3. Setup the VM +3. setup the vm -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. +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: +additionally, the following qemu options have been found to be successful: ```bash -device virtio-vga-gl diff --git a/template/docs/installation.md b/template/docs/installation.md new file mode 100644 index 00000000..3d97a6f2 --- /dev/null +++ b/template/docs/installation.md @@ -0,0 +1,68 @@ +# 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: + + - **required changes:** + - set your username (replace "hydenix" in two places) + - set your hostname, timezone, and locale + - configure your hardware (gpu/cpu modules) + + - **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 . + ``` + + > [!NOTE] + > 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 .#nixos + ``` + + > [!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 + > - ask in [discord](https://discord.gg/AYbJ9MJez7) or [github discussions](https://github.com/richen604/hydenix/discussions) + +6. **important: set your password** + + ```bash + passwd + ``` + +7. **launch hydenix** + + reboot and log in. + + after first login, generate theme cache (you only need to do this once): + + ```bash + hyde-shell reload + ``` diff --git a/template/docs/options.md b/template/docs/options.md new file mode 100644 index 00000000..221835b0 --- /dev/null +++ b/template/docs/options.md @@ -0,0 +1,239 @@ +# 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.hyprland`. + +the easiest way is to search the GitHub repo for the options: + +[search for `hydenix.hm.hyprland`](https://github.com/richen604/hydenix/search?q=hydenix.hm.hyprland) + +you'll see the options in the search results, something like this: + +![options search example](./assets/option-search.png) + +click on the file to see the actual options definition, which looks something like this: + +```nix + options.hydenix.hm.hyprland = { + enable = lib.mkOption { + type = lib.types.bool; + default = config.hydenix.hm.enable; + description = "Enable hyprland module"; + }; + + extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = "Extra config for hyprland"; + }; + }; +``` + +notice that `extraConfig` has type `lines`, which means it accepts multiline strings. +so you'd configure it like this: + +```nix +hydenix.hm.hyprland.extraConfig = '' + # hyprland.conf + windowrule = float, ^(.*) +'' +``` + +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 + theme = "Candy" # or "Corners" + }; + 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.enable = 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"; # animation preset: "classic", "diablo-1", "diablo-2", "dynamic", "disable", "eevee-1", "eevee-2", "high", "low-1", "low-2", "minimal-1", "minimal-2", "moving", "optimized", "standard", "vertical", "LimeFrenzy" + extraConfig = ""; # additional animation configuration + overrides = { }; # override specific animation files by name + }; + # Shader configurations + shaders = { + enable = true; # enable shader configurations + overrides = { }; # override or add custom shaders + }; + # Workflow configurations + workflows = { + enable = true; # enable workflow configurations + active = "default"; # active workflow preset: "default", "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) + }; + # 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 + }; + }; +} diff --git a/template/docs/troubleshooting.md b/template/docs/troubleshooting.md new file mode 100644 index 00000000..850981e5 --- /dev/null +++ b/template/docs/troubleshooting.md @@ -0,0 +1,28 @@ +# 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" + ``` diff --git a/template/docs/upgrading.md b/template/docs/upgrading.md new file mode 100644 index 00000000..319b0f32 --- /dev/null +++ b/template/docs/upgrading.md @@ -0,0 +1,54 @@ +# 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/ + # 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
review release notes for api changes] + C --> F[new features
safe to update] + D --> G[bug fixes
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 +``` + +
+ +> [!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 From 6da0fc99281339893cfae261578695738dc73f51 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:45:46 -0700 Subject: [PATCH 11/12] docs: testing video embed --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index cee1f08e..36bf0ebe 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,7 @@ - +https://github.com/user-attachments/assets/7f8fadc8-e293-4482-a851-e9c6464f5265
From 599825f4f82f8adf164cd453fdb9be5088b1f4c9 Mon Sep 17 00:00:00 2001 From: richen604 <56615615+richen604@users.noreply.github.com> Date: Wed, 6 Aug 2025 20:22:43 -0700 Subject: [PATCH 12/12] docs: further restyling and updates to docs --- README.md | 16 ++++---- template/README.md | 67 ++++++++++++++++++++++++-------- template/docs/community.md | 2 + template/docs/contributing.md | 2 + template/docs/faq.md | 2 + template/docs/installation.md | 34 +++++++--------- template/docs/options.md | 13 ++++--- template/docs/troubleshooting.md | 2 + template/docs/upgrading.md | 2 + template/flake.nix | 5 +-- 10 files changed, 92 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 36bf0ebe..59db0125 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,19 @@
- -https://github.com/user-attachments/assets/7f8fadc8-e293-4482-a851-e9c6464f5265 + +
-
+ -
NixOS
+
+ +NixOS + # hydenix a nixos and home-manager configuration for [HyDE](https://github.com/HyDE-Project/HyDE) @@ -64,5 +65,4 @@ nix run github:richen604/hydenix > [!NOTE] > any changes require the vm to be rebuilt. run `rm hydenix.qcow2` to remove the old one. - diff --git a/template/README.md b/template/README.md index bede3be6..b8df57e6 100644 --- a/template/README.md +++ b/template/README.md @@ -1,22 +1,59 @@ -
+NixOS -
NixOS
+# hydenix template flake -# your nixos configuration +This is now your personal NixOS configuration.\ +Add packages, customize themes, or even disable hydenix and setup your own wm/de.\ +Enjoy the full power of Nix! -This is now your personal NixOS configuration.
-Add packages, customize themes, or even disable hydenix and setup your own wm/de.
-Enjoy the full power of Nix!
+visit the [docs/installation.md](./docs/installation.md) to get started. -## documentation +## file structure -- [installation](./docs/installation.md) -- [module options](./docs/options.md) -- [faq](./docs/faq.md) -- [troubleshooting & issues](./docs/troubleshooting.md) -- [upgrading](./docs/upgrading.md) -- [contributing](./docs/contributing.md) -- [community configs](./docs/community.md) +### core configuration files + +| file | description | +|------|-------------| +| `flake.nix` | main flake configuration and entry point | +| `configuration.nix` | nixos system configuration | +| `hardware-configuration.nix` | hardware-specific settings (auto-generated) | + +### documentation + +| file | purpose | +|------|---------| +| [`docs/installation.md`](./docs/installation.md) | installation guide and setup instructions | +| [`docs/options.md`](./docs/options.md) | available module configuration options | +| [`docs/faq.md`](./docs/faq.md) | frequently asked questions and solutions | +| [`docs/troubleshooting.md`](./docs/troubleshooting.md) | common issues and fixes | +| [`docs/upgrading.md`](./docs/upgrading.md) | how to upgrade your configuration | +| [`docs/contributing.md`](./docs/contributing.md) | guidelines for contributing | +| [`docs/community.md`](./docs/community.md) | community configurations and examples | + +### write your own modules + +> **note:** Use these directories to override or extend hydenix modules with your custom configurations. + +| directory | type | purpose | +|-----------|------|---------| +| `modules/hm/` | home manager | custom home-manager module definitions (and for `hydenix.hm` options) | +| `modules/system/` | nixos system | custom system-level module definitions (and for `hydenix` options) | + +### directory tree + +```bash +hydenix/ +├── README.md +├── flake.nix +├── configuration.nix +├── hardware-configuration.nix +├── docs/ +│ ├── *.md files +│ └── assets/ +└── modules/ + ├── hm/default.nix + └── system/default.nix +``` ## next steps @@ -29,5 +66,3 @@ Enjoy the full power of Nix!
- [hydenix issues](https://github.com/richen604/hydenix/issues) - [hydenix discussions](https://github.com/richen604/hydenix/discussions) - [hyde discord](https://discord.gg/AYbJ9MJez7) - -
diff --git a/template/docs/community.md b/template/docs/community.md index 6a9fe221..de3b2545 100644 --- a/template/docs/community.md +++ b/template/docs/community.md @@ -1,3 +1,5 @@ +NixOS + # hydenix community here are a list of community configs using hydenix. diff --git a/template/docs/contributing.md b/template/docs/contributing.md index e3a0f6dd..b4ef459f 100644 --- a/template/docs/contributing.md +++ b/template/docs/contributing.md @@ -1,3 +1,5 @@ +NixOS + # contributing this project uses [direnv](https://direnv.net/) for pre-commit hooks. please install it first: diff --git a/template/docs/faq.md b/template/docs/faq.md index 840593bc..606ecf06 100644 --- a/template/docs/faq.md +++ b/template/docs/faq.md @@ -1,3 +1,5 @@ +NixOS + # faq ## general FAQ diff --git a/template/docs/installation.md b/template/docs/installation.md index 3d97a6f2..323b6fb4 100644 --- a/template/docs/installation.md +++ b/template/docs/installation.md @@ -1,3 +1,5 @@ +NixOS + # installation > [!CAUTION] @@ -15,13 +17,7 @@ edit `configuration.nix` following the detailed comments: - - **required changes:** - - set your username (replace "hydenix" in two places) - - set your hostname, timezone, and locale - - configure your hardware (gpu/cpu modules) - - - **optional:** - - see [module options](./options.md) for advanced configuration + - **optional:** see [module options](./options.md) for advanced configuration 3. **generate hardware configuration** @@ -35,13 +31,12 @@ git init && git add . ``` - > [!NOTE] - > we do this because flakes must be managed via git. and its good practice to version control your configuration + 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 .#nixos + sudo nixos-rebuild switch --flake .#hydenix ``` > [!NOTE] @@ -49,19 +44,20 @@ > - 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 - > - ask in [discord](https://discord.gg/AYbJ9MJez7) or [github discussions](https://github.com/richen604/hydenix/discussions) - -6. **important: set your password** + > - please don't hesitate to ask in [discord](https://discord.gg/AYbJ9MJez7) or [github discussions](https://github.com/richen604/hydenix/discussions)! - ```bash - passwd - ``` - -7. **launch hydenix** +6. **launch hydenix** reboot and log in. - after first login, generate theme cache (you only need to do this once): + > [!IMPORTANT] + > do not forget to set your password + > + > ```bash + > passwd + > ``` + + you can generate the theme cache with the below: ```bash hyde-shell reload diff --git a/template/docs/options.md b/template/docs/options.md index 221835b0..5e7a1b84 100644 --- a/template/docs/options.md +++ b/template/docs/options.md @@ -1,3 +1,6 @@ + +NixOS + # hydenix options - [hydenix options](#hydenix-options) @@ -7,11 +10,9 @@ ## 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.hyprland`. - -the easiest way is to search the GitHub repo for the options: +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.hyprland`.\ +the easiest way is to search the github repo for the options: [search for `hydenix.hm.hyprland`](https://github.com/richen604/hydenix/search?q=hydenix.hm.hyprland) @@ -134,7 +135,7 @@ below are the default options for hydenix. they are in *object format* and any o # Animation configurations animations = { enable = true; # enable animation configurations - preset = "standard"; # animation preset: "classic", "diablo-1", "diablo-2", "dynamic", "disable", "eevee-1", "eevee-2", "high", "low-1", "low-2", "minimal-1", "minimal-2", "moving", "optimized", "standard", "vertical", "LimeFrenzy" + preset = "standard"; # animation preset: "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 }; diff --git a/template/docs/troubleshooting.md b/template/docs/troubleshooting.md index 850981e5..3a8baeb6 100644 --- a/template/docs/troubleshooting.md +++ b/template/docs/troubleshooting.md @@ -1,3 +1,5 @@ +NixOS + # troubleshooting & issues ## nix errors diff --git a/template/docs/upgrading.md b/template/docs/upgrading.md index 319b0f32..9dd089c3 100644 --- a/template/docs/upgrading.md +++ b/template/docs/upgrading.md @@ -1,3 +1,5 @@ +NixOS + # upgrading hydenix can be upgraded, downgraded, or version locked easy. diff --git a/template/flake.nix b/template/flake.nix index 2f1fa506..125f1e9d 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -25,8 +25,6 @@ outputs = { ... }@inputs: let - HOSTNAME = "hydenix"; - hydenixConfig = inputs.hydenix.inputs.hydenix-nixpkgs.lib.nixosSystem { inherit (inputs.hydenix.lib) system; specialArgs = { @@ -39,7 +37,6 @@ in { - nixosConfigurations.nixos = hydenixConfig; - nixosConfigurations.${HOSTNAME} = hydenixConfig; + nixosConfigurations.hydenix = hydenixConfig; }; }