mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
nix: Add setting to toggle creation of gui-settings.json
This commit is contained in:
+10
-2
@@ -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"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user