diff --git a/nix/modules/nixos/apps/firefox/default.nix b/nix/modules/nixos/apps/firefox/default.nix index f8b1837..fc0570d 100644 --- a/nix/modules/nixos/apps/firefox/default.nix +++ b/nix/modules/nixos/apps/firefox/default.nix @@ -8,6 +8,26 @@ with lib; with lib.custom; let cfg = config.custom.apps.firefox; + browser = ["firefox.desktop"]; + + # XDG MIME types + associations = { + "application/x-extension-htm" = browser; + "application/x-extension-html" = browser; + "application/x-extension-shtml" = browser; + "application/x-extension-xht" = browser; + "application/x-extension-xhtml" = browser; + "application/xhtml+xml" = browser; + "text/html" = browser; + "x-scheme-handler/about" = browser; + "x-scheme-handler/chrome" = ["chromium-browser.desktop"]; + "x-scheme-handler/ftp" = browser; + "x-scheme-handler/http" = browser; + "x-scheme-handler/https" = browser; + "x-scheme-handler/unknown" = browser; + + "application/json" = browser; + }; in { options.custom.apps.firefox = with types; { enable = mkBoolOpt false "Whether or not to enable Firefox."; @@ -17,5 +37,13 @@ in { programs.firefox = { enable = true; }; + + xdg = { + mime = { + enable = true; + defaultApplications = associations; + addedAssociations = associations; + }; + }; }; } diff --git a/nix/modules/nixos/apps/imv/default.nix b/nix/modules/nixos/apps/imv/default.nix index fa79bd9..e5e3eb8 100644 --- a/nix/modules/nixos/apps/imv/default.nix +++ b/nix/modules/nixos/apps/imv/default.nix @@ -8,11 +8,25 @@ with lib; with lib.custom; let cfg = config.custom.apps.imv; + + # XDG MIME types + associations = { + "image/*" = ["imv.desktop"]; + }; in { options.custom.apps.imv = with types; { enable = mkBoolOpt false "Whether or not to enable imv."; }; - config = - mkIf cfg.enable {environment.systemPackages = with pkgs; [imv];}; + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [imv]; + + xdg = { + mime = { + enable = true; + defaultApplications = associations; + addedAssociations = associations; + }; + }; + }; } diff --git a/nix/modules/nixos/apps/pcmanfm/default.nix b/nix/modules/nixos/apps/pcmanfm/default.nix new file mode 100644 index 0000000..b8604a5 --- /dev/null +++ b/nix/modules/nixos/apps/pcmanfm/default.nix @@ -0,0 +1,18 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; +with lib.custom; let + cfg = config.custom.apps.pcmanfm; +in { + options.custom.apps.pcmanfm = with types; { + enable = mkBoolOpt false "Whether or not to enable pcmanfm."; + }; + + config = + mkIf cfg.enable {environment.systemPackages = with pkgs; [pcmanfm];}; +} diff --git a/nix/modules/nixos/apps/vlc/default.nix b/nix/modules/nixos/apps/vlc/default.nix index ed3a1c2..7397474 100644 --- a/nix/modules/nixos/apps/vlc/default.nix +++ b/nix/modules/nixos/apps/vlc/default.nix @@ -8,10 +8,25 @@ with lib; with lib.custom; let cfg = config.custom.apps.vlc; + + associations = { + "audio/*" = ["vlc.desktop"]; + "video/*" = ["vlc.desktop"]; + }; in { options.custom.apps.vlc = with types; { enable = mkBoolOpt false "Whether or not to enable vlc."; }; - config = mkIf cfg.enable {environment.systemPackages = with pkgs; [vlc];}; + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [vlc]; + + xdg = { + mime = { + enable = true; + defaultApplications = associations; + addedAssociations = associations; + }; + }; + }; } diff --git a/nix/modules/nixos/apps/zathura/default.nix b/nix/modules/nixos/apps/zathura/default.nix index de1182b..6a9f5ed 100644 --- a/nix/modules/nixos/apps/zathura/default.nix +++ b/nix/modules/nixos/apps/zathura/default.nix @@ -8,11 +8,23 @@ with lib; with lib.custom; let cfg = config.custom.apps.zathura; + associations = { + "application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; + "application/epub" = ["org.pwmt.zathura.desktop.desktop"]; + }; in { options.custom.apps.zathura = with types; { enable = mkBoolOpt false "Whether or not to enable zathura."; }; - config = - mkIf cfg.enable {environment.systemPackages = with pkgs; [zathura];}; + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [zathura]; + xdg = { + mime = { + enable = true; + defaultApplications = associations; + addedAssociations = associations; + }; + }; + }; } diff --git a/nix/modules/nixos/desktop/addons/rofi/default.nix b/nix/modules/nixos/desktop/addons/rofi/default.nix index da90c20..a1df3d7 100644 --- a/nix/modules/nixos/desktop/addons/rofi/default.nix +++ b/nix/modules/nixos/desktop/addons/rofi/default.nix @@ -15,6 +15,7 @@ in { }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [rbw rofi-rbw]; home.programs.rofi = { enable = true; plugins = with pkgs; [ diff --git a/nix/modules/nixos/desktop/hyprland/default.nix b/nix/modules/nixos/desktop/hyprland/default.nix index 5a5f79f..e23eb31 100644 --- a/nix/modules/nixos/desktop/hyprland/default.nix +++ b/nix/modules/nixos/desktop/hyprland/default.nix @@ -43,6 +43,9 @@ in { wlroots cliphist wl-clipboard + + grim + slurp ]; environment.sessionVariables = { diff --git a/nix/modules/nixos/hardware/audio/default.nix b/nix/modules/nixos/hardware/audio/default.nix index 1eeadba..34bc9e6 100644 --- a/nix/modules/nixos/hardware/audio/default.nix +++ b/nix/modules/nixos/hardware/audio/default.nix @@ -2,6 +2,7 @@ options, config, lib, + pkgs, ... }: with lib; @@ -23,5 +24,10 @@ in { wireplumber.enable = true; }; programs.noisetorch.enable = true; + + environment.systemPackages = with pkgs; [ + pamixer + pavucontrol + ]; }; } diff --git a/nix/modules/nixos/suites/common/default.nix b/nix/modules/nixos/suites/common/default.nix index d9eb519..e9f1ea1 100644 --- a/nix/modules/nixos/suites/common/default.nix +++ b/nix/modules/nixos/suites/common/default.nix @@ -39,6 +39,7 @@ in { git.enable = true; http.enable = true; misc.enable = true; + net.enable = true; }; custom.cli-apps = { atuin.enable = true; diff --git a/nix/modules/nixos/tools/misc/default.nix b/nix/modules/nixos/tools/misc/default.nix index 1f2435e..2c99181 100644 --- a/nix/modules/nixos/tools/misc/default.nix +++ b/nix/modules/nixos/tools/misc/default.nix @@ -18,12 +18,9 @@ in { environment.systemPackages = with pkgs; [ bat - dig fd file fzf - iftop - ipfetch jq killall ripgrep diff --git a/nix/modules/nixos/tools/net/default.nix b/nix/modules/nixos/tools/net/default.nix new file mode 100644 index 0000000..082396f --- /dev/null +++ b/nix/modules/nixos/tools/net/default.nix @@ -0,0 +1,28 @@ +{ + options, + config, + lib, + pkgs, + ... +}: +with lib; +with lib.custom; let + cfg = config.custom.tools.net; +in { + options.custom.tools.net = with types; { + enable = mkBoolOpt false "Whether or not to enable common utilities."; + }; + + config = mkIf cfg.enable { + home.configFile."wgetrc".text = ""; + + environment.systemPackages = with pkgs; [ + dig + iftop + ipfetch + nfs-utils + traceroute + mtr + ]; + }; +}