feat: better modules aragement.

This commit is contained in:
CronyAkatsuki 2025-03-23 20:01:51 +01:00
parent de11ee0676
commit 6e967a751f
49 changed files with 27 additions and 19 deletions
modules/linux/home-manager/browsers

View file

@ -0,0 +1,23 @@
{
config,
pkgs,
lib,
...
}: {
options = {
crony.browsers.chromium.enable = lib.mkEnableOption "Enable chromium";
};
config = lib.mkIf config.crony.browsers.chromium.enable {
# Enable theming chromium + use ungoogled chromium package
programs.chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
# Fix for wayland
commandLineArgs = [
"--ozone-platform-hint=auto"
"--ozone-platform=wayland"
];
};
};
}

View file

@ -0,0 +1,19 @@
{
config,
lib,
...
}: {
imports = [
./librewolf.nix
./chromium.nix
];
options = {
crony.browsers.enable = lib.mkEnableOption "Enable my browsers and customize them";
};
config = lib.mkIf config.crony.browsers.enable {
crony.browsers.librewolf.enable = lib.mkDefault true;
crony.browsers.chromium.enable = lib.mkDefault true;
};
}

View file

@ -0,0 +1,35 @@
{
config,
pkgs,
lib,
...
}: {
options = {
crony.browsers.librewolf.enable = lib.mkEnableOption "Enable librewolf and related options";
};
config = lib.mkIf config.crony.browsers.librewolf.enable {
# Install librewolf
programs.librewolf = {
enable = true;
nativeMessagingHosts = with pkgs; [
tridactyl-native
bukubrow
keepassxc
];
};
# This tricks messaging hosts into working for no
# real reason other than to make me rage at hour of debugging
# (5 hours in total)
programs.firefox = {
package = pkgs.librewolf;
enable = true;
nativeMessagingHosts = with pkgs; [
tridactyl-native
bukubrow
keepassxc
];
};
};
}