refactor(home:foot): rework structure of module

This commit is contained in:
ooks-io 2024-06-25 21:56:13 +12:00
parent 8e5607e4f2
commit 9f26a3d4c5

View file

@ -2,27 +2,21 @@
let let
inherit (config.colorscheme) palette; inherit (config.colorscheme) palette;
inherit (lib) mkIf; inherit (lib) mkMerge mkIf;
fonts = config.ooknet.fonts; fonts = config.ooknet.fonts;
cfg = config.ooknet.terminal.foot; cfg = config.ooknet.terminal.foot;
terminal = config.ooknet.desktop.terminal; desktop = config.ooknet.desktop;
in in
{ {
config = mkIf (cfg.enable || terminal == "foot") { config = mkMerge [
home.sessionVariables = mkIf (terminal == "foot") { (mkIf (cfg.enable || desktop.terminal == "foot") {
TERMINAL = "foot";
TERM = "foot";
};
ooknet.binds.terminal = mkIf (terminal == "foot") "foot";
ooknet.binds.terminalLaunch = mkIf (terminal == "foot") "foot";
programs.foot = { programs.foot = {
enable = true; enable = true;
server.enable = true; server.enable = true;
settings = { settings = {
main = { main = {
term = "xterm-256color";
font = "${fonts.monospace.family}:pixelsize=18:antialias=true"; font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true"; font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true"; font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
@ -74,5 +68,15 @@ in
}; };
}; };
}; };
}; })
(mkIf (desktop.terminal == "foot") {
home.sessionVariables = {
TERMINAL = "foot";
TERM = "foot";
};
ooknet.binds.terminal = "foot";
ooknet.binds.terminalLaunch = "foot";
})
];
} }