feat: extract some config into modules

This commit is contained in:
2026-02-21 03:16:16 +01:00
parent 507a138cde
commit cc96675ea3
5 changed files with 141 additions and 0 deletions

51
modules/nixos/desktop.nix Normal file
View File

@@ -0,0 +1,51 @@
{
lib,
config,
pkgs,
...
}:
{
options = {
desktop = {
enable = lib.mkEnableOption "base desktop environment";
};
};
config = lib.mkIf config.desktop.enable {
# Audio
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
# Security
security.polkit.enable = true;
# D-Bus
services.dbus.enable = true;
# Player control
services.playerctld.enable = true;
# XDG Portals
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
];
};
# Fonts
fonts.packages = with pkgs; [
font-awesome
nerd-fonts.jetbrains-mono
maple-mono.NF
];
};
}