Refactor home manager, and add desktop node on sparky.
This commit is contained in:
56
common/desktop-node.nix
Normal file
56
common/desktop-node.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable Hyprland (Wayland compositor)
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true; # For compatibility with X11 apps if needed
|
||||
};
|
||||
|
||||
# Essential desktop services
|
||||
services.dbus.enable = true;
|
||||
|
||||
# polkit for privilege escalation
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Enable sound with pipewire
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# XDG portal for screen sharing, file pickers, etc.
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
};
|
||||
|
||||
# Fonts
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
];
|
||||
|
||||
# Enable GDM for login (can also use greetd or ly for lighter options)
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Environment variables for Wayland
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1"; # Hint electron apps to use Wayland
|
||||
WLR_NO_HARDWARE_CURSORS = "1"; # Fix cursor rendering on some hardware
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user