refactor: further progress

This commit is contained in:
2026-04-25 00:19:20 +02:00
parent 55fbe82a42
commit 0500aab3cb
31 changed files with 680 additions and 398 deletions
+24 -10
View File
@@ -1,32 +1,46 @@
{ config, ... }:
let
metaLib = config.meta.lib;
metaRepo = metaLib.repo;
repo = config.repo;
repoHelpers = repo.helpers;
in
{
flake.modules.homeManager.terminal =
{
config,
lib,
pkgs,
...
}:
let
repoTheme = metaRepo.theme.kanagawa;
repoTheme = repo.theme.kanagawa;
palette = repoTheme.palette;
terminal = metaLib.resolveRepoTerminal {
terminalPackage = repoHelpers.resolvePackagePath {
inherit pkgs;
path = repo.desktop.terminal.packagePath;
};
terminalDesktopId = repo.desktop.terminal.desktopId;
in
{
assertions = metaLib.mkTerminalAssertions {
inherit terminal;
requireDesktopEntry = true;
};
assertions = [
{
assertion = terminalPackage != null;
message = "Unknown terminal package `${lib.showAttrPath repo.desktop.terminal.packagePath}`.";
}
{
assertion = repo.desktop.terminal.command == "kitty";
message = "The terminal feature currently only supports kitty.";
}
{
assertion =
terminalPackage == null
|| terminalDesktopId == null
|| builtins.pathExists "${terminalPackage}/share/applications/${terminalDesktopId}";
message = "Terminal package `${lib.showAttrPath repo.desktop.terminal.packagePath}` must provide `${terminalDesktopId}`.";
}
];
xdg.terminal-exec = {
enable = true;
settings.default = lib.optional (terminal.desktopId != null) terminal.desktopId;
settings.default = lib.optional (terminalDesktopId != null) terminalDesktopId;
};
programs.kitty = {