librewolf: init (#679)
Link: https://github.com/danth/stylix/pull/679 Co-authored-by: Daniel Thwaites <danth@danth.me> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
ccee633284
commit
a9e3779949
2 changed files with 34 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
# Consider also updating the LibreWolf module when updating this module,
|
||||
# as they are very similar.
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
|
|
|
|||
31
modules/librewolf/hm.nix
Normal file
31
modules/librewolf/hm.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This module is a copy of the Firefox module.
|
||||
|
||||
{ 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.librewolf = {
|
||||
enable =
|
||||
config.lib.stylix.mkEnableTarget "Librewolf" true;
|
||||
|
||||
profileNames = lib.mkOption {
|
||||
description = "The Librewolf profile names to apply styling on.";
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.librewolf.enable) {
|
||||
programs.librewolf.profiles = lib.listToAttrs
|
||||
(map makeProfileSettingsPair config.stylix.targets.librewolf.profileNames);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue