Add Niri desktop configuration with integrated utilities

- Introduced a new power menu script using fuzzel for session management.
- Updated Bellerophon configuration to include Niri desktop and its components.
- Removed obsolete README for Niri and consolidated its configuration files.
- Added swayidle and swaylock integration for idle management and screen locking.
- Implemented waybar for status bar functionality with basic configuration.
- Created fuzzel integration for application launching and menu access.
- Added zenbook debugging scripts for display and keyboard diagnostics.
- Migrated keyring and other configurations to streamline Niri setup.
- Enhanced display management with systemd services for better integration.
This commit is contained in:
2025-10-02 13:16:27 -03:00
parent 66e65b91ea
commit ca62a6bd19
20 changed files with 973 additions and 448 deletions

View File

@@ -5,10 +5,31 @@
}: {
imports = [
inputs.niri.nixosModules.niri
(import ./niri/waybar.nix)
(import ./niri/swayidle.nix)
(import ./niri/fuzzel.nix)
(import ./niri/swaylock.nix)
];
programs.niri.enable = true;
# Enable UWSM (Universal Wayland Session Manager) for better session management
# See docs/uwsm-niri-integration.md for usage and migration guide
programs.uwsm = {
enable = true;
waylandCompositors = {
niri = {
prettyName = "Niri";
comment = "Niri scrollable-tiling Wayland compositor managed by UWSM";
binPath = "/run/current-system/sw/bin/niri-session";
};
};
};
# UWSM provides better environment variable inheritance and systemd integration
# All startup applications are now managed via systemd.user.services with
# WantedBy=["graphical-session.target"] in the home-manager configuration
# Use KDE portal instead of GNOME for better KDE integration
xdg.portal = {
enable = true;

View File

@@ -0,0 +1,8 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [fuzzel];
# Provide a simple system-wide wrapper script in /etc/profile.d or /etc to make fuzzel available
environment.etc."profile.d/fuzzel.sh".text = ''
export PATH="${pkgs.fuzzel}/bin:$PATH"
'';
}

View File

@@ -0,0 +1,13 @@
{pkgs, ...}: {
# Install swayidle and configure a systemd user service for idle locking
environment.systemPackages = with pkgs; [swayidle swaylock inotify-tools];
systemd.user.services.swayidle = {
description = "swayidle for Niri sessions";
wantedBy = ["default.target"];
serviceConfig = {
ExecStart = "${pkgs.swayidle}/bin/swayidle -w 'timeout 300 ${pkgs.swaylock}/bin/swaylock -f' resume 'swaymsg resume'";
Restart = "on-failure";
};
};
}

View File

@@ -0,0 +1,9 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [swaylock imagemagick];
# Provide a system-level helper in /etc/profile.d to point to a lock wrapper
environment.etc."profile.d/lockwrapper.sh".text = ''
#!/bin/sh
export LOCK_WRAPPER="${pkgs.swaylock}/bin/swaylock"
'';
}

View File

@@ -0,0 +1,23 @@
{pkgs, ...}: {
# Install waybar system-wide and provide a systemd user service to start it for graphical users
environment.systemPackages = with pkgs; [waybar jq wl-clipboard];
systemd.user.services.waybar = {
description = "Waybar for Niri sessions";
wantedBy = ["default.target"];
serviceConfig = {
ExecStart = "${pkgs.waybar}/bin/waybar";
Restart = "on-failure";
RestartSec = 2;
};
};
# Optionally provide a default system-level config in /etc/xdg/waybar/config
environment.etc."xdg/waybar/config".text = ''
{
"modules-left": ["workspace"],
"modules-center": [],
"modules-right": ["clock"]
}
'';
}