diff --git a/modules/desktop/shells/dms/_private/default-settings.nix b/modules/desktop/shells/dms/_private/default-settings.nix index 7743f39..f21b921 100644 --- a/modules/desktop/shells/dms/_private/default-settings.nix +++ b/modules/desktop/shells/dms/_private/default-settings.nix @@ -1,5 +1,6 @@ -# Defaults written once to ~/.config/DankMaterialShell/settings.json on first login. -# After that, DMS settings are owned by the UI — rebuilds do not overwrite them. +# Generic defaults written once to ~/.config/DankMaterialShell/settings.json on first login. +# Hosts can override via `chiasson.desktop.shells.dms.defaultSettingsFile` (see 14900k). +# After seeding, DMS settings are owned by the UI — rebuilds do not overwrite them. { lib, gpuTempEnabled ? true, diff --git a/modules/desktop/shells/dms/default.nix b/modules/desktop/shells/dms/default.nix index 7b7422e..77d52df 100644 --- a/modules/desktop/shells/dms/default.nix +++ b/modules/desktop/shells/dms/default.nix @@ -38,6 +38,15 @@ example = [ "sudo" "nixos-rebuild" "switch" "--flake" ".#14900k" ]; description = "Command used by DMS nix-monitor widget for rebuild actions."; }; + defaultSettingsFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + example = ./dms-default-settings.json; + description = '' + Host-specific first-run `settings.json` seed. When set, replaces the bundled + `default-settings.nix` template on fresh profiles. + ''; + }; }; }; @@ -85,6 +94,7 @@ ]) ++ (cfg.extraRightBarWidgets or [ ]); programs.nix-monitor.rebuildCommand = rebuildCommand; + dms.defaultSettingsFile = cfg.defaultSettingsFile or null; }; }; } diff --git a/modules/desktop/shells/dms/home-manager/default.nix b/modules/desktop/shells/dms/home-manager/default.nix index 73b64bc..ec51d53 100644 --- a/modules/desktop/shells/dms/home-manager/default.nix +++ b/modules/desktop/shells/dms/home-manager/default.nix @@ -59,10 +59,14 @@ ''; jsonFormat = pkgs.formats.json { }; - dmsSeedSettings = import ../_private/default-settings.nix { - inherit lib gpuTempEnabled; - extraRightBarWidgets = cfg.extraRightBarWidgets; - }; + dmsSeedSettings = + if cfg.defaultSettingsFile != null then + builtins.fromJSON (builtins.readFile cfg.defaultSettingsFile) + else + import ../_private/default-settings.nix { + inherit lib gpuTempEnabled; + extraRightBarWidgets = cfg.extraRightBarWidgets; + }; dmsSeedFile = jsonFormat.generate "dms-settings-seed.json" dmsSeedSettings; dmsSettingsPath = "${config.xdg.configHome}/DankMaterialShell/settings.json"; @@ -126,6 +130,15 @@ in { dms.enableRbwLockToggle = lib.mkEnableOption '' Ship rbw-lock-toggle into `~/.config/DankMaterialShell/plugins/rbwLockToggle/` (directory name matches plugin id; Bitwarden vault lock/unlock in the bar). ''; + + dms.defaultSettingsFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = '' + Host-specific first-run `settings.json` seed. When set, replaces the bundled + `default-settings.nix` template on fresh profiles. + ''; + }; }; imports = [ diff --git a/modules/hosts/14900k/_private/dms-default-settings.json b/modules/hosts/14900k/_private/dms-default-settings.json new file mode 100644 index 0000000..7508782 --- /dev/null +++ b/modules/hosts/14900k/_private/dms-default-settings.json @@ -0,0 +1,678 @@ +{ + "currentThemeName": "dynamic", + "currentThemeCategory": "generic", + "customThemeFile": "", + "registryThemeVariants": {}, + "matugenScheme": "scheme-tonal-spot", + "runUserMatugenTemplates": true, + "matugenTargetMonitor": "", + "popupTransparency": 1, + "dockTransparency": 1, + "widgetBackgroundColor": "sch", + "widgetColorMode": "default", + "controlCenterTileColorMode": "primary", + "buttonColorMode": "primary", + "cornerRadius": 12, + "niriLayoutGapsOverride": -1, + "niriLayoutRadiusOverride": -1, + "niriLayoutBorderSize": -1, + "hyprlandLayoutGapsOverride": -1, + "hyprlandLayoutRadiusOverride": -1, + "hyprlandLayoutBorderSize": -1, + "mangoLayoutGapsOverride": -1, + "mangoLayoutRadiusOverride": -1, + "mangoLayoutBorderSize": -1, + "use24HourClock": false, + "showSeconds": true, + "padHours12Hour": false, + "useFahrenheit": false, + "windSpeedUnit": "kmh", + "nightModeEnabled": false, + "animationSpeed": 1, + "customAnimationDuration": 500, + "syncComponentAnimationSpeeds": true, + "popoutAnimationSpeed": 1, + "popoutCustomAnimationDuration": 150, + "modalAnimationSpeed": 1, + "modalCustomAnimationDuration": 150, + "enableRippleEffects": true, + "blurEnabled": false, + "blurForegroundLayers": true, + "blurLayerOutlineOpacity": 0.12, + "blurBorderColor": "outline", + "blurBorderCustomColor": "#ffffff", + "blurBorderOpacity": 0.35, + "wallpaperFillMode": "Fill", + "blurredWallpaperLayer": false, + "blurWallpaperOnOverview": false, + "showLauncherButton": true, + "showWorkspaceSwitcher": true, + "showFocusedWindow": true, + "showWeather": true, + "showMusic": true, + "showClipboard": true, + "showCpuUsage": true, + "showMemUsage": true, + "showCpuTemp": true, + "showGpuTemp": true, + "selectedGpuIndex": 0, + "enabledGpuPciIds": [], + "showSystemTray": true, + "systemTrayIconTintMode": "none", + "systemTrayIconTintSaturation": 50, + "systemTrayIconTintStrength": 135, + "showClock": true, + "showNotificationButton": true, + "showBattery": true, + "showControlCenterButton": true, + "showCapsLockIndicator": true, + "controlCenterShowNetworkIcon": true, + "controlCenterShowBluetoothIcon": true, + "controlCenterShowAudioIcon": true, + "controlCenterShowAudioPercent": false, + "controlCenterShowVpnIcon": true, + "controlCenterShowBrightnessIcon": false, + "controlCenterShowBrightnessPercent": false, + "controlCenterShowMicIcon": false, + "controlCenterShowMicPercent": false, + "controlCenterShowBatteryIcon": false, + "controlCenterShowPrinterIcon": false, + "controlCenterShowScreenSharingIcon": true, + "showPrivacyButton": true, + "privacyShowMicIcon": false, + "privacyShowCameraIcon": false, + "privacyShowScreenShareIcon": false, + "controlCenterWidgets": [ + { + "id": "volumeSlider", + "enabled": true, + "width": 50 + }, + { + "id": "brightnessSlider", + "enabled": true, + "width": 50 + }, + { + "id": "wifi", + "enabled": true, + "width": 50 + }, + { + "id": "bluetooth", + "enabled": true, + "width": 50 + }, + { + "id": "audioOutput", + "enabled": true, + "width": 50 + }, + { + "id": "audioInput", + "enabled": true, + "width": 50 + }, + { + "id": "nightMode", + "enabled": true, + "width": 50 + }, + { + "id": "darkMode", + "enabled": true, + "width": 50 + } + ], + "showWorkspaceIndex": true, + "showWorkspaceName": false, + "showWorkspacePadding": false, + "workspaceScrolling": false, + "showWorkspaceApps": true, + "workspaceDragReorder": true, + "maxWorkspaceIcons": 9, + "workspaceAppIconSizeOffset": 1, + "groupWorkspaceApps": true, + "workspaceFollowFocus": false, + "showOccupiedWorkspacesOnly": true, + "reverseScrolling": false, + "dwlShowAllTags": false, + "workspaceColorMode": "default", + "workspaceOccupiedColorMode": "none", + "workspaceUnfocusedColorMode": "default", + "workspaceUrgentColorMode": "default", + "workspaceFocusedBorderEnabled": false, + "workspaceFocusedBorderColor": "primary", + "workspaceFocusedBorderThickness": 2, + "workspaceNameIcons": {}, + "waveProgressEnabled": true, + "scrollTitleEnabled": true, + "audioVisualizerEnabled": true, + "audioScrollMode": "volume", + "audioWheelScrollAmount": 5, + "clockCompactMode": false, + "focusedWindowCompactMode": false, + "runningAppsCompactMode": true, + "barMaxVisibleApps": 0, + "barMaxVisibleRunningApps": 0, + "barShowOverflowBadge": true, + "appsDockHideIndicators": false, + "appsDockColorizeActive": false, + "appsDockActiveColorMode": "primary", + "appsDockEnlargeOnHover": false, + "appsDockEnlargePercentage": 125, + "appsDockIconSizePercentage": 100, + "keyboardLayoutNameCompactMode": false, + "runningAppsCurrentWorkspace": true, + "runningAppsGroupByApp": false, + "runningAppsCurrentMonitor": false, + "appIdSubstitutions": [ + { + "pattern": "Spotify", + "replacement": "spotify", + "type": "exact" + }, + { + "pattern": "beepertexts", + "replacement": "beeper", + "type": "exact" + }, + { + "pattern": "home assistant desktop", + "replacement": "homeassistant-desktop", + "type": "exact" + }, + { + "pattern": "com.transmissionbt.transmission", + "replacement": "transmission-gtk", + "type": "contains" + }, + { + "pattern": "^steam_app_(\\d+)$", + "replacement": "steam_icon_$1", + "type": "regex" + } + ], + "centeringMode": "index", + "clockDateFormat": "dddd, MMMM d", + "lockDateFormat": "dddd, MMMM d", + "greeterRememberLastSession": true, + "greeterRememberLastUser": true, + "greeterEnableFprint": false, + "greeterEnableU2f": false, + "greeterWallpaperPath": "", + "mediaSize": 1, + "appLauncherViewMode": "list", + "spotlightModalViewMode": "list", + "browserPickerViewMode": "grid", + "browserUsageHistory": {}, + "appPickerViewMode": "grid", + "filePickerUsageHistory": {}, + "sortAppsAlphabetically": false, + "appLauncherGridColumns": 4, + "spotlightCloseNiriOverview": true, + "spotlightSectionViewModes": {}, + "appDrawerSectionViewModes": {}, + "niriOverviewOverlayEnabled": true, + "dankLauncherV2Size": "compact", + "dankLauncherV2BorderEnabled": false, + "dankLauncherV2BorderThickness": 2, + "dankLauncherV2BorderColor": "primary", + "dankLauncherV2ShowFooter": true, + "dankLauncherV2UnloadOnClose": false, + "useAutoLocation": false, + "weatherEnabled": true, + "networkPreference": "auto", + "iconTheme": "WhiteSur-dark", + "cursorSettings": { + "theme": "System Default", + "size": 24, + "niri": { + "hideWhenTyping": false, + "hideAfterInactiveMs": 0 + }, + "hyprland": { + "hideOnKeyPress": false, + "hideOnTouch": false, + "inactiveTimeout": 0 + }, + "dwl": { + "cursorHideTimeout": 0 + } + }, + "launcherLogoMode": "apps", + "launcherLogoCustomPath": "", + "launcherLogoColorOverride": "", + "launcherLogoColorInvertOnMode": false, + "launcherLogoBrightness": 0.5, + "launcherLogoContrast": 1, + "launcherLogoSizeOffset": 0, + "fontFamily": "Inter Variable", + "monoFontFamily": "Fira Code", + "fontWeight": 400, + "fontScale": 1, + "notepadUseMonospace": true, + "notepadFontFamily": "", + "notepadFontSize": 14, + "notepadShowLineNumbers": false, + "notepadTransparencyOverride": -1, + "notepadLastCustomTransparency": 0.7, + "soundsEnabled": true, + "useSystemSoundTheme": false, + "soundNewNotification": true, + "soundVolumeChanged": true, + "soundPluggedIn": true, + "acMonitorTimeout": 0, + "acLockTimeout": 0, + "acSuspendTimeout": 0, + "acSuspendBehavior": 0, + "acProfileName": "", + "batteryMonitorTimeout": 0, + "batteryLockTimeout": 0, + "batterySuspendTimeout": 0, + "batterySuspendBehavior": 0, + "batteryProfileName": "", + "batteryChargeLimit": 100, + "lockBeforeSuspend": false, + "loginctlLockIntegration": true, + "fadeToLockEnabled": true, + "fadeToLockGracePeriod": 5, + "fadeToDpmsEnabled": true, + "fadeToDpmsGracePeriod": 5, + "launchPrefix": "", + "brightnessDevicePins": {}, + "wifiNetworkPins": {}, + "bluetoothDevicePins": {}, + "audioInputDevicePins": {}, + "audioOutputDevicePins": {}, + "gtkThemingEnabled": true, + "qtThemingEnabled": true, + "syncModeWithPortal": true, + "terminalsAlwaysDark": true, + "muxType": "tmux", + "muxUseCustomCommand": false, + "muxCustomCommand": "", + "muxSessionFilter": "", + "runDmsMatugenTemplates": true, + "matugenTemplateGtk": true, + "matugenTemplateNiri": true, + "matugenTemplateHyprland": true, + "matugenTemplateMangowc": true, + "matugenTemplateQt5ct": true, + "matugenTemplateQt6ct": true, + "matugenTemplateFirefox": true, + "matugenTemplatePywalfox": true, + "matugenTemplateZenBrowser": true, + "matugenTemplateVesktop": false, + "matugenTemplateEquibop": true, + "matugenTemplateGhostty": true, + "matugenTemplateKitty": true, + "matugenTemplateFoot": true, + "matugenTemplateAlacritty": true, + "matugenTemplateNeovim": false, + "matugenTemplateWezterm": true, + "matugenTemplateDgop": true, + "matugenTemplateKcolorscheme": true, + "matugenTemplateVscode": true, + "matugenTemplateEmacs": true, + "matugenTemplateZed": true, + "showDock": false, + "dockAutoHide": false, + "dockSmartAutoHide": false, + "dockGroupByApp": false, + "dockOpenOnOverview": false, + "dockPosition": 1, + "dockSpacing": 4, + "dockBottomGap": 0, + "dockMargin": 0, + "dockIconSize": 40, + "dockIndicatorStyle": "circle", + "dockBorderEnabled": false, + "dockBorderColor": "surfaceText", + "dockBorderOpacity": 1, + "dockBorderThickness": 1, + "dockIsolateDisplays": false, + "dockLauncherEnabled": false, + "dockLauncherLogoMode": "apps", + "dockLauncherLogoCustomPath": "", + "dockLauncherLogoColorOverride": "", + "dockLauncherLogoSizeOffset": 0, + "dockLauncherLogoBrightness": 0.5, + "dockLauncherLogoContrast": 1, + "dockMaxVisibleApps": 0, + "dockMaxVisibleRunningApps": 0, + "dockShowOverflowBadge": true, + "notificationOverlayEnabled": false, + "notificationPopupShadowEnabled": true, + "notificationPopupPrivacyMode": false, + "modalDarkenBackground": true, + "lockScreenShowPowerActions": true, + "lockScreenShowSystemIcons": true, + "lockScreenShowTime": true, + "lockScreenShowDate": true, + "lockScreenShowProfileImage": true, + "lockScreenShowPasswordField": true, + "lockScreenShowMediaPlayer": true, + "lockScreenPowerOffMonitorsOnLock": false, + "lockAtStartup": false, + "enableFprint": false, + "maxFprintTries": 15, + "enableU2f": false, + "u2fMode": "or", + "lockScreenActiveMonitor": "all", + "lockScreenInactiveColor": "#000000", + "lockScreenNotificationMode": 0, + "hideBrightnessSlider": false, + "notificationTimeoutLow": 5000, + "notificationTimeoutNormal": 5000, + "notificationTimeoutCritical": 0, + "notificationCompactMode": false, + "notificationPopupPosition": 0, + "notificationAnimationSpeed": 1, + "notificationCustomAnimationDuration": 400, + "notificationHistoryEnabled": true, + "notificationHistoryMaxCount": 50, + "notificationHistoryMaxAgeDays": 7, + "notificationHistorySaveLow": true, + "notificationHistorySaveNormal": true, + "notificationHistorySaveCritical": true, + "notificationRules": [], + "osdAlwaysShowValue": false, + "osdPosition": 5, + "osdVolumeEnabled": true, + "osdMediaVolumeEnabled": true, + "osdMediaPlaybackEnabled": false, + "osdBrightnessEnabled": true, + "osdIdleInhibitorEnabled": true, + "osdMicMuteEnabled": true, + "osdCapsLockEnabled": true, + "osdPowerProfileEnabled": false, + "osdAudioOutputEnabled": true, + "powerActionConfirm": true, + "powerActionHoldDuration": 0.5, + "powerMenuActions": [ + "reboot", + "logout", + "poweroff", + "lock", + "suspend", + "restart" + ], + "powerMenuDefaultAction": "logout", + "powerMenuGridLayout": false, + "customPowerActionLock": "", + "customPowerActionLogout": "", + "customPowerActionSuspend": "", + "customPowerActionHibernate": "", + "customPowerActionReboot": "", + "customPowerActionPowerOff": "", + "updaterHideWidget": false, + "updaterUseCustomCommand": false, + "updaterCustomCommand": "", + "updaterTerminalAdditionalParams": "", + "displayNameMode": "system", + "screenPreferences": {}, + "showOnLastDisplay": {}, + "niriOutputSettings": {}, + "hyprlandOutputSettings": {}, + "displayProfiles": {}, + "activeDisplayProfile": {}, + "displayProfileAutoSelect": false, + "displayShowDisconnected": false, + "displaySnapToEdge": true, + "barConfigs": [ + { + "bottomGap": 0, + "centerWidgets": [ + { + "id": "unifiedTaskbar", + "enabled": true + } + ], + "enabled": true, + "id": "default", + "innerPadding": 4, + "leftWidgets": [ + { + "id": "launcherButton", + "enabled": true + } + ], + "maximizeDetection": true, + "name": "Main Bar", + "position": 1, + "rightWidgets": [ + { + "id": "clock", + "enabled": true + } + ], + "screenPreferences": [ + "all" + ], + "showOnLastDisplay": true, + "spacing": 0, + "squareCorners": true, + "transparency": 1, + "visible": true, + "widgetTransparency": 0.45, + "gothCornersEnabled": true, + "borderEnabled": false, + "widgetOutlineEnabled": true, + "widgetOutlineOpacity": 0.4, + "widgetOutlineThickness": 2, + "fontScale": 1.1, + "iconScale": 1.1, + "autoHide": false, + "clickThrough": false, + "openOnOverview": false, + "widgetPadding": 12, + "popupGapsAuto": true, + "popupGapsManual": 4, + "noBackground": false, + "maximizeWidgetIcons": false, + "maximizeWidgetText": false, + "removeWidgetPadding": false, + "gothCornerRadiusOverride": false, + "widgetOutlineColor": "primary", + "shadowIntensity": 0 + }, + { + "id": "bar1781999813733", + "name": "Bar 2", + "enabled": true, + "position": 3, + "screenPreferences": [ + { + "name": "DP-3", + "model": "34GL750" + } + ], + "showOnLastDisplay": false, + "leftWidgets": [ + { + "id": "rbwLockToggle", + "enabled": true + }, + { + "id": "cpuUsage", + "enabled": true, + "minimumWidth": true + }, + { + "id": "cpuTemp", + "enabled": true, + "minimumWidth": true + }, + { + "id": "memUsage", + "enabled": true, + "minimumWidth": true + }, + { + "id": "gpuTemp", + "enabled": true, + "selectedGpuIndex": 0, + "pciId": "", + "minimumWidth": true + }, + { + "id": "diskUsage", + "enabled": true, + "mountPath": "/" + } + ], + "centerWidgets": [ + { + "id": "privacyIndicator", + "enabled": true + } + ], + "rightWidgets": [ + { + "id": "homeAssistantMonitor", + "enabled": true + }, + { + "id": "notificationButton", + "enabled": true + }, + { + "id": "systemTray", + "enabled": true + }, + { + "id": "controlCenterButton", + "enabled": true, + "showNetworkIcon": true, + "showBluetoothIcon": true, + "showAudioIcon": true, + "showAudioPercent": false, + "showVpnIcon": true, + "showBrightnessIcon": false, + "showBrightnessPercent": false, + "showMicIcon": false, + "showMicPercent": false, + "showBatteryIcon": false, + "showPrinterIcon": false, + "showScreenSharingIcon": true + } + ], + "spacing": 0, + "innerPadding": 4, + "bottomGap": 0, + "transparency": 1, + "widgetTransparency": 0.45, + "squareCorners": true, + "noBackground": false, + "gothCornersEnabled": true, + "gothCornerRadiusOverride": false, + "gothCornerRadiusValue": 12, + "borderEnabled": false, + "borderColor": "surfaceText", + "borderOpacity": 1, + "borderThickness": 1, + "widgetOutlineEnabled": true, + "widgetOutlineColor": "primary", + "widgetOutlineOpacity": 0.4, + "widgetOutlineThickness": 2, + "widgetPadding": 12, + "maximizeWidgetIcons": false, + "maximizeWidgetText": false, + "removeWidgetPadding": false, + "fontScale": 1.1, + "iconScale": 1.1, + "autoHide": false, + "autoHideDelay": 250, + "showOnWindowsOpen": false, + "openOnOverview": false, + "visible": false, + "popupGapsAuto": true, + "popupGapsManual": 4, + "maximizeDetection": true, + "scrollEnabled": true, + "scrollXBehavior": "column", + "scrollYBehavior": "workspace", + "shadowIntensity": 0, + "shadowOpacity": 60, + "shadowColorMode": "text", + "shadowCustomColor": "#000000" + } + ], + "desktopClockEnabled": false, + "desktopClockStyle": "analog", + "desktopClockTransparency": 0.8, + "desktopClockColorMode": "primary", + "desktopClockCustomColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1, + "hsvHue": -1, + "hsvSaturation": 0, + "hsvValue": 1, + "hslHue": -1, + "hslSaturation": 0, + "hslLightness": 1, + "valid": true + }, + "desktopClockShowDate": true, + "desktopClockShowAnalogNumbers": false, + "desktopClockShowAnalogSeconds": true, + "desktopClockX": -1, + "desktopClockY": -1, + "desktopClockWidth": 280, + "desktopClockHeight": 180, + "desktopClockDisplayPreferences": [ + "all" + ], + "systemMonitorEnabled": false, + "systemMonitorShowHeader": true, + "systemMonitorTransparency": 0.8, + "systemMonitorColorMode": "primary", + "systemMonitorCustomColor": { + "r": 1, + "g": 1, + "b": 1, + "a": 1, + "hsvHue": -1, + "hsvSaturation": 0, + "hsvValue": 1, + "hslHue": -1, + "hslSaturation": 0, + "hslLightness": 1, + "valid": true + }, + "systemMonitorShowCpu": true, + "systemMonitorShowCpuGraph": true, + "systemMonitorShowCpuTemp": true, + "systemMonitorShowGpuTemp": false, + "systemMonitorGpuPciId": "", + "systemMonitorShowMemory": true, + "systemMonitorShowMemoryGraph": true, + "systemMonitorShowNetwork": true, + "systemMonitorShowNetworkGraph": true, + "systemMonitorShowDisk": true, + "systemMonitorShowTopProcesses": false, + "systemMonitorTopProcessCount": 3, + "systemMonitorTopProcessSortBy": "cpu", + "systemMonitorGraphInterval": 60, + "systemMonitorLayoutMode": "auto", + "systemMonitorX": -1, + "systemMonitorY": -1, + "systemMonitorWidth": 320, + "systemMonitorHeight": 480, + "systemMonitorDisplayPreferences": [ + "all" + ], + "systemMonitorVariants": [], + "desktopWidgetPositions": {}, + "desktopWidgetGridSettings": {}, + "desktopWidgetInstances": [], + "desktopWidgetGroups": [], + "builtInPluginSettings": {}, + "clipboardEnterToPaste": false, + "launcherPluginVisibility": {}, + "launcherPluginOrder": [], + "configVersion": 5 +} \ No newline at end of file diff --git a/modules/hosts/14900k/configuration.nix b/modules/hosts/14900k/configuration.nix index b513a48..3014e89 100644 --- a/modules/hosts/14900k/configuration.nix +++ b/modules/hosts/14900k/configuration.nix @@ -70,6 +70,7 @@ ".#14900k" ]; enableRbwLockToggle = true; + defaultSettingsFile = ./_private/dms-default-settings.json; }; };