diff --git a/homes/x86_64-linux/alejandro/default.nix b/homes/x86_64-linux/alejandro/default.nix index 9467fbd..224a2a0 100644 --- a/homes/x86_64-linux/alejandro/default.nix +++ b/homes/x86_64-linux/alejandro/default.nix @@ -15,6 +15,7 @@ }; programs = { + firefox.enable = true; kitty.enable = true; }; diff --git a/modules/home/programs/firefox/default.nix b/modules/home/programs/firefox/default.nix new file mode 100644 index 0000000..2049747 --- /dev/null +++ b/modules/home/programs/firefox/default.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + namespace, + ... +}: let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.programs.firefox; +in { + options.${namespace}.programs.firefox = { + enable = mkEnableOption "firefox"; + }; + + config = mkIf cfg.enable { + programs.firefox = { + enable = true; + }; + + xdg.mimeApps.defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + }; + }; +} diff --git a/modules/nixos/apps/firefox/default.nix b/modules/nixos/apps/firefox/default.nix deleted file mode 100644 index 339fcf9..0000000 --- a/modules/nixos/apps/firefox/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - options, - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.aa.apps.firefox; -in { - options.aa.apps.firefox = with types; { - enable = mkEnableOption "firefox"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [firefox]; - aa.home.extraOptions = { - xdg.mimeApps.defaultApplications = { - "text/html" = "firefox.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; - }; - }; - }; -} diff --git a/modules/nixos/suites/desktop/default.nix b/modules/nixos/suites/desktop/default.nix index 1a8cead..4a11ec2 100644 --- a/modules/nixos/suites/desktop/default.nix +++ b/modules/nixos/suites/desktop/default.nix @@ -16,10 +16,6 @@ in { desktop = { sway.enable = true; }; - - apps = { - firefox.enable = true; - }; }; }; }