A Home Manager module for Yazelix that declaratively manages the package-ready runtime surface alongside yazelix.toml.
- Generates
yazelix.tomlfrom Home Manager options - Adds
yzxto the Home Manager profile through the packaged Yazelix runtime - Installs icons and a desktop entry that target the managed runtime
- Keeps the config surface type-safe with Home Manager validation
- Does not require or manage a live Yazelix git clone for normal usage
- Does not replace Nix itself; you still need a flake-enabled Nix install
- Does not install a separate host/global Nushell for your everyday shell usage
- Does not auto-enter a Yazelix shell on
home-manager switch - Does not manage or require host shell-hook injection for the Home Manager profile
yzxpath
If you want a copyable starting point, begin with examples/minimal_flake
That example uses a repo-local path:../../.. Yazelix input so it stays buildable inside this repository; when copying it into your own setup, replace that line with github:luccahuguet/yazelix
Add this to your flake.nix inputs:
{
inputs = {
# ... your existing inputs
yazelix-hm = {
url = "github:luccahuguet/yazelix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { home-manager, yazelix-hm, ... }: {
homeConfigurations.your-user = home-manager.lib.homeManagerConfiguration {
modules = [
yazelix-hm.homeManagerModules.default
# ... your other modules
];
};
};
}This example assumes you use Home Manager with flakes.
It pins the Home Manager module from the top-level Yazelix flake instead of the old ?dir=home_manager subflake path.
If you already have your own Home Manager flake, the minimal setup is:
# ~/.config/home-manager/home.nix (or wherever your HM config is)
{
programs.yazelix = {
enable = true;
# Customize other options as needed - see example.nix
};
}Run:
home-manager switchThis creates:
- the
yzxcommand in your Home Manager profile, typically~/.nix-profile/bin/yzx ~/.config/yazelix/user_configs/yazelix.toml- a Home Manager profile desktop entry, typically
~/.nix-profile/share/applications/yazelix.desktop
Then open a fresh shell and run:
yzx launchFor a Home Manager-owned Yazelix install, use:
yzx update home_managerThat command prints the exact nix flake update yazelix command it runs in the current flake directory, then prints home-manager switch for you to copy and run yourself.
Do not mix this with yzx update upstream for the same installed Yazelix runtime.
After home-manager switch, fresh launches use the profile-owned yzx wrapper. Already-open Yazelix windows keep running their current live runtime until you explicitly relaunch them or run yzx restart; there is no invisible hot-swap of live sessions.
For maintainer workflows, a cloned repo is still useful. Normal Home Manager usage should not depend on treating ~/.config/yazelix as a live repo checkout.
Manual validation on April 8, 2026 covered both a lived-in account and a throwaway clean-room Home Manager activation.
- Home Manager owns the profile-provided
yzxcommand and the generateduser_configs/TOML files through symlinks into the Home Manager profile. - The managed
yzxcommand resolves through the Home Manager profile, typically~/.nix-profile/bin/yzx, rather than through a legacy user-local wrapper path. - The active runtime root resolves directly from the packaged Yazelix runtime in the Home Manager profile/store path, not through a manual-install runtime symlink.
- The Home Manager desktop entry comes from the Home Manager profile, typically
~/.nix-profile/share/applications/yazelix.desktop, rather than fromyzx desktop install. - A stale legacy
~/.local/bin/yzxwrapper can still shadow the profile-owned command onPATHafter migration; archive it withyzx home_manager prepare --applyor remove it manually soyzxresolves to the Home Manager profile path. - Old manual desktop-entry files under
~/.local/share/applications/can linger after migration; they are not Home Manager-owned and will shadow the Home Manager profile entry until you remove them. - Host shell hooks are optional for the Home Manager path. Launch through
yzxor the Home Manager desktop entry; do not expecthome-manager switchto rewrite.bashrcor~/.config/nushell/config.nu.
Migration note for older setups:
- Replace
github:luccahuguet/yazelix?dir=home_managerwithgithub:luccahuguet/yazelixin your Home Manager flake inputs. - Profile installs use
yzx update upstream; Home Manager installs useyzx update home_manager.
- Use examples/minimal_flake for a real minimal flake you can copy and adapt
- Use examples/example.nix for a comprehensive option surface example
-
Backup your current configuration:
cp ~/.config/yazelix/user_configs/yazelix.toml ~/.config/yazelix/user_configs/yazelix.toml.backup
-
Configure the Home Manager module (see example.nix)
-
Prepare the existing manual install for takeover:
yzx home_manager prepare yzx home_manager prepare --apply
The prepare command archives the common manual-install takeover blockers and handoff cleanup paths:
~/.config/yazelix/user_configs/yazelix.toml~/.local/bin/yzxwhen it is the legacy Yazelix manual wrapper~/.local/share/applications/com.yazelix.Yazelix.desktop~/.local/share/icons/hicolor/*/apps/yazelix.png
- Apply the Home Manager configuration:
home-manager switch
If Home Manager still reports an unexpected unmanaged-file collision outside those paths, home-manager switch -b hm-backup remains a fallback aid. It is no longer the primary Yazelix migration story.
-
Verify the Home Manager-owned surfaces:
readlink -f ~/.nix-profile/bin/yzx ls ~/.nix-profile/share/applications/yazelix.desktop yzx --version-short
-
Launch Yazelix:
yzx launch
-
Disable the module:
programs.yazelix.enable = false;
-
Apply the change:
home-manager switch
-
Restore manual config: recreate
~/.config/yazelix/user_configs/yazelix.tomlfrom your backup or from the shipped default template in the Yazelix package/repo you install manually.
- File collision detection - Uses Home Manager's built-in collision prevention
- Atomic changes - Configuration changes are atomic via Home Manager
- Easy rollback - Disable module to revert to manual configuration
- No repository management requirement - Normal usage does not depend on a live Yazelix git repository
- Check that
~/.config/yazelix/user_configs/yazelix.tomlwas created - Check that
~/.nix-profile/bin/yzxexists and that your Home Manager profile bin dir is on yourPATH - Check that
~/.nix-profile/share/applications/yazelix.desktopexists if you expect desktop-launcher integration through Home Manager - Verify Home Manager configuration syntax
- Run
home-manager switchto apply changes
- Existing manual Yazelix files can cause
home-manager switchto stop with collision errors - Prefer
yzx home_manager prepare --applybefore the first takeover - The most common collision paths are the generated TOML files under
~/.config/yazelix/user_configs/ home-manager switch -b hm-backupis now the fallback aid if you still hit an unexpected unmanaged-file collision after the prepare step- See example.nix to recreate your settings declaratively instead of editing the generated TOML files directly
- Yazelix launchers use the runtime-local Nushell shipped with the managed runtime
- You do not need to add
nushelltohome.packagesjust to make Yazelix launch - If you want Nushell as your normal interactive shell outside Yazelix, install it separately in your own Home Manager config
- Home Manager does not rewrite your personal Bash or Nushell startup files for Yazelix; the profile-provided
yzxcommand works without those host-shell hooks
- If you use Home Manager with flakes, check that the
yazelix-hminput reference is correct in your ownflake.nix - Ensure the module is properly imported in your Home Manager configuration
To work on this module:
cd /path/to/cloned/yazelix
nix developUse the repo root environment and your preferred Nix formatting/lint tools as needed.
This module follows Yazelix's configuration structure defined in yazelix_default.toml. When adding new options:
- Add the option to both
yazelix_default.tomland this module - Update the examples and documentation
- Test with both new and existing Yazelix installations
- Ensure type safety and proper defaults