Added foot user module

This commit is contained in:
Jan Bulthuis 2024-07-19 00:31:41 +02:00
parent 9d7655193c
commit 7f318bc1b7
3 changed files with 40 additions and 14 deletions

View File

@ -8,6 +8,7 @@
./feishin/default.nix ./feishin/default.nix
./firefox/default.nix ./firefox/default.nix
./fontconfig/default.nix ./fontconfig/default.nix
./foot/default.nix
./obsidian/default.nix ./obsidian/default.nix
./shell/bash.nix ./shell/bash.nix
./shell/fish.nix ./shell/fish.nix

View File

@ -0,0 +1,25 @@
{config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.foot;
in {
options.modules.foot.enable = mkEnableOption "foot";
config = mkIf cfg.enable {
programs.foot = {
enable = true;
settings = {
main = let
font = config.theming.fonts.monospace.name;
size = toString config.theming.fonts.monospace.recommendedSize;
in {
font = mkForce "${font}:style=Regular:size=${size}";
font-bold = "${font}:style=Bold:size=${size}";
font-italic = "${font}:style=Italic:size=${size}";
font-bold-italic = "${font}:style=Bold Italic:size=${size}";
};
};
};
};
}

View File

@ -485,20 +485,20 @@ in {
programs.neovim.defaultEditor = true; programs.neovim.defaultEditor = true;
# Foot setup # Foot setup
programs.foot = { # programs.foot = {
enable = true; # enable = true;
settings = { # settings = {
main = let # main = let
font = fonts.monospace.name; # font = fonts.monospace.name;
size = toString fonts.sizes.terminal; # size = toString fonts.sizes.terminal;
in { # in {
font = lib.mkForce "${font}:style=Regular:size=${size}"; # font = lib.mkForce "${font}:style=Regular:size=${size}";
font-bold = "${font}:style=Bold:size=${size}"; # font-bold = "${font}:style=Bold:size=${size}";
font-italic = "${font}:style=Italic:size=${size}"; # font-italic = "${font}:style=Italic:size=${size}";
font-bold-italic = "${font}:style=Bold Italic:size=${size}"; # font-bold-italic = "${font}:style=Bold Italic:size=${size}";
}; # };
}; # };
}; # };
# Fuzzel setup # Fuzzel setup
#programs.fuzzel = { #programs.fuzzel = {