nix: Add setting to toggle creation of gui-settings.json

This commit is contained in:
Lin Xianyi
2026-01-09 11:28:23 +08:00
parent 8028191f4a
commit 8799337a3b
2 changed files with 17 additions and 3 deletions
+10 -2
View File
@@ -22,7 +22,15 @@ in
options.programs.noctalia-shell = {
enable = lib.mkEnableOption "Noctalia shell configuration";
systemd.enable = lib.mkEnableOption "Noctalia shell systemd integration";
systemd = {
enable = lib.mkEnableOption "Noctalia shell systemd integration";
mutableRuntimeSettings = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether noctalia-shell creates a gui-settings.json to store setting changes made within the GUI at runtime.";
};
};
package = lib.mkOption {
type = lib.types.nullOr lib.types.package;
@@ -155,7 +163,7 @@ in
Service = {
ExecStart = lib.getExe cfg.package;
Restart = "on-failure";
Environment = [
Environment = lib.mkIf cfg.systemd.mutableRuntimeSettings [
"NOCTALIA_SETTINGS_FALLBACK=%h/.config/noctalia/gui-settings.json"
];
};
+7 -1
View File
@@ -15,6 +15,12 @@ in
description = "The noctalia-shell package to use";
};
mutableRuntimeSettings = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether noctalia-shell creates a gui-settings.json to store setting changes made within the GUI at runtime.";
};
target = lib.mkOption {
type = lib.types.str;
default = "graphical-session.target";
@@ -39,7 +45,7 @@ in
serviceConfig = {
ExecStart = lib.getExe cfg.package;
Restart = "on-failure";
Environment = [
Environment = lib.mkIf cfg.mutableRuntimeSettings [
"NOCTALIA_SETTINGS_FALLBACK=%h/.config/noctalia/gui-settings.json"
];
};