Files
nix-config/home/linux/gui/base/noctalia/default.nix
T
Ryan Yin 063c31cc30 refactor(noctalia): hot-reload config via out-of-store symlink
`programs.noctalia.settings` deploys the TOML as a store symlink, so every edit needs a `home-manager switch`. Deploy the baseline from the config layer with `mkOutOfStoreSymlink` instead: Noctalia hot-reloads config-layer files and never rewrites them, so edits apply live while Settings UI changes stay in ~/.local/state/noctalia/settings.toml (which loads last) and out of the repo.

Update the docs and host-specific comments to match the two-layer model.
2026-09-20 10:35:48 +08:00

35 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
wallpapers,
...
}:
{
# Use the upstream Home Manager module (shipped by home-manager itself) for
# the package. The config file is not deployed through `programs.noctalia.settings`:
# that writes a store symlink, so every edit needs a home-manager switch.
# https://docs.noctalia.dev/noctalia/getting-started/nixos/#home-manager
programs.noctalia.enable = true;
# Deploy the baseline as an out-of-store symlink in the config layer. Noctalia
# never rewrites files under ~/.config/noctalia/, so manual edits hot-reload
# without a switch, while Settings UI changes stay in the state layer
# (~/.local/state/noctalia/settings.toml), which loads last and wins - keeping
# volatile runtime data (wallpaper rotation, widget geometry) out of the repo.
# Host-specific tweaks are separate config-layer files (~/.config/noctalia/host-<host>.toml).
xdg.configFile."noctalia/config.toml".source =
config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nix-config/home/linux/gui/base/noctalia/config/config.toml";
# Noctalia v5 is started by niri's spawn-at-startup (see the niri conf), so
# app2unit is still used to launch desktop entries as systemd user units.
home.packages = [
pkgs.app2unit # Launch Desktop Entries (or arbitrary commands) as Systemd user units
]
++ (lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [
pkgs.gpu-screen-recorder # recoding screen
]);
home.file."Pictures/Wallpapers".source = wallpapers;
}