Updated everything
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.sessionVariables.GTK_USE_PORTAL = "1";
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
environment.sessionVariables.KWIN_DRM_PREFER_COLOR_DEPTH = "24";
|
||||
environment.systemPackages = with pkgs.kdePackages; [plasma-thunderbolt sddm-kcm];
|
||||
|
||||
# Fix Qt platform theme configuration for KDE - force override stylix
|
||||
qt.platformTheme = lib.mkForce "kde";
|
||||
}
|
||||
|
||||
90
hosts/common/optional/lxqt-greeter.nix
Normal file
90
hosts/common/optional/lxqt-greeter.nix
Normal file
@@ -0,0 +1,90 @@
|
||||
# LXQt Default Greeter (SDDM with LXQt theme)
|
||||
#
|
||||
# This module configures SDDM as the display manager with LXQt theming
|
||||
# to provide a consistent greeter experience for LXQt desktop environments.
|
||||
#
|
||||
# Features:
|
||||
# - SDDM display manager with Wayland support
|
||||
# - LXQt theme integration for the greeter
|
||||
# - Proper session detection for LXQt-based environments
|
||||
# - Qt theming consistency between greeter and desktop
|
||||
#
|
||||
# Usage:
|
||||
# Add this to your host configuration instead of gdm.nix:
|
||||
# imports = lib.flatten [
|
||||
# # ... other imports ...
|
||||
# "hosts/common/optional/lxqt-greeter.nix"
|
||||
# ];
|
||||
#
|
||||
{pkgs, ...}: {
|
||||
# Enable SDDM as the display manager
|
||||
services.displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland = {
|
||||
enable = true;
|
||||
compositor = "kwin"; # Use KWin for the greeter compositor
|
||||
};
|
||||
# Use LXQt theme for SDDM
|
||||
theme = "breeze"; # Breeze theme works well with LXQt
|
||||
};
|
||||
};
|
||||
|
||||
# Install SDDM themes and LXQt integration packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# SDDM themes that work well with LXQt
|
||||
kdePackages.sddm-kcm # SDDM configuration module
|
||||
|
||||
# Additional SDDM themes (optional)
|
||||
where-is-my-sddm-theme
|
||||
];
|
||||
|
||||
# Ensure proper font rendering for the greeter
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = ["Noto Serif"];
|
||||
sansSerif = ["Noto Sans"];
|
||||
monospace = ["Fira Code"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# SDDM configuration
|
||||
environment.etc."sddm.conf".text = ''
|
||||
[Autologin]
|
||||
Relogin=false
|
||||
Session=
|
||||
User=
|
||||
|
||||
[General]
|
||||
HaltCommand=/run/current-system/systemd/bin/systemctl poweroff
|
||||
RebootCommand=/run/current-system/systemd/bin/systemctl reboot
|
||||
|
||||
[Theme]
|
||||
Current=breeze
|
||||
CursorTheme=breeze_cursors
|
||||
Font=Noto Sans,10,-1,0,50,0,0,0,0,0
|
||||
|
||||
[Users]
|
||||
MaximumUid=60513
|
||||
MinimumUid=1000
|
||||
|
||||
[Wayland]
|
||||
EnableHiDPI=true
|
||||
SessionDir=/run/current-system/sw/share/wayland-sessions
|
||||
|
||||
[X11]
|
||||
EnableHiDPI=true
|
||||
SessionDir=/run/current-system/sw/share/xsessions
|
||||
'';
|
||||
}
|
||||
162
hosts/common/optional/lxqt-niri.nix
Normal file
162
hosts/common/optional/lxqt-niri.nix
Normal file
@@ -0,0 +1,162 @@
|
||||
# LXQt Desktop Environment with Niri Window Manager
|
||||
#
|
||||
# This module provides LXQt desktop environment components running with
|
||||
# Niri as the Wayland compositor instead of the default window manager.
|
||||
#
|
||||
# Features:
|
||||
# - LXQt panel, settings, file manager, and utilities
|
||||
# - Niri as the tiling Wayland compositor
|
||||
# - Proper Qt theming with LXQt themes and Kvantum
|
||||
# - XDG portals for screen sharing and file dialogs
|
||||
# - Audio, network, and power management integration
|
||||
#
|
||||
# Usage:
|
||||
# Add this to your host configuration:
|
||||
# imports = lib.flatten [
|
||||
# # ... other imports ...
|
||||
# "hosts/common/optional/lxqt-niri.nix"
|
||||
# "hosts/common/optional/gdm.nix" # or sddm.nix for display manager
|
||||
# ];
|
||||
#
|
||||
# The session will appear as "LXQt (Niri)" in the session list.
|
||||
#
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
];
|
||||
|
||||
# Enable Niri as the window manager
|
||||
programs.niri.enable = true;
|
||||
|
||||
# Enable LXQt desktop environment components
|
||||
# Note: We don't enable services.xserver.desktopManager.lxqt.enable = true
|
||||
# because it would conflict with our custom display manager configuration
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Install additional LXQt components and utilities
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Core LXQt components that work well with other window managers
|
||||
lxqt.lxqt-panel
|
||||
lxqt.lxqt-session
|
||||
lxqt.lxqt-config
|
||||
lxqt.lxqt-themes
|
||||
lxqt.lxqt-notificationd
|
||||
lxqt.lxqt-powermanagement
|
||||
lxqt.lxqt-policykit
|
||||
lxqt.lxqt-archiver
|
||||
lxqt.qterminal
|
||||
lxqt.pcmanfm-qt
|
||||
lxqt.lximage-qt
|
||||
lxqt.qps
|
||||
|
||||
# Theme engines and styling
|
||||
libsForQt5.qtstyleplugins
|
||||
libsForQt5.qt5ct
|
||||
|
||||
# System tools that integrate well with LXQt
|
||||
lxqt.pavucontrol-qt
|
||||
qpwgraph
|
||||
|
||||
# Network management
|
||||
libsForQt5.networkmanager-qt
|
||||
|
||||
# Custom session script
|
||||
(writeScriptBin "niri-session" ''
|
||||
#!/bin/sh
|
||||
|
||||
# Set up environment
|
||||
export XDG_CURRENT_DESKTOP=LXQt
|
||||
export XDG_SESSION_DESKTOP=lxqt-niri
|
||||
export DESKTOP_SESSION=lxqt-niri
|
||||
|
||||
# Start LXQt session components in background
|
||||
${lxqt.lxqt-session}/bin/lxqt-session &
|
||||
|
||||
# Start Niri as the main session
|
||||
exec ${niri}/bin/niri
|
||||
'')
|
||||
];
|
||||
|
||||
# Configure XDG portals for better integration
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
config = {
|
||||
common = {
|
||||
default = ["gtk"];
|
||||
"org.freedesktop.impl.portal.Screenshot" = ["wlr"];
|
||||
"org.freedesktop.impl.portal.Screencast" = ["wlr"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Use LXQt's polkit agent
|
||||
security.polkit.enable = true;
|
||||
systemd.user.services.lxqt-policykit-agent = {
|
||||
description = "LXQt PolicyKit Agent";
|
||||
wantedBy = ["graphical-session.target"];
|
||||
wants = ["graphical-session.target"];
|
||||
after = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
# Configure Qt theming (basic settings)
|
||||
# Note: More specific Qt theming may be handled by system-wide theming modules
|
||||
|
||||
# Configure Qt theming to use LXQt
|
||||
qt = {
|
||||
platformTheme = lib.mkForce "lxqt";
|
||||
};
|
||||
|
||||
# Environment variables for proper integration
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORMTHEME = lib.mkForce "lxqt";
|
||||
QT_STYLE_OVERRIDE = "kvantum";
|
||||
DESKTOP_SESSION = "lxqt-niri";
|
||||
XDG_CURRENT_DESKTOP = "LXQt";
|
||||
XDG_SESSION_DESKTOP = "lxqt-niri";
|
||||
};
|
||||
|
||||
# Enable necessary services for LXQt functionality
|
||||
services = {
|
||||
# Power management
|
||||
upower.enable = true;
|
||||
};
|
||||
|
||||
# Create a custom session file for LXQt + Niri
|
||||
environment.etc."xdg/lxqt/session.conf".text = ''
|
||||
[General]
|
||||
__userfile__=true
|
||||
window_manager=niri
|
||||
'';
|
||||
|
||||
# Create desktop entry for the session
|
||||
environment.etc."wayland-sessions/lxqt-niri.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=LXQt (Niri)
|
||||
Comment=LXQt Desktop with Niri Window Manager
|
||||
Exec=niri-session
|
||||
Type=Application
|
||||
Keywords=niri;lxqt;wayland;
|
||||
'';
|
||||
}
|
||||
@@ -9,12 +9,31 @@
|
||||
|
||||
programs.niri.enable = true;
|
||||
|
||||
# XDG Desktop Portal for niri
|
||||
# Use KDE portal instead of GNOME for better KDE integration
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gnome
|
||||
kdePackages.xdg-desktop-portal-kde
|
||||
];
|
||||
config.common.default = "kde";
|
||||
};
|
||||
|
||||
# Use KDE polkit for authentication instead of GNOME
|
||||
security.polkit.enable = true;
|
||||
systemd = {
|
||||
user.services.polkit-kde-authentication-agent-1 = {
|
||||
description = "polkit-kde-authentication-agent-1";
|
||||
wantedBy = ["graphical-session.target"];
|
||||
wants = ["graphical-session.target"];
|
||||
after = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
17
hosts/common/optional/services/printing.nix
Normal file
17
hosts/common/optional/services/printing.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
# Enable printing support
|
||||
{pkgs, ...}: {
|
||||
# Autodiscovery of network printers
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
stylix.autoEnable = true;
|
||||
stylix.targets.vscode.enable = false;
|
||||
stylix.targets.vscode.enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -26,20 +26,22 @@ in {
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
package = pkgs.inter;
|
||||
name = "Inter";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-code;
|
||||
name = "Fira Code Nerd Font";
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono Nerd Font Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 10;
|
||||
applications = 10; # whole-number size
|
||||
desktop = 10;
|
||||
popups = 10;
|
||||
terminal = 10;
|
||||
@@ -49,12 +51,12 @@ in {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
programs.vscode = {
|
||||
extensions = pkgs.nix4vscode.forVscode [
|
||||
extensions = pkgs.nix4vscode.forVscodeVersion pkgs.vscode.version [
|
||||
"huytd.tokyo-city"
|
||||
"vscode-icons-team.vscode-icons"
|
||||
];
|
||||
userSettings = {
|
||||
"workbench.colorTheme" = "Tokyo City Darker";
|
||||
#"workbench.colorTheme" = "Tokyo City Darker";
|
||||
"workbench.iconTheme" = "vscode-icons";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
|
||||
# This is your main performance tuning knob. 'performance' tells the CPU
|
||||
# to aggressively ramp up to high clock speeds when it detects a load.
|
||||
# 'balance_power' is a good choice for extending battery life.
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
# 'balance_performance' provides good performance while being more thermal-aware.
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
|
||||
# Allow the CPU to use its full performance range when plugged in.
|
||||
# Allow the CPU to use its performance range when plugged in, but cap it
|
||||
# slightly to reduce heat generation while maintaining good responsiveness.
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MAX_PERF_ON_AC = 85; # Reduced from 100% to help with thermal management
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 60; # Slightly higher than before for better battery responsiveness.
|
||||
|
||||
@@ -42,9 +43,9 @@
|
||||
|
||||
# --- Intel Arc GPU & System Settings ---
|
||||
|
||||
# Set the platform profile. 'balanced' is a much safer bet than 'performance'
|
||||
# to avoid overwhelming the chassis's cooling solution.
|
||||
PLATFORM_PROFILE_ON_AC = "balanced";
|
||||
# Set the platform profile. 'low-power' is more conservative than 'balanced'
|
||||
# to help with thermal management while still providing reasonable performance.
|
||||
PLATFORM_PROFILE_ON_AC = "low-power";
|
||||
PLATFORM_PROFILE_ON_BAT = "low-power";
|
||||
|
||||
# Use 'powersupersave' for PCIe ASPM. This allows the components,
|
||||
|
||||
Reference in New Issue
Block a user