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,19 @@
{ pkgs, ... }:
{
# Browser configurations
home.packages = with pkgs; [
firefox
# chromium
# brave
];
# Firefox config (expand as needed)
# programs.firefox = {
# enable = true;
# profiles.default = {
# settings = {
# "browser.startup.homepage" = "about:home";
# };
# };
# };
}

View file

@ -0,0 +1,28 @@
{ pkgs, lib, ... }:
{
# Terminal emulators
# Kitty - GPU-accelerated terminal
programs.kitty = {
enable = lib.mkDefault false;
# theme = "Dracula";
# settings = {
# font_family = "JetBrains Mono";
# font_size = 12;
# };
};
# Alacritty - GPU-accelerated terminal
programs.alacritty = {
enable = lib.mkDefault false;
# settings = {
# font.normal.family = "JetBrains Mono";
# font.size = 12;
# };
};
# WezTerm - GPU-accelerated terminal
# programs.wezterm = {
# enable = false;
# };
}

View file

@ -0,0 +1,36 @@
{ lib, pkgs, config, ... }:
{
# Base desktop user configuration
# GTK theming
gtk = {
enable = lib.mkDefault true;
theme = lib.mkDefault {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
# Qt theming
qt = {
enable = lib.mkDefault true;
platformTheme.name = lib.mkDefault "gtk";
style.name = lib.mkDefault "adwaita-dark";
};
# XDG user directories
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = true;
};
};
# Basic GUI packages
home.packages = with pkgs; [
# Add common desktop apps here
# firefox
# vscodium
];
}

View file

@ -0,0 +1,21 @@
# Themes
Add your theme configurations here. Each theme should set:
- GTK theme
- Qt theme
- Terminal colors
- Compositor colors (if applicable)
- Wallpapers
Example structure:
```nix
# catppuccin.nix
{ pkgs, ... }: {
gtk.theme = {
name = "Catppuccin-Mocha";
package = pkgs.catppuccin-gtk;
};
# ... more theme settings
}
```

View file

@ -0,0 +1,11 @@
{ ... }:
{
# Wayland compositor configurations
# Import the compositor you want to use
imports = [
# Uncomment the one you want:
# ./hyprland
# ./niri
];
}

View file

@ -0,0 +1,46 @@
{ lib, pkgs, ... }:
{
# Hyprland user configuration
wayland.windowManager.hyprland = {
enable = lib.mkDefault true;
xwayland.enable = lib.mkDefault true;
settings = {
# Minimal config - expand as needed
"$mod" = "SUPER";
# Example keybinds
bind = [
"$mod, Return, exec, kitty" # Terminal
"$mod, Q, killactive"
"$mod, M, exit"
"$mod, F, fullscreen"
"$mod, Space, togglefloating"
# Move focus
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
];
# Example settings
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 2;
};
decoration = {
rounding = 8;
};
};
};
# Hyprland utilities
home.packages = with pkgs; [
# wofi # Launcher
# waybar # Status bar
# dunst # Notifications
];
}

View file

@ -0,0 +1,39 @@
{ lib, pkgs, ... }:
{
# Niri user configuration
programs.niri = {
settings = {
# Minimal config - expand as needed
input = {
keyboard.xkb = {
layout = "us";
};
};
# Example keybinds
binds = {
"Mod+Return".action.spawn = [ "kitty" ];
"Mod+Q".action.close-window = { };
"Mod+F".action.fullscreen-window = { };
# Focus movement
"Mod+H".action.focus-column-left = { };
"Mod+L".action.focus-column-right = { };
"Mod+J".action.focus-window-down = { };
"Mod+K".action.focus-window-up = { };
};
layout = {
gaps = 8;
center-focused-column = "never";
};
};
};
# Niri utilities
home.packages = with pkgs; [
# fuzzel # Launcher (recommended for niri)
# waybar # Status bar
# dunst # Notifications
];
}

14
modules/nixos/audio.nix Normal file
View file

@ -0,0 +1,14 @@
{ lib, ... }:
{
# Modern audio stack - PipeWire replaces PulseAudio + JACK + ALSA
services.pipewire = {
enable = lib.mkDefault true;
alsa.enable = lib.mkDefault true;
alsa.support32Bit = lib.mkDefault true; # For 32-bit games/apps
pulse.enable = lib.mkDefault true; # PulseAudio compatibility
jack.enable = lib.mkDefault true; # JACK compatibility
};
# Real-time audio priority
security.rtkit.enable = lib.mkDefault true;
}

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
hardware.bluetooth = {
enable = lib.mkDefault false; # Enable when needed
powerOnBoot = lib.mkDefault true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
Experimental = true; # Better codec support
};
};
};
}

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
}

40
modules/nixos/fonts.nix Normal file
View file

@ -0,0 +1,40 @@
{ lib, pkgs, ... }:
{
fonts = {
enableDefaultPackages = lib.mkDefault true;
packages = with pkgs; [
# Nerd Fonts for terminal icons
(nerdfonts.override {
fonts = [
"FiraCode"
"JetBrainsMono"
"Iosevka"
];
})
# Core fonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
# Code fonts
fira-code
jetbrains-mono
];
fontconfig = {
enable = lib.mkDefault true;
defaultFonts = {
monospace = [
"JetBrains Mono"
"FiraCode Nerd Font"
];
sansSerif = [ "Noto Sans" ];
serif = [ "Noto Serif" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
}

View file

@ -0,0 +1,22 @@
{ lib, pkgs, ... }:
{
# Hardware acceleration (OpenGL/Vulkan)
hardware.graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true; # For 32-bit games/apps
extraPackages = with pkgs; [
# Common drivers (expand based on your hardware)
mesa.drivers
vulkan-validation-layers
vulkan-tools
# Intel-specific (comment out if not using Intel)
intel-media-driver
intel-vaapi-driver
# AMD-specific (comment out if not using AMD)
# rocmPackages.clr.icd
];
};
}

View file

@ -0,0 +1,24 @@
{ ... }:
{
# Desktop user configuration (for Hyprland/Niri setups)
imports = [
# Base CLI tools
../../home/rsydn/base.nix
# Desktop additions
../../home/rsydn/desktop/base.nix
../../home/rsydn/desktop/apps/browsers.nix
../../home/rsydn/desktop/apps/terminals.nix
# Choose your compositor
../../home/rsydn/desktop/wayland
# Enable specific compositor in wayland/default.nix
# Add theme when ready
# ../../home/rsydn/desktop/themes/catppuccin.nix
];
# Override options here
# programs.kitty.enable = true;
}

View file

@ -0,0 +1,32 @@
{ pkgs, ... }:
{
# Gaming user configuration (for KDE Plasma)
imports = [
# Base CLI tools
../../home/rsydn/base.nix
# Desktop base
../../home/rsydn/desktop/base.nix
../../home/rsydn/desktop/apps/browsers.nix
];
# Gaming-specific user packages
home.packages = with pkgs; [
# Communication
# discord
# teamspeak_client
# Streaming/Recording
# obs-studio
# Media
# spotify
];
# KDE-specific settings (optional)
# programs.plasma = {
# enable = true;
# workspace.theme = "breeze-dark";
# };
}

View file

@ -0,0 +1,42 @@
{ pkgs, ... }:
{
# Example desktop development workstation configuration
# Copy and modify for your actual hardware
# Boot configuration (adjust for your system)
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Hostname
networking.hostName = "desktop-dev";
# Import desktop environment (choose one)
imports = [
../desktops/hyprland.nix
# ../desktops/plasma.nix
# ../desktops/niri.nix
];
# Hardware-specific settings (adjust for your hardware)
# boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
# GPU drivers (uncomment if using NVIDIA)
# services.xserver.videoDrivers = [ "nvidia" ];
# hardware.nvidia = {
# modesetting.enable = true;
# open = false; # Use proprietary driver
# };
# Optional: Enable bluetooth
# hardware.bluetooth.enable = true;
# Development-specific packages
environment.systemPackages = with pkgs; [
# Add desktop dev tools here
# docker-compose
# k9s
];
# This value determines the NixOS release compatibility
system.stateVersion = "24.05";
}

View file

@ -0,0 +1,53 @@
{ pkgs, ... }:
{
# Example gaming desktop configuration
# Copy and modify for your actual hardware
# Boot configuration
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Hostname
networking.hostName = "gaming-rig";
# Import KDE Plasma for gaming
imports = [ ../desktops/plasma.nix ];
# Gaming-specific settings
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
# GameMode for performance optimization
programs.gamemode.enable = true;
# GPU drivers (example: NVIDIA)
# services.xserver.videoDrivers = [ "nvidia" ];
# hardware.nvidia = {
# modesetting.enable = true;
# powerManagement.enable = false;
# open = false;
# package = config.boot.kernelPackages.nvidiaPackages.stable;
# };
# Gaming packages
environment.systemPackages = with pkgs; [
# Launchers
lutris
heroic
# bottles
# Tools
mangohud # FPS overlay
# gamescope # Gaming compositor
# protonup-qt # Proton version manager
# Communication
discord
];
# This value determines the NixOS release compatibility
system.stateVersion = "24.05";
}