Hello everyone,
I am currently trying to install niri and have encountered some problems. I have followed the configuration instructions in the NixOS Wiki exactly.
My configuration:
configuration.nix and home.nix correspond exactly to the specifications in the Wiki.
home-manager switch and nixos-rebuild switch run without errors.
niri can be started from the console. (niri)
This works:
niri starts and displays the desktop
Config file is created under ~/.config/niri/config.kdl
Super + Shift + E (exit niri) works
This does not work:
Super + T (start terminal) does not work
All other key bindings do not work
waybar is not displayed (although defined in standard config)
Additional information:
Alacritty is installed and works when started manually
No error messages in the console when starting niri
Does anyone have any idea what I might have overlooked? Do I need to activate additional services or set environment variables?
home.nix:
{ config, pkgs, home, ... }:
{
home.username = home.username;
home.homeDirectory = home.homeDirectory;
home.stateVersion = "25.05";
home.packages = [
pkgs.nerd-fonts.fantasque-sans-mono
pkgs.nerd-fonts.fira-code
pkgs.nerd-fonts.jetbrains-mono
pkgs.nerd-fonts.hack
];
home.sessionVariables = {
EDITOR = "hx";
SHELL = "${pkgs.zsh}/bin/zsh";
};
programs = {
home-manager.enable = true;
zsh = {
enable = true;
syntaxHighlighting.enable = true;
autosuggestion.enable = true;
shellAliases = {
ll = "ls -l";
la = "ls -la";
ezaa = "eza -1la";
ezal = "eza -1l";
".." = "cd ..";
"/" = "cd /";
"~" = "cd ~";
};
};
eza = {
enable = false;
enableZshIntegration = true;
icons = "auto";
colors = "always";
};
starship = {
enable = true;
enableZshIntegration = true;
};
fuzzel.enable = true;
swaylock.enable = true;
waybar.enable = true;
};
services = {
mako.enable = true;
swayidle.enable = true;
polkit-gnome.enable = true;
};
}
configuraton.nix
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./../../nixos-modules
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "nixos-workstation"; # Define your hostname.
networking.networkmanager.enable = true;
console = {
keyMap = "de";
};
cli_tools.enable = true;
gnupg.enable = true;
zsh.enable = true;
desktopApps = {
freecad.enable = true;
brave.enable = true;
zed-editor.enable = true;
inkscape.enable = true;
obs-studio.enable = true;
thunderbird.enable = true;
};
customUser.benhartmannsgruber.enable = true;
niriWindowManager.enable = true;
# Configure keymap in X11
services= {
xserver.xkb.layout = "de";
};
environment.systemPackages = with pkgs; [
wget
helix
git
pinentry-tty
];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-tty;
};
system.stateVersion = "25.05"; # Did you read the comment?
}
niri.nix
{ pkgs, lib, config, ... }: {
options = {
niriWindowManager.enable = lib.mkEnableOption "enables niri window manager";
};
config = lib.mkIf config.niriWindowManager.enable {
programs = {
niri.enable = true;
};
environment.systemPackages = with pkgs; [
wl-clipboard
];
services = {
gnome.gnome-keyring.enable = true;
xserver = {
enable = true;
xkb.layout = "de";
displayManager.gdm.enable = true;
displayManager.gdm.wayland = true;
};
};
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
};
}
cli_tools.nix
{ pkgs, lib, config, ... }: {
options = {
cli_tools.enable = lib.mkEnableOption "additional cli tools";
};
config = lib.mkIf config.cli_tools.enable {
environment.systemPackages = with pkgs; [
alacritty
eza
fd
git
helix
jujutsu
openvpn
procs
ripgrep
yazi
zellij
];
};
}
NixOS version used: 25.05.20250721.92c2e04 (Warbler)
Thanks