refactor: desktop default applications

This commit is contained in:
2026-04-27 17:28:34 +02:00
parent 93624900ad
commit 44fe4552ef
11 changed files with 114 additions and 102 deletions
+10 -15
View File
@@ -2,13 +2,13 @@
let
repo = config.repo;
mkPrimaryTerminal =
mkTerminal =
{
desktopId,
desktopEntryName,
packageFor,
terminalModule,
}:
{ lib, pkgs, ... }:
{ config, pkgs, ... }:
let
package = packageFor pkgs;
in
@@ -16,18 +16,13 @@ let
imports = [ terminalModule ];
config = {
repo.terminal.primary = {
inherit
desktopId
package
;
command = lib.getExe package;
execArgs = [ "-e" ];
meta.desktop.terminal = {
inherit desktopEntryName package;
};
xdg.terminal-exec = {
enable = true;
settings.default = [ desktopId ];
settings.default = [ config.meta.desktop.terminal.desktopId ];
};
};
};
@@ -155,14 +150,14 @@ in
};
};
flake.modules.homeManager.primary-terminal-foot = mkPrimaryTerminal {
desktopId = "foot.desktop";
flake.modules.homeManager.primary-terminal-foot = mkTerminal {
desktopEntryName = "foot";
packageFor = pkgs: pkgs.foot;
terminalModule = config.flake.modules.homeManager.terminal-foot;
};
flake.modules.homeManager.primary-terminal-kitty = mkPrimaryTerminal {
desktopId = "kitty.desktop";
flake.modules.homeManager.primary-terminal-kitty = mkTerminal {
desktopEntryName = "kitty";
packageFor = pkgs: pkgs.kitty;
terminalModule = config.flake.modules.homeManager.terminal-kitty;
};