diff --git a/nix/home-module.nix b/nix/home-module.nix index 2d7450b5b..421403865 100644 --- a/nix/home-module.nix +++ b/nix/home-module.nix @@ -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" ]; }; diff --git a/nix/nixos-module.nix b/nix/nixos-module.nix index f14f4406c..31b7cc046 100644 --- a/nix/nixos-module.nix +++ b/nix/nixos-module.nix @@ -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" ]; };