diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index 62ce8a3..40f7cb6 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -50,29 +50,6 @@ toot ]; - # 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 - ]; - }; - programs.thunderbird = { enable = true; profiles.default.isDefault = true; diff --git a/modules/home-manager/browsers/default.nix b/modules/home-manager/browsers/default.nix new file mode 100644 index 0000000..b3c8dac --- /dev/null +++ b/modules/home-manager/browsers/default.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + ... +}: { + imports = [ + ./librewolf.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; + }; +} diff --git a/modules/home-manager/browsers/librewolf.nix b/modules/home-manager/browsers/librewolf.nix new file mode 100644 index 0000000..2a6b9cd --- /dev/null +++ b/modules/home-manager/browsers/librewolf.nix @@ -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 + ]; + }; + }; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index b692ffa..189cf51 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -10,6 +10,7 @@ ./nh.nix ./restic.nix ./hyprland.nix + ./browsers ]; crony.mangohud.enable = lib.mkDefault true; @@ -22,4 +23,5 @@ crony.nh.enable = lib.mkDefault true; crony.restic.enable = lib.mkDefault true; crony.hyprland.enable = lib.mkDefault true; + crony.browsers.enable = lib.mkDefault true; }