-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5ad31b
commit 41d2185
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ config, lib, ... }: | ||
|
||
let | ||
profileSettings = { | ||
settings = { | ||
"font.name.monospace.x-western" = config.stylix.fonts.monospace.name; | ||
"font.name.sans-serif.x-western" = config.stylix.fonts.sansSerif.name; | ||
"font.name.serif.x-western" = config.stylix.fonts.serif.name; | ||
}; | ||
}; | ||
makeProfileSettingsPair = profileName: | ||
lib.nameValuePair profileName profileSettings; | ||
in { | ||
options.stylix.targets.firefox = { | ||
enable = | ||
config.lib.stylix.mkEnableTarget "Firefox" config.programs.firefox.enable; | ||
|
||
profileNames = lib.mkOption { | ||
description = "The Firefox profile names to apply styling on."; | ||
type = lib.types.listOf lib.types.str; | ||
default = [ ]; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf config.stylix.targets.firefox.enable { | ||
programs.firefox.profiles = lib.listToAttrs | ||
(map makeProfileSettingsPair config.stylix.targets.firefox.profileNames); | ||
}; | ||
} |