init(release): desktop template -> desktop wip

This commit is contained in:
Rasyidan Akbar F. 2025-10-24 11:08:12 +07:00
commit 5bc78a031f
22 changed files with 716 additions and 11 deletions

View file

@ -0,0 +1,34 @@
# Desktop Environments
This directory contains system-level desktop environment configurations.
## Available Desktop Environments
- `hyprland.nix` - Dynamic tiling Wayland compositor
- `plasma.nix` - KDE Plasma 6 desktop environment
- `niri.nix` - Scrollable-tiling Wayland compositor
- `base.nix` - Shared desktop settings (imported by all DEs)
## Usage
Import one desktop environment in your host configuration:
```nix
# modules/nixos/hosts/your-host.nix
{
imports = [
../desktops/hyprland.nix
# OR
# ../desktops/plasma.nix
# OR
# ../desktops/niri.nix
];
}
```
## Adding a New Desktop Environment
1. Create a new file (e.g., `gnome.nix`)
2. Import `./base.nix`
3. Enable the desktop environment
4. Add essential system packages

View file

@ -0,0 +1,28 @@
{ lib, pkgs, ... }:
{
# Shared desktop settings (imported by all DEs)
# XDG portals for desktop integration
xdg.portal = {
enable = lib.mkDefault true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Policy kit for privilege escalation
security.polkit.enable = lib.mkDefault true;
# GVFS for trash, mounting, etc
services.gvfs.enable = lib.mkDefault true;
# Common desktop packages
environment.systemPackages = with pkgs; [
# File managers (choose one)
# nautilus # GNOME
# dolphin # KDE
# thunar # XFCE
# Basic utilities
pavucontrol # Audio control
networkmanagerapplet # Network management GUI
];
}

View file

@ -0,0 +1,31 @@
{ pkgs, lib, ... }:
{
imports = [ ./base.nix ];
# Hyprland - Dynamic tiling Wayland compositor
programs.hyprland = {
enable = lib.mkDefault true;
xwayland.enable = lib.mkDefault true;
};
# Wayland-specific portal
xdg.portal.wlr.enable = lib.mkDefault true;
# Essential Wayland tools (system-level)
environment.systemPackages = with pkgs; [
# Wayland essentials
wayland
wl-clipboard
wlr-randr
# Screenshot & screen recording
grim # Screenshot
slurp # Region selector
# wf-recorder # Screen recording (optional)
# Add your preferred apps here
# kitty # Terminal
# wofi # Launcher
# waybar # Bar
];
}

View file

@ -0,0 +1,28 @@
{ pkgs, lib, ... }:
{
imports = [ ./base.nix ];
# Niri - Scrollable-tiling Wayland compositor
programs.niri = {
enable = lib.mkDefault true;
};
# Wayland-specific portal
xdg.portal.wlr.enable = lib.mkDefault true;
# Essential Wayland tools
environment.systemPackages = with pkgs; [
# Wayland essentials
wayland
wl-clipboard
# Screenshot tools
grim
slurp
# Add your preferred apps here
# kitty # Terminal
# fuzzel # Launcher (recommended for niri)
# waybar # Bar
];
}

View file

@ -0,0 +1,16 @@
{ lib, ... }:
{
imports = [ ./base.nix ];
# KDE Plasma 6
services.desktopManager.plasma6.enable = lib.mkDefault true;
# SDDM display manager
services.displayManager.sddm = {
enable = lib.mkDefault true;
wayland.enable = lib.mkDefault true;
};
# KDE apps are managed by Plasma
# Add extra packages in your host config if needed
}