Search Suggest

How to Install End-4 (illogical-impulse) on NixOS

Install End-4 (illogical-impulse) Hyprland dotfiles on NixOS with flakes and Home Manager. Download three .nix files, set your username, and rebuild.
Install End-4 Hyprland Dotfiles on NixOS

Combining End-4’s modern Hyprland interface with the atomic stability of NixOS gives you the ultimate desktop setup. Here is the step-by-step walkthrough to install End4 dotfiles on NixOS cleanly.

This guide is part of the MusaBase Linux and Hyprland Series. For a complete overview, see Best Hyprland Dotfiles 2026: HyDE vs JaKooLit vs ML4W vs Caelestia (Tested).

Hi all, and welcome back to MusaBase!. If you followed the series, then you know, we'd have successfully installed and launched Caelestia dotfiles, ML4W Dotfiles, and also JaKooLit on NixOS, even though apart from JaKooLit, Caelestia and ML4W aren't officially supported on NixOS by the developers. So just out of curiosity, I thought why not test and run the remaining pre-configured dotfiles on NixOS also and I succeeded in running End-4 Hyprland dotfiles on NixOS. For End-4, it's been a different experience making it run on an operating system that isn't officially supported, I mean, I'd need to configure a pre-configured setup in order to run it on NixOS. But nevertheless, a programmer's itch led me to finally make it happen. Furthermore, I've uploaded the end4.nix files specifically curated for the NixOS system to install and run End-4 on GitHub for you, so the installation only needs you to enter 6 commands and End4 dotfiles will be running on your NixOS system also.

In this guide, we will cover how to:

  1. Enable flakes for End-4 dotfiles installation on NixOS.
  2. Download pre-configured End4's flake.nix, end4.nix, and end4-home.nix files from GitHub.
  3. Add your current username inside flake.nix to fix username mismatch error during installation.
  4. Install End 4 dotfiles on NixOS by rebuilding the NixOS system with the new End4 .nix files.
  5. And finally, log into our installed End4 dotfiles on NixOS.

By the end of this guide, we will have an End4 dotfiles Hyprland session running on our NixOS system without any errors.

Proof of End-4 dotfiles running on NixOS
🧑‍💻 On Arch Linux instead? This guide covers the DIY NixOS installation, since NixOS has no official End-4 support. If you're running Arch Linux, the End-4 official installer handles everything for you, follow my End-4 Dotfiles: Install illogical-impulse on Arch guide instead.

⚡ TL;DR: Install End 4 Dots on NixOS

A quick reference for installing End-4 illogical-impulse Hyprland dotfiles on NixOS using flakes and Home Manager, including enabling flakes, downloading the pre-configured .nix files, fixing the username mismatch, rebuilding the system, and logging into the Hyprland session.

  1. Enable flakes on NixOS: Open /etc/nixos/configuration.nix, add the experimental features line, then rebuild:
    nix.settings.experimental-features = [ "nix-command" "flakes" ];
    sudo nixos-rebuild switch
    (See the "Enable Flakes" section for details.)
  2. Download the three End-4 .nix files from GitHub:
    cd /etc/nixos
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/flake.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4-home.nix
    (See the "Download End-4 Dotfiles" section for details.)
  3. Fix the hardcoded username and rebuild the system:
    sudo sed -i "s/users.musabase/users.$(whoami)/" flake.nix
    sudo nix-shell -p git --run "nixos-rebuild switch --flake .#nixos"
    (See the "Install End-4 Dotfiles" section for details.)
  4. Reboot and log into the Hyprland session: After the rebuild finishes, reboot your NixOS system. In your login manager's session dropdown, pick Hyprland and enter your password. (See the "Log In to End-4 Dotfiles" section for details.)

💡 The rebuild compiles QuickShell and other components from source and takes around 20 minutes on a decent PC. If the installer looks stuck at any line, press ENTER and wait for the running line to change. If it still does not proceed, press CTRL + C and re-run the rebuild command. End-4 is not officially supported on NixOS, so the pre-configured files on my GitHub handle the NixOS-specific work for you.





Prerequisites for End 4 Dotfiles on NixOS

To install End4 dotfiles on NixOS, we only need a base NixOS system installed. I'm installing it on my NixOS system with Budgie as its desktop environment. If you don't have NixOS installed, I recommend you first follow my guide:

Install NixOS with Budgie or any desktop environment you want, then come back to this guide and continue. Make sure to give your root partition enough space, around 45 GB+, because the total space after installing End 4 dotfiles is around 30 GB. The remaining space is for your other data.

System Requirements for End4 Dotfiles on NixOS:

  • Processor: Any x86-64 compatible
  • RAM: Minimum 8GB (but more RAM is better)
  • Storage: Minimum 45GB (this is only for NixOS system files and End-4 files). You will need more storage space for additional packages and files
  • GPU: Any 2015+ GPU
  • OS: Minimal/base NixOS
  • Hyprland: 0.55 or newer. End-4's current dotfiles require it, and the flake follows nixos-unstable, which ships a recent Hyprland.
  • Stable internet connection


Step 1: Enable Flakes for End4 Dotfiles on NixOS

In this step, we will enable flakes and rebuild the NixOS system. If you already have flakes enabled, then skip this step.

  1. To enable flakes, open a terminal and run:
    sudo nano /etc/nixos/configuration.nix
  2. Add the following line:
    nix.settings.experimental-features = [ "nix-command" "flakes" ];
  3. After adding the experimental-features, press CTRL + O to save the file, then press ENTER to apply, then press CTRL + X to exit the file.
  4. Next, run the nixos-rebuild command to apply the changes system-wide:
    sudo nixos-rebuild switch


Step 2: Download End-4 Dotfiles from GitHub for NixOS

In this step, we will download the end4.nix files from GitHub. I created these files and uploaded them to GitHub for an easy End-4 dotfiles setup and so you guys don't have to type everything manually in each file and then run the rebuild command only to get errors like package name mismatches, typos, or URL/SHA mismatches.

  • Run these commands consecutively:
    cd /etc/nixos
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/flake.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4-home.nix
    Downloading End-4 dotfiles configuration files for NixOS

These end4.nix files are uploaded on my GitHub account called end4-hyprland-nixos, so you can update from one place. A GitHub Action checks End-4's official repo every week and opens an update when something changes. I test each update on a fresh NixOS install before merging it, so the files you download are always a matching, tested set.

Tested on: NixOS unstable (26.11.20261015) with Budgie, End-4 commit 2f2a376, QuickShell commit 4f508be, October 2026.



Step 3: Install End-4 Dotfiles on NixOS

With everything set, in this step we will install the End-4 dotfiles on NixOS. To install End-4 dotfiles, do the following:

  1. Run the following command to replace the hardcoded username value musabase from flake.nix:
    sudo sed -i "s/users.musabase/users.$(whoami)/" flake.nix
    Adding username to flake.nix for End-4 dotfiles installation on NixOS
  2. Next, to actually install End-4 dotfiles on NixOS, run the following command:
    sudo nix-shell -p git --run "nixos-rebuild switch --flake .#nixos"
    Rebuilding NixOS after adding End-4 dotfiles for nix to install End-4 dotfiles on NixOS
  3. When we run the nixos-rebuild command, the NixOS system will pick the new files and start downloading, configuring and installing everything that is written in the end4.nix files.
  4. It will also compile and build certain files from source as needed, such as quickshell.
  5. If the installer looks stuck, then just press ENTER and wait for anything to change in the running line. If it still looks stuck and not proceeding, then press CTRL + C to abort the installation and re-run the sudo nix-shell -p git --run "nixos-rebuild switch --flake .#nixos" command.
  6. The whole End-4 dotfiles installation on NixOS process took roughly 20 minutes on my PC, so the time for installation wouldn't take that long.
  7. When the rebuild finishes without errors, confirm it worked by running nixos-rebuild list-generations. The newest generation (the top row) should show True in the Current column. If the rebuild printed an error instead, scroll up to the first line that says error, fix it, and run the rebuild command again.
  8. Next, reboot the NixOS system to log into Hyprland session.


Step 4: Log In to Installed End 4 Dotfiles on NixOS

After rebooting the NixOS system, if you have a desktop environment installed with a login manager like mine, then in the login manager's session dropdown box you will see the Hyprland entry:

End-4 Hyprland dotfiles session entry in the NixOS login manager

Select Hyprland from the dropdown and enter your password.

End-4 Dotfiles on NixOS up and running

And, we are in!

Known limits: this setup skips two packages from End-4's Arch list because they are not in nixpkgs. LaTeX formulas in the AI sidebar will not render without MicroTeX, and the Breeze Plus icon theme is not installed. Everything else in the keybinds table below works.


Update End 4 Dotfiles

To update the End-4 dotfiles on NixOS, we only need to download the three .nix files from GitHub. A GitHub Action checks End-4's official repo every week, and each update is tested on a fresh NixOS install before I publish it, so the three files always match each other. Follow these steps to update:

  • Open terminal and run the following commands:
    cd /etc/nixos
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/flake.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4.nix
    sudo curl -fLO https://raw.githubusercontent.com/musabase/end4-hyprland-nixos/main/end4-home.nix
    sudo sed -i "s/users.musabase/users.$(whoami)/" flake.nix
    sudo nix flake update
    sudo nix-shell -p git --run "nixos-rebuild switch --flake .#nixos"
  • Then move your End-4 dotfiles folder to the matching commit. The rebuild does not touch an existing folder, so this is a separate step. Run it as your normal user, without sudo:
    REV=$(grep -oP 'dotsRev = "\K[0-9a-f]{40}' /etc/nixos/end4-home.nix)
    cd ~/.local/share/end4-dots
    git stash
    git fetch origin
    git checkout --detach $REV
    git submodule update --init --recursive
  • Press Ctrl + Super + R to restart the shell. The git stash line sets aside any local changes, including files End-4 rewrites itself. If you edited End-4 files on purpose, run git stash pop afterwards to bring your edits back.

End4 Dotfiles Keybinds

Keys What it does
Ctrl + Super + T Pick a wallpaper; End-4 generates the whole color scheme from it
Super + / Keybind cheatsheet
Super Search and app launcher
Super + Enter Terminal (foot)
Super + A / Super + N Left (AI) and right (notifications, quick toggles) sidebars
Ctrl + Super + R Restart the shell

Fin!!!



What is the Purpose of each.nix file?

We downloaded three files from GitHub which I uploaded on my GitHub page. Each file serves its specific purpose.

End4's flake.nix

flake.nix defines the Nix dependencies, the system configuration, and the Home Manager integration for the End-4 Hyprland setup.

{
  description = "NixOS + End-4 illogical-impulse (Hyprland Dotfiles Session)";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    # Same QuickShell commit End-4 pins in its Arch package (illogical-impulse-quickshell-git)
    quickshell = {
      url = "github:quickshell-mirror/quickshell/4f508be500dea6e5732cc3d50382a0048b17e7b1";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, home-manager, ... } @ inputs: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit inputs; };
      modules = [
        ./configuration.nix
        ./end4.nix
        home-manager.nixosModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.backupFileExtension = "hm-backup";
          home-manager.extraSpecialArgs = { inherit inputs; };
          home-manager.users.musabase = import ./end4-home.nix;
        }
      ];
    };
  };
}

Purpose of Each Configuration:

  • description: Describes the configuration as a NixOS setup using the End-4 illogical-impulse Hyprland dotfiles.
  • inputs: Defines the external Nix flakes and repositories required by this configuration.
  • nixpkgs: Provides the Nix packages and NixOS modules used to build the system. The nixos-unstable branch provides newer package versions.
  • home-manager: Adds Home Manager to manage user-level packages, applications, and configuration files declaratively.
  • home-manager.inputs.nixpkgs.follows: Makes Home Manager use the same Nixpkgs input as the main system configuration.
  • quickshell: Imports a specific commit of the QuickShell repository. This pins QuickShell to a particular revision intended to match the version used by End-4's Arch package.
  • quickshell.inputs.nixpkgs.follows: Makes QuickShell use the same Nixpkgs input as the main configuration.
  • outputs: Defines the NixOS system configuration generated using the declared inputs.
  • nixosConfigurations.nixos: Defines a NixOS configuration named nixos, which can be built using this flake.
  • nixpkgs.lib.nixosSystem: Creates the NixOS system configuration using the specified modules and settings.
  • specialArgs = { inherit inputs; }: Makes the flake inputs available to NixOS modules, allowing them to access dependencies such as QuickShell.
  • modules: Lists the NixOS modules loaded as part of this system configuration.
  • ./configuration.nix: Loads the main NixOS configuration, which contains system-wide settings.
  • ./end4.nix: Loads the additional NixOS configuration for the End-4 illogical-impulse desktop setup.
  • home-manager.nixosModules.home-manager: Integrates Home Manager into NixOS so user-level configuration can be managed alongside system settings.
  • home-manager.useGlobalPkgs: Makes Home Manager use the system's existing Nixpkgs package set.
  • home-manager.useUserPackages: Installs Home Manager packages into the user's profile.
  • home-manager.backupFileExtension = "hm-backup": Tells Home Manager to back up existing files that conflict with managed configuration files by appending .hm-backup to their filenames.
  • home-manager.extraSpecialArgs = { inherit inputs; }: Makes the flake inputs available inside Home Manager modules, allowing the user configuration to access dependencies such as QuickShell.
  • home-manager.users.musabase: Defines the Home Manager configuration for the user named musabase. Replace this username if the actual NixOS username is different.
  • import ./end4-home.nix: Loads the user's Home Manager configuration from end4-home.nix, where user-level packages and settings for the End-4 setup can be defined.

end4.nix

end4.nix configures system-level components. It sets up Hyprland, desktop services, fonts, themes, and all required packages.

{ config, lib, pkgs, ... }:
let
  # End-4's UI, reading and expressive fonts (not packaged in nixpkgs)
  end4-fonts = pkgs.runCommand "end4-fonts" { } ''
    mkdir -p $out/share/fonts/truetype
    cp ${pkgs.fetchurl {
      name = "GoogleSansFlex.ttf";
      url = "https://raw.githubusercontent.com/end-4/google-sans-flex/251aa5abd30496368f634e54ce2a508fe5a2fdfa/GoogleSansFlex-VariableFont_GRAD,ROND,opsz,slnt,wdth,wght.ttf";
      hash = "sha256-JRCot6JL6x/oFj6aSYE8z+lrVFNES5RD1CZlyk+jIMk=";
    }} $out/share/fonts/truetype/GoogleSansFlex.ttf
    cp ${pkgs.fetchurl {
      name = "SpaceGrotesk.ttf";
      url = "https://raw.githubusercontent.com/google/fonts/7085eb89a950e85db5b166b7a58d414544b4140c/ofl/spacegrotesk/SpaceGrotesk%5Bwght%5D.ttf";
      hash = "sha256-rK1t4fyTQ29cDx9BN3Ue8E8a6jBj5wNlNZcP/PvXn3I=";
    }} $out/share/fonts/truetype/SpaceGrotesk.ttf
    cp ${pkgs.fetchurl {
      name = "ReadexPro.ttf";
      url = "https://raw.githubusercontent.com/google/fonts/7085eb89a950e85db5b166b7a58d414544b4140c/ofl/readexpro/ReadexPro%5BHEXP,wght%5D.ttf";
      hash = "sha256-Jou6fh6POxTXmLP7DkDrqj/DkwjJrAAg4vr23xgcww4=";
    }} $out/share/fonts/truetype/ReadexPro.ttf
  '';
in
{
  # Hyprland session and portals
  programs.hyprland = {
    enable = true;
    xwayland.enable = true;
  };
  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [ xdg-desktop-portal-gtk kdePackages.xdg-desktop-portal-kde ];
  };

  # Lock screen, settings store, shell, typing tool, authentication
  programs.hyprlock.enable = true;
  programs.dconf.enable = true;
  programs.fish.enable = true;
  programs.ydotool.enable = true;
  security.polkit.enable = true;
  services.gnome.gnome-keyring.enable = true;

  # Services End-4's bar and sidebars talk to
  networking.networkmanager.enable = true;
  hardware.bluetooth.enable = true;
  hardware.i2c.enable = true;
  services.upower.enable = true;
  services.geoclue2.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    pulse.enable = true;
    wireplumber.enable = true;
  };

  # End-4 sets QT_QPA_PLATFORMTHEME=kde
  qt = {
    enable = true;
    platformTheme = "kde";
  };

  # Every user set up with Home Manager gets the groups End-4's installer adds
  users.users = lib.genAttrs (lib.attrNames config.home-manager.users) (_: {
    extraGroups = [ "networkmanager" "video" "input" "i2c" "ydotool" ];
  });

  fonts.packages = with pkgs; [
    end4-fonts
    rubik
    material-symbols
    nerd-fonts.jetbrains-mono
    twemoji-color-font
    noto-fonts
    noto-fonts-cjk-sans
    noto-fonts-color-emoji
  ];

  # End-4's Arch meta-packages (sdata/dist-arch), translated to nixpkgs
  environment.systemPackages = with pkgs; [
    # illogical-impulse-basic
    git wget curlFull rsync ripgrep jq yq-go bc cmake xdg-user-dirs cliphist inetutils libnotify
    # illogical-impulse-audio
    cava lxqt.pavucontrol-qt playerctl libdbusmenu-gtk3
    # illogical-impulse-backlight
    brightnessctl ddcutil
    # illogical-impulse-fonts-themes
    adw-gtk3 kdePackages.breeze kdePackages.breeze-icons darkly bibata-cursors eza foot kitty matugen starship
    # illogical-impulse-hyprland
    hyprsunset hypridle hyprpicker wl-clipboard
    # illogical-impulse-kde
    kdePackages.bluedevil kdePackages.plasma-nm kdePackages.polkit-kde-agent-1
    kdePackages.dolphin kdePackages.systemsettings kdePackages.kdialog kdePackages.kconfig
    # illogical-impulse-python (system libraries)
    gtk4 libadwaita libsoup_3 libportal-gtk4 gobject-introspection
    # illogical-impulse-screencapture
    hyprshot grim slurp swappy tesseract wf-recorder
    # illogical-impulse-toolkit
    wtype ydotool upower
    # illogical-impulse-widgets
    fuzzel glib imagemagick songrec translate-shell wlogout libqalculate
  ];
}

Purpose of Each Configuration:

  • end4-fonts: Creates a custom font package by downloading End-4's UI, reading, and expressive fonts (Google Sans Flex, Space Grotesk, and Readex Pro) directly from their upstream sources and installing them system-wide.
  • GoogleSansFlex.ttf: The variable font End-4 uses as the primary UI font across the desktop.
  • SpaceGrotesk.ttf: The expressive font End-4 uses for headings and emphasis in the shell.
  • ReadexPro.ttf: The reading font End-4 uses for body text in widgets and sidebars.
  • programs.hyprland: Enables the Hyprland Wayland compositor and provides the Hyprland session that End-4's dotfiles rely on.
  • programs.hyprland.xwayland: Enables XWayland support so X11 applications can run inside the Hyprland session.
  • xdg.portal: Enables the XDG desktop portal and adds both the GTK and KDE portal backends for screen sharing, file pickers, and other desktop integrations.
  • programs.hyprlock: Enables Hyprlock, the lock screen End-4 uses for session locking.
  • programs.dconf: Enables the dconf settings store so GNOME and GTK settings can be persisted and read by End-4's shell.
  • programs.fish: Enables Fish as a system shell, which End-4's scripts and terminal configuration expect.
  • programs.ydotool: Enables ydotool for typing automation and virtual keyboard input, which End-4's scripts use.
  • security.polkit: Enables PolicyKit, the service that lets privileged actions ask for authentication. The KDE Polkit agent in the package list shows the password prompt.
  • services.gnome.gnome-keyring: Enables the GNOME Keyring daemon for storing and retrieving secrets used by desktop applications.
  • networking.networkmanager: Enables NetworkManager so End-4's quick toggles and network widgets can manage connections.
  • hardware.bluetooth: Enables Bluetooth support so End-4's Bluetooth widget and KDE BlueDevil can manage devices.
  • hardware.i2c: Enables I2C device access so brightness and hardware control tools can talk to displays and peripherals.
  • services.upower: Enables UPower so End-4's battery and power widgets can read battery status and power events.
  • services.geoclue2: Enables Geoclue2 so End-4's weather and location widgets can determine your location.
  • services.pipewire: Enables PipeWire with ALSA, PulseAudio, and WirePlumber support so End-4's audio widgets and media controls work correctly.
  • qt: Enables Qt support with the KDE platform theme, matching the QT_QPA_PLATFORMTHEME=kde value End-4 sets.
  • users.users: Uses lib.genAttrs to add the networkmanager, video, input, i2c, and ydotool groups to every user configured through Home Manager, matching the groups End-4's installer adds.
  • fonts.packages: Installs the custom end4-fonts package along with Rubik, Material Symbols, JetBrains Mono Nerd Font, Twemoji, and Noto fonts so End-4's UI and terminal render correctly.
  • environment.systemPackages: Installs the packages from End-4's Arch meta-packages that exist in nixpkgs, grouped by their original illogical-impulse-* categories. Two Arch packages are not included: MicroTeX (LaTeX rendering in the AI sidebar) and the Breeze Plus icon theme.
  • illogical-impulse-basic: Core utilities such as git, wget, curl, ripgrep, jq, cmake, cliphist, and libnotify.
  • illogical-impulse-audio: Audio tools such as cava, pavucontrol-qt, playerctl, and libdbusmenu-gtk3.
  • illogical-impulse-backlight: Backlight control tools brightnessctl and ddcutil.
  • illogical-impulse-fonts-themes: Themes and fonts such as adw-gtk3, Breeze, Breeze Icons, Darkly, Bibata cursors, eza, foot, kitty, matugen, and starship.
  • illogical-impulse-hyprland: Hyprland companion tools such as hyprsunset, hypridle, hyprpicker, and wl-clipboard.
  • illogical-impulse-kde: KDE applications and services such as BlueDevil, plasma-nm, the Polkit KDE agent, Dolphin, System Settings, KDialog, and KConfig.
  • illogical-impulse-python: System-level libraries End-4's Python scripts depend on, such as GTK4, libadwaita, libsoup3, libportal-gtk4, and gobject-introspection.
  • illogical-impulse-screencapture: Screenshot and recording tools such as hyprshot, grim, slurp, swappy, tesseract, and wf-recorder.
  • illogical-impulse-toolkit: Input and system tools such as wtype, ydotool, and upower.
  • illogical-impulse-widgets: Widget backends and utilities such as fuzzel, glib, imagemagick, songrec, translate-shell, wlogout, and libqalculate.

end4-home.nix

end4-home.nix configures user-level settings. It handles the End-4 dotfiles, QuickShell, Python dependencies, application configurations, and desktop appearance.

{ config, lib, pkgs, inputs, osConfig, ... }:
let
  dots = "${config.home.homeDirectory}/.local/share/end4-dots";
  # Pinned together with the quickshell commit in flake.nix (updated by .github/workflows/bump-end4.yml)
  dotsRev = "2f2a376fdb2ad738bf55f693dd0b474b64bb0ab8";

  # QuickShell (End-4's pinned commit) plus the QML modules from End-4's Arch package
  end4-quickshell = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default.withModules
    (with pkgs.kdePackages; [
      qt5compat qtpositioning qtlocation qtmultimedia qtsensors qtsvg qtimageformats
      qtquicktimeline qtvirtualkeyboard qttools qttranslations qtwayland
      kirigami syntax-highlighting
    ]);

  # Python packages from End-4's sdata/uv/requirements.in
  end4-python = pkgs.python3.withPackages (ps: with ps; [
    build pillow setuptools-scm wheel pywayland psutil kde-material-you-colors
    materialyoucolor libsass material-color-utilities setproctitle click loguru
    pycairo pygobject3 tqdm numpy opencv4 google-auth requests
  ]);
in
{
  # Username and home folder come from your NixOS user; stateVersion from your system
  home.stateVersion = lib.mkDefault osConfig.system.stateVersion;

  home.packages = [ end4-quickshell end4-python ];

  fonts.fontconfig.enable = false;

  # End-4's scripts source this "venv" before running Python
  home.file.".local/state/quickshell/.venv/bin/activate".text = ''
    export VIRTUAL_ENV="${end4-python}"
    export PATH="${end4-python}/bin:$PATH"
    deactivate() { :; }
  '';

  # Clone End-4's dotfiles once and copy the KDE files that apps rewrite
  home.activation.cloneEnd4Dots = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
    run mkdir -p "$HOME/.config"
    if [ ! -d "${dots}" ]; then
      run ${pkgs.git}/bin/git clone --recurse-submodules \
        https://github.com/end-4/dots-hyprland.git "${dots}"
      run ${pkgs.git}/bin/git -C "${dots}" checkout --detach ${dotsRev}
      run ${pkgs.git}/bin/git -C "${dots}" submodule update --init --recursive
    fi
    for f in kdeglobals dolphinrc konsolerc darklyrc; do
      if [ ! -e "$HOME/.config/$f" ]; then
        run cp "${dots}/dots/.config/$f" "$HOME/.config/$f"
      fi
    done
    if [ ! -e "$HOME/.local/share/icons/illogical-impulse.svg" ]; then
      run mkdir -p "$HOME/.local/share/icons"
      run cp "${dots}/dots/.local/share/icons/illogical-impulse.svg" "$HOME/.local/share/icons/"
    fi
  '';

  # Link End-4's config folders into ~/.config (editable, no rebuild needed)
  xdg.configFile = lib.genAttrs [
    "hypr" "quickshell" "fish" "foot" "fuzzel" "kitty" "matugen" "mpv" "wlogout"
    "Kvantum" "fontconfig" "kde-material-you-colors" "xdg-desktop-portal" "starship.toml"
  ] (name: { source = config.lib.file.mkOutOfStoreSymlink "${dots}/dots/.config/${name}"; });

  xdg.dataFile."konsole".source =
    config.lib.file.mkOutOfStoreSymlink "${dots}/dots/.local/share/konsole";

  # What End-4's installer sets with gsettings
  dconf.settings."org/gnome/desktop/interface" = {
    font-name = "Google Sans Flex Medium 11 @opsz=11,wght=500";
    color-scheme = "prefer-dark";
  };

  programs.home-manager.enable = true;
}

Purpose of Each Configuration:

  • dots: Stores the path where End-4's dotfiles repository is cloned, which defaults to ~/.local/share/end4-dots.
  • dotsRev: The exact End-4 commit that was tested together with the QuickShell pin in flake.nix. A fresh install checks out this commit, so the dotfiles and QuickShell always match.
  • end4-quickshell: Builds QuickShell from the exact commit End-4 pins and attaches the QML modules End-4's Arch package uses so the shell can render its widgets and sidebars.
  • KDE/Qt modules: Adds the Qt modules such as qt5compat, qtpositioning, qtlocation, qtmultimedia, qtsensors, qtsvg, qtimageformats, qtquicktimeline, qtvirtualkeyboard, qttools, qttranslations, qtwayland, kirigami, and syntax-highlighting that QuickShell needs at runtime.
  • end4-python: Builds a Python environment with the packages from End-4's sdata/uv/requirements.in, using their nixpkgs equivalents, so End-4's Python scripts can run without a virtual environment.
  • home.stateVersion: Sets Home Manager's state version to match your NixOS system's state version by default, keeping user and system configurations in sync.
  • home.packages: Installs the custom end4-quickshell and end4-python packages into your user profile.
  • fonts.fontconfig.enable = false: Disables Home Manager's fontconfig generation because fonts are managed system-wide in end4.nix.
  • home.file.".local/state/quickshell/.venv/bin/activate": Creates a fake Python virtual environment activation script so End-4's scripts can source it and use the end4-python environment.
  • home.activation.cloneEnd4Dots: Clones End-4's dotfiles repository once during the first Home Manager activation and copies the KDE configuration files and icon that applications rewrite.
  • git clone: Clones end-4/dots-hyprland with submodules into the dots path only if the directory does not already exist, then switches it to the tested dotsRev commit.
  • KDE file copy loop: Copies kdeglobals, dolphinrc, konsolerc, and darklyrc into ~/.config only if they do not already exist, so your customizations are not overwritten.
  • Icon copy: Copies the illogical-impulse.svg icon into ~/.local/share/icons only if it does not already exist.
  • xdg.configFile: Links End-4's configuration folders and files into ~/.config using mkOutOfStoreSymlink so you can edit them directly without rebuilding NixOS.
  • xdg.dataFile."konsole": Links End-4's Konsole data folder into ~/.local/share/konsole.
  • dconf.settings: Sets the font name and dark color scheme using the same values End-4's installer sets with gsettings.
  • programs.home-manager.enable: Enables Home Manager itself inside the user configuration.


❓ Frequently Asked Questions: Installing End 4 Dots on NixOS

What are the requirements for End-4 dotfiles on NixOS?

You need a base NixOS system installed with any desktop environment. I tested it with Budgie, but any DE or login manager works. Your root partition should have at least 45 GB of free space, because NixOS system files and End-4 files take around 30 GB together. You also need an x86-64 processor, at least 8 GB of RAM, a 2015 or newer GPU, and a stable internet connection since the rebuild downloads packages and compiles QuickShell from source.

Is End-4 officially supported on NixOS?

No. End-4's repo ships install scripts for Arch Linux, Fedora and Gentoo, plus a work-in-progress Nix-based installer for other distros, but nothing for NixOS. That is why I created the three pre-configured .nix files on my GitHub and published them at musabase/end4-hyprland-nixos. Those files translate End-4's Arch meta-packages and installer steps into NixOS modules and Home Manager settings, so you can install and run End-4 on NixOS without writing everything by hand.

Why does the End-4 installation take around 20 minutes?

The rebuild compiles QuickShell and a few other components from source, because NixOS does not ship a prebuilt QuickShell binary that matches the exact commit End-4 pins. The rest of the time goes to downloading packages and evaluating the Home Manager configuration. On my PC, the whole process took roughly 20 minutes. On a slower machine or a slow connection, expect it to take longer.

What are the three .nix files, and what does each one do?

flake.nix pins the dependencies, defines the NixOS system configuration, and integrates Home Manager. end4.nix configures the system side: Hyprland, desktop services, fonts, themes, and the packages End-4 needs from nixpkgs. end4-home.nix configures the user side: QuickShell, Python dependencies, the cloned dotfiles, application configs, and desktop appearance. You can read a full breakdown of each file in the "What is the Purpose of each .nix file?" section.

Why do I need to replace the hardcoded username "musabase"?

My flake.nix file hardcodes my own username, musabase, inside the Home Manager user block. If your NixOS username is different, the rebuild fails with a username mismatch error. The sudo sed -i "s/users.musabase/users.$(whoami)/" flake.nix command replaces that value with your actual username, so Home Manager configures the correct user.

What should I do if the nixos-rebuild command looks stuck?

First, press ENTER and wait for the running line to change. Some build steps, especially QuickShell's compilation, print very little output for a while and can look frozen. If it still does not proceed after a few minutes, press CTRL + C to abort the build, then re-run the same command: sudo nix-shell -p git --run "nixos-rebuild switch --flake .#nixos". NixOS caches completed build steps, so the retry usually picks up where it left off.

What is QuickShell, and why does NixOS build it from source?

QuickShell is the widget and shell system that renders End-4's bar, launcher, sidebars, and widgets. End-4 pins a specific QuickShell commit in its Arch package, and my flake does the same. Because that exact commit is not in nixpkgs, NixOS compiles it from source during the rebuild. That is the main reason the installation takes around 20 minutes instead of a couple of minutes.

Can I run End-4 dotfiles on NixOS without Hyprland?

No. This guide installs the original End-4 illogical-impulse dotfiles, which are built specifically for Hyprland. If you want End-4's look on KDE Plasma instead, that is a different project. This NixOS guide assumes you want the full Hyprland session with End-4's bar, launcher, and widgets running on top of Hyprland.

How do I update End-4 dotfiles on NixOS later?

Re-download the three .nix files from my GitHub, re-run the username fix, update the flake inputs, and rebuild. The exact commands are in the "Update End-4 Dotfiles" section. After the rebuild, also move your End-4 dotfiles folder to the commit pinned in end4-home.nix, using the git commands in that section. A GitHub Action checks End-4's official repo every week, and I test each update before publishing it.

What does the End-4 setup change on my NixOS system?

It enables Hyprland and its portals, configures PipeWire, NetworkManager, Bluetooth, UPower, Geoclue2, and Polkit, sets the Qt platform theme to KDE, installs End-4's fonts and the packages from its Arch meta-packages that exist in nixpkgs, and adds your user to the networkmanager, video, input, i2c, and ydotool groups. On the user side, it installs QuickShell and a Python environment, clones the original End-4 dotfiles into ~/.local/share/end4-dots, links config folders into ~/.config so you can edit them without rebuilding, and sets End-4's font and dark color scheme through dconf. NixOS keeps every generation, so you can always roll back with nixos-rebuild switch --rollback.

What should I do if Hyprland does not appear in the login manager?

First, confirm the rebuild completed without errors. If it did, check that programs.hyprland.enable = true is present in end4.nix, which it is in the file I published. If you use a display manager that reads session files, log out and log back in so it refreshes its session list. If you still do not see Hyprland, reboot the system. NixOS applies session changes on the next boot.

Can I edit the End-4 dotfiles without rebuilding NixOS?

Yes. The Home Manager part of the setup links End-4's config folders into ~/.config using mkOutOfStoreSymlink. That means you can edit files in ~/.config/hypr, ~/.config/quickshell, ~/.config/fish, and the other linked folders directly, and the changes apply without a rebuild. Only changes to the .nix files themselves require a rebuild.

How do I uninstall End-4 dotfiles from NixOS?

The cleanest way is to roll back to the NixOS generation you had before the install. Run sudo nixos-rebuild switch --rollback or pick the previous generation from the boot menu (GRUB or systemd-boot). That reverts every system-level change. If you want to remove the downloaded files too, delete flake.nix, end4.nix, and end4-home.nix from /etc/nixos and rebuild, and remove the cloned dotfiles at ~/.local/share/end4-dots. NixOS garbage collection will clean up the unused packages on its own schedule.

What are the essential End-4 keybinds I should learn first?

The ones you will use most are Super for the app launcher, Super + Enter for the terminal, Super + / for the keybind cheatsheet, and Ctrl + Super + T to pick a wallpaper and regenerate the color scheme. The full list is in the "End4 Dotfiles Keybinds" table.

Does the End-4 installation work with any NixOS desktop environment?

Yes. The three files only need a base NixOS system and a login manager that can start a Hyprland session. I tested it with Budgie, but GNOME, KDE Plasma, XFCE, and others work the same way, because the rebuild adds Hyprland as a separate session entry rather than replacing your current desktop.



End-4 Dotfiles on NixOS: Up and Running

End4's modern Hyprland dotfiles interface is now running on your NixOS system with the atomic stability that NixOS is known for. QuickShell, the bar, the launcher, the sidebars, and the Material Design 3 theming all sit on top of a declarative configuration that you can rebuild, roll back, and version control like any other NixOS generation. Because the whole setup lives in three .nix files and a flake, updating it or reverting it is a single command away, which is something Arch users have to do by hand.

After End-4 on NixOS: Related Guides

End-4 on Arch Linux: The original dotfiles install through the official installer on Arch and its derivatives. Read End 4 Dotfiles: Install illogical-impulse on Arch.

Caelestia on either distro: Caelestia offers a cleaner, more self-contained shell and runs on both Arch and NixOS. Read How to Install Caelestia Dotfiles on Arch Linux if you are on Arch, or follow How to Install Caelestia Dotfiles on NixOS if you want to stay on NixOS.

Two more NixOS setups: ML4W and JaKooLit both run on NixOS and give you different takes on the Hyprland desktop. Compare ML4W on NixOS and JaKooLit on NixOS.

🛠️ Support & Troubleshooting: Something from this guide not matching your system, or a widget not showing up after login? Leave a comment below and I will help you sort it out. If the rebuild fails, include the error line in your comment so I can point you to the fix.

If End-4 brought a fresh look to your NixOS desktop, stay tuned. MusaBase has more Linux, BSD, and virtualization guides in the pipeline.
1o1 out, I'll see you in the next one!

Hello World

Post a Comment