Files
NixOsConfig/modules/desktop/noctalia.nix
T
Claude 6e2fa1b9e7 Port the desktop aspects: Noctalia, audio, fonts, XDG, apps
Replace the T1 stubs with the real modules, ported from 030e97e without
behaviour changes except the intended theme ones (DESIGN.md section 11).

- noctalia: NixOS half (module, package, recommendedServices, attaches the
  home-manager half to the owner) and home-manager half (user service,
  shell settings). The noctalia flake's modules list home-manager's and
  nixpkgs' own `programs.noctalia` in `disabledModules`, so nothing is
  declared twice. The `theme` block and `font_family` are gone: Stylix's
  noctalia target writes the custom palette `stylix` and the shell font
  (Monaspace Krypton, via the override in theme/stylix.nix).
- audio: PipeWire body unchanged.
- fonts: coverage fonts only; the theme fonts and fontconfig defaults come
  from Stylix.
- xdg, apps: bodies unchanged.

The generated noctalia config.toml builds and passes
`noctalia config validate`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
2026-10-12 21:07:34 +00:00

68 lines
2.5 KiB
Nix

# 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;
};
};
};
}