refactor: desktop default applications
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user