# Noctalia v5 shell (bar, launcher, notifications, lock screen, wallpaper), # both halves of one feature: # NixOS the package and the services its panels talk to # (NetworkManager, Bluetooth, UPower, power profiles). The user # service is started by home-manager, so # `programs.noctalia.systemd` stays off here. # home-manager the user service and the shell settings. # The NixOS half adds the home-manager half to the owner, so a host imports # `nixos.noctalia` once. # # The modules come from the noctalia flake. home-manager ships its own # `programs.noctalia` too (modules/programs/noctalia), and nixpkgs has one for # NixOS; the flake's modules list those in `disabledModules`, so importing them # here replaces the others and nothing is declared twice. They are imported # only in this file (a module value imported twice declares its options twice). # # Colours: Stylix's `noctalia` target (theme/stylix.nix) writes the custom # palette `stylix` and `theme.*`; the shell font comes from the same target # (overridden to Monaspace Krypton there). So no `theme` and no `font_family` # here. Settings are validated at build time by `noctalia config validate`, so # only keys from the upstream schema may appear. Anything changed in the # settings window at runtime is stored separately and overrides the file. { config, inputs, ... }: let inherit (config.meta) owner; hmNoctalia = config.flake.modules.homeManager.noctalia; in { flake.modules.nixos.noctalia = { pkgs, ... }: { imports = [ inputs.noctalia.nixosModules.default ]; home-manager.users.${owner.name}.imports = [ hmNoctalia ]; programs.noctalia = { enable = true; package = pkgs.noctalia; # NetworkManager, Bluetooth, UPower and power-profiles-daemon, which the # shell's panels talk to. recommendedServices.enable = true; }; }; flake.modules.homeManager.noctalia = { imports = [ inputs.noctalia.homeModules.default ]; programs.noctalia = { enable = true; # A user service instead of hl.exec_cmd, so it restarts on failure and # follows graphical-session.target (managed by UWSM). systemd.enable = true; settings.shell = { telemetry_enabled = false; # No other polkit agent is started in the session. polkit_agent = true; # Apps started from the launcher get their own systemd scope, so # restarting the shell service does not kill them. launch_apps_as_systemd_services = true; }; }; }; }