nixos/shared/modules/system/noctalia-system.nix
2026-04-14 14:04:31 -06:00

59 lines
1.8 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.noctaliaSystem;
unstable = import inputs.nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
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
# Override package with calendar support for evolution-data-server integration
services.noctalia-shell = {
enable = cfg.enableSystemdService;
package = inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
calendarSupport = true;
};
};
# Required system services for Noctalia features
# Evolution data server and Evolution - for calendar events support in Noctalia
services.gnome.evolution-data-server.enable = mkDefault true;
# TODO)) switched to unstable instead of pkgs.evolution due to spam swarm build error Apr 14, 2026
# Can be changed back at some point to stable.
environment.systemPackages = [ unstable.evolution ];
# 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;
};
}