programs, xdg: move app packages and MIME defaults into modules

This commit is contained in:
2026-08-01 17:14:44 +08:00
parent 27aaa9d05f
commit 935530aca5
19 changed files with 317 additions and 147 deletions
+16 -1
View File
@@ -1,4 +1,8 @@
{ lib, ... }:
{ lib, config, ... }:
let
cfg = config.my.desktop.browser.default;
desktop = [ cfg.desktop ];
in
{
options.my.desktop.browser.default = {
command = lib.mkOption {
@@ -10,4 +14,15 @@
default = "zen-beta.desktop";
};
};
config = {
my.xdg.defaultApplications = {
"text/html" = desktop;
"x-scheme-handler/about" = desktop;
"x-scheme-handler/ftp" = desktop;
"x-scheme-handler/http" = desktop;
"x-scheme-handler/https" = desktop;
"x-scheme-handler/unknown" = desktop;
};
};
}
+5
View File
@@ -6,6 +6,7 @@
}:
let
cfg = config.my.desktop.media.cine;
desktop = [ "io.github.diegopvlk.Cine.desktop" ];
in
{
options.my.desktop.media.cine = {
@@ -14,5 +15,9 @@ in
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.cine ];
my.xdg.defaultApplications = {
"audio/*" = desktop;
"video/*" = desktop;
};
};
}
+8
View File
@@ -6,6 +6,7 @@
}:
let
cfg = config.my.desktop.media.loupe;
desktop = [ "org.gnome.Loupe.desktop" ];
in
{
options.my.desktop.media.loupe = {
@@ -14,5 +15,12 @@ in
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.loupe ];
my.xdg.defaultApplications = {
"image/*" = desktop;
"image/gif" = desktop;
"image/jpeg" = desktop;
"image/png" = desktop;
"image/webp" = desktop;
};
};
}
-1
View File
@@ -1,5 +1,4 @@
binds {
Mod+E { spawn "nautilus"; }
Ctrl+Alt+Escape { spawn "missioncenter"; }
Mod+R { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
+1 -1
View File
@@ -33,6 +33,7 @@ in
};
security.pam.services.login.enableGnomeKeyring = true;
services.gnome.gnome-keyring.enable = true;
my.persist.homeDirs = [
{
directory = ".local/share/keyrings";
@@ -79,7 +80,6 @@ in
cliphist
brightnessctl
nautilus
mission-center
noctalia-shell