noctalia.nix (4676B)
1 # modules/features/desktop/noctalia.nix — Noctalia Shell (bar, launcher, 2 # notifications, control centre, lock screen, wallpaper) as a wrapped, 3 # portable package: `nix run ~/NixDaemon#noctalia`. Niri spawns it at startup 4 # (niri.nix). Rosé Pine Main is Noctalia's own "Rosepine" scheme (dark half = 5 # base #191724, rose #ebbcba); never Moon. 6 # 7 # The settings below live in the Nix store (NOCTALIA_SETTINGS_FILE), so the 8 # GUI settings panel (right-click the bar) changes them for the running 9 # session only. To keep a change: tweak it in the GUI, then 10 # 11 # dump-noctalia-shell (in the same package) prints the live settings as Nix 12 # 13 # and copy the keys that differ from Noctalia's defaults into `settings` here. 14 { inputs, ... }: 15 { 16 perSystem = 17 { pkgs, lib, ... }: 18 let 19 identity = import ../../hosts/laptop/_identity.nix; 20 mkNoctalia = overrides: inputs.wrapper-modules.wrappers.noctalia-shell.wrap { 21 inherit pkgs; 22 settings = lib.recursiveUpdate { 23 24 # Noctalia's current settings schema (Commons/Settings.qml). Without 25 # it every migration since v0 runs at start, one of them against 26 # ~/.config/noctalia. Bump it when noctalia-shell is updated 27 # (`dump-noctalia-shell` prints the value it expects). 28 settingsVersion = 59; 29 colorSchemes = { 30 predefinedScheme = "Rosepine"; 31 darkMode = true; 32 useWallpaperColors = false; # never derive colours from the wallpaper 33 }; 34 bar = { 35 position = "top"; 36 density = "compact"; 37 # Noctalia's default layout (Commons/Settings.qml), spelled out 38 # because the two end buttons carry the NixOS snowflake instead of 39 # their stock icons: `useDistroLogo` shows the logo /etc/os-release 40 # names (nix-snowflake, the blue one from the hicolor theme), and 41 # with colorization left off it keeps its own colours. Drop the 42 # `useDistroLogo` on ControlCenter to get its Noctalia glyph back. 43 widgets = { 44 left = [ 45 { id = "Launcher"; useDistroLogo = true; } 46 { id = "Clock"; } 47 { id = "SystemMonitor"; } 48 { id = "ActiveWindow"; } 49 { id = "MediaMini"; } 50 ]; 51 center = [ { id = "Workspace"; } ]; 52 right = [ 53 { id = "Tray"; } 54 { id = "NotificationHistory"; } 55 { id = "Battery"; } 56 { id = "Volume"; } 57 { id = "Brightness"; } 58 { id = "ControlCenter"; useDistroLogo = true; } 59 ]; 60 }; 61 }; 62 dock = { 63 # the auto-hiding dock gets the same snowflake as its launcher button 64 showLauncherIcon = true; 65 launcherUseDistroLogo = true; 66 }; 67 general = { 68 lockOnSuspend = true; 69 telemetryEnabled = false; 70 }; 71 ui.fontDefault = "Noto Sans"; # fontFixed: Noctalia's default, or the -daemon font 72 wallpaper = { 73 enabled = true; 74 # the same Rosé Pine wallpapers Caelestia uses (modules/home/caelestia.nix): 75 # three sets in subfolders, so the picker searches recursively 76 viewMode = "recursive"; 77 fillMode = "crop"; 78 }; 79 location = { 80 useFahrenheit = false; 81 use12hourFormat = false; 82 }; 83 appLauncher = { 84 terminalCommand = "kitty -e"; 85 enableClipboardHistory = true; # the Ctrl+Super+V bind (niri.nix) opens this tab; needs cliphist + wl-paste (modules/home/session.nix) 86 }; 87 idle = { 88 enabled = true; 89 lockTimeout = 600; # Noctalia's own lock screen after ten idle minutes 90 screenOffTimeout = 1200; # as the Hyprland side (20 min) 91 suspendTimeout = 0; # never: Noctalia's default is 30 min, and NVIDIA suspend is untested here (nvidia.nix) 92 }; 93 } overrides; 94 }; 95 in 96 { 97 # The shared settings. packages.noctalia is these as they stand (what 98 # anyone running the flake gets); packages.noctalia-daemon layers the 99 # author's location, wallpaper directory and font on top 100 # (modules/hosts/laptop/_identity.nix). 101 packages.noctalia = mkNoctalia { }; 102 packages.noctalia-daemon = mkNoctalia { 103 location.name = identity.weather.name; # dashboard weather, as in Caelestia 104 wallpaper.directory = "/home/daemonsec/Pictures/Wallpapers"; 105 ui.fontFixed = "DMMono Nerd Font"; 106 }; 107 }; 108 }