firefox
This commit is contained in:
parent
1b7b0b620c
commit
be65eb3b88
2 changed files with 18 additions and 6 deletions
|
|
@ -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 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
useUserPackages = true;
|
||||
|
||||
# Pass inputs and outputs to home-manager modules
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
# Pass the NixOS system config to home-manager modules
|
||||
nixosConfig = config;
|
||||
};
|
||||
|
||||
# Configure home-manager for each user (excluding root)
|
||||
users =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue