Converted firefox nixos module to a home manager module
This commit is contained in:
parent
e31e5783df
commit
726ace8ade
|
@ -15,6 +15,7 @@
|
|||
};
|
||||
|
||||
programs = {
|
||||
firefox.enable = true;
|
||||
kitty.enable = true;
|
||||
};
|
||||
|
||||
|
|
26
modules/home/programs/firefox/default.nix
Normal file
26
modules/home/programs/firefox/default.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -16,10 +16,6 @@ in {
|
|||
desktop = {
|
||||
sway.enable = true;
|
||||
};
|
||||
|
||||
apps = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue