summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlinsui <linsui555@gmail.com>2022-11-18 10:53:56 +0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-01-13 16:58:58 +0000
commitf7c0641e2ccf1b2e98d60ce6c79031cdda026ea1 (patch)
treec5885024ba580f7d9158378e9de21bae8f176e13
parent7c72a6c77d45323cdc4a0274e9566a29ac584ba8 (diff)
nixos/firefox: fix "The option is used but not defined"
(cherry picked from commit 6120738eaad48d46ec81f90c62762886fc557c37)
-rw-r--r--nixos/modules/programs/firefox.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/nixos/modules/programs/firefox.nix b/nixos/modules/programs/firefox.nix
index 76e6c1a553f3..c1bb0b3e3612 100644
--- a/nixos/modules/programs/firefox.nix
+++ b/nixos/modules/programs/firefox.nix
@@ -69,12 +69,13 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
- environment.etc."firefox/policies/policies.json".source =
- let policiesJSON =
- policyFormat.generate
- "firefox-policies.json"
- { inherit (cfg) policies; };
- in mkIf (cfg.policies != {}) "${policiesJSON}";
+ environment.etc =
+ let
+ policiesJSON = policyFormat.generate "firefox-policies.json" { inherit (cfg) policies; };
+ in
+ mkIf (cfg.policies != { }) {
+ "firefox/policies/policies.json".source = "${policiesJSON}";
+ };
# Preferences are converted into a policy
programs.firefox.policies =