This commit is contained in:
Osman Faruk Bayram 2025-10-21 20:47:21 +03:00
parent 1b7b0b620c
commit be65eb3b88
2 changed files with 18 additions and 6 deletions

View file

@ -1,13 +1,20 @@
{
lib,
config,
nixosConfig ? null, # Receive the NixOS config
...
}:
{
options.enableFirefox = lib.mkEnableOption "enableFirefox";
config = {
programs.firefox = {
enable = config.enableFirefox;
config = lib.mkMerge [
# Auto-enable Firefox if system has a desktop environment
(lib.mkIf (nixosConfig != null && nixosConfig.osbmModules.desktopEnvironment != "none") {
# Set enableFirefox to true by default when there's a desktop environment
programs.firefox.enable = lib.mkDefault true;
})
# Firefox configuration
{
programs.firefox = {
languagePacks = [
"ja"
"tr"
@ -100,5 +107,6 @@
};
};
};
};
}
];
}