nixos/shared/modules/system/noctalia-system.nix

43 lines
1.2 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.noctaliaSystem;
in
{
# Import Noctalia's NixOS module for systemd service
imports = [
inputs.noctalia.nixosModules.default
];
options.noctaliaSystem = {
enable = mkEnableOption "Noctalia shell system-level configuration";
enableSystemdService = mkOption {
type = types.bool;
default = true;
description = "Enable the Noctalia systemd service (starts after graphical-session.target)";
};
};
config = mkIf cfg.enable {
# Enable the systemd service if requested
services.noctalia-shell.enable = cfg.enableSystemdService;
# Required system services for Noctalia features
# NetworkManager - for wifi widget
networking.networkmanager.enable = mkDefault true;
# Bluetooth - for bluetooth widget
hardware.bluetooth.enable = mkDefault true;
# UPower - for battery widget
services.upower.enable = mkDefault true;
# Power profiles daemon - for power profile switching in Noctalia
# Note: This conflicts with auto-cpufreq, so we use power_manager module's option
services.power-profiles-daemon.enable = mkDefault true;
};
}