Skip to content

Commit

Permalink
set font atkinson as default
Browse files Browse the repository at this point in the history
  • Loading branch information
Czichy committed Feb 5, 2025
1 parent 4de44a8 commit 9d4c1ee
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 23 deletions.
30 changes: 8 additions & 22 deletions modules/home-manager/programs/editors/helix/default.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
# --- parts/modules/home-manager/programs/editors/neovim.nix
#
# Author: czichy <[email protected]>
# URL: https://github.com/czichy/tensorfiles.hm
# License: MIT
#
# 888 .d888 d8b 888
# 888 d88P" Y8P 888
# 888 888 888
# 888888 .d88b. 88888b. .d8888b .d88b. 888d888 888888 888 888 .d88b. .d8888b
# 888 d8P Y8b 888 "88b 88K d88""88b 888P" 888 888 888 d8P Y8b 88K
# 888 88888888 888 888 "Y8888b. 888 888 888 888 888 888 88888888 "Y8888b.
# Y88b. Y8b. 888 888 X88 Y88..88P 888 888 888 888 Y8b. X88
# "Y888 "Y8888 888 888 88888P' "Y88P" 888 888 888 888 "Y8888 88888P'
{ localFlake, inputs }:
{
localFlake,
inputs,
}: {
config,
lib,
pkgs,
...
}:
with builtins;
with lib;
let
with lib; let
inherit (localFlake.lib) mkOverrideAtHmModuleLevel mkPywalEnableOption;

cfg = config.tensorfiles.hm.programs.editors.helix;
_ = mkOverrideAtHmModuleLevel;
in
{
in {
# TODO modularize config, cant be bothered to do it now
options.tensorfiles.hm.programs.editors.helix = with types; {
enable = mkEnableOption ''
Expand Down Expand Up @@ -66,15 +52,15 @@ in
# ])
# ];
#});
settings.theme = "dracula";
settings.theme = "onedark";
settings.editor = import ./editor.nix;
settings.keys = import ./keys.nix;
languages = import ./languages.nix { inherit config lib pkgs; };
languages = import ./languages.nix {inherit config lib pkgs;};
#themes = import ./theme.nix {inherit colorscheme;};
};
}
# |----------------------------------------------------------------------| #
]);

meta.maintainers = with localFlake.lib.maintainers; [ czichy ];
meta.maintainers = with localFlake.lib.maintainers; [czichy];
}
117 changes: 117 additions & 0 deletions modules/home-manager/programs/editors/zed.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
localFlake,
inputs,
}: {
config,
lib,
pkgs,
system,
...
}:
with builtins;
with lib; let
inherit
(localFlake.lib)
mkOverrideAtHmModuleLevel
isModuleLoadedAndEnabled
mkPywalEnableOption
mkDummyDerivation
;

cfg = config.tensorfiles.hm.programs.editors.zed;
_ = mkOverrideAtHmModuleLevel;

pywalCheck = (isModuleLoadedAndEnabled config "tensorfiles.hm.programs.pywal") && cfg.pywal.enable;
in {
# TODO modularize config, cant be bothered to do it now
options.tensorfiles.hm.programs.editors.zed = with types; {
enable = mkEnableOption ''
Enables NixOS module that configures/handles the Zed Editor program.
'';

pywal = {
enable = mkPywalEnableOption;
};
};

config = mkIf cfg.enable (mkMerge [
# |----------------------------------------------------------------------| #
{
home.shellAliases = {
"zed" = _ "zed-editor";
};
programs.zed-editor = let
bins = with pkgs; [
nixd
nixfmt-rfc-style
prettierd
nodejs
nodePackages.prettier
vscode-langservers-extracted
];
libraries = with pkgs; [
stdenv.cc.cc
zlib
openssl
];
in {
enable = true;
extensions = [
"nix"
"xy-zed" # a gorgeous dark theme
];
# package = with pkgs; writeShellScriptBin "zed" ''
# export PATH=${lib.makeBinPath bins}:$PATH
# export LD_LIBRARY_PATH=${lib.makeLibraryPath libraries}
# export NIX_LD_LIBRARY_PATH=${lib.makeLibraryPath libraries}
# export NIX_LD=${stdenv.cc.bintools.dynamicLinker}
# exec ${zed-editor}/bin/zed "$@"
# '';
userSettings = {
features = {
copilot = true;
inline_completion_provider = "copilot";
};
assistant = {
version = "2";
default_model = {
provider = "anthropic";
model = "claude-3-5-sonnet-latest";
};
};
lsp = {
rust-analyzer = {
binary = {path_lookup = true;};
};
};
telemetry = {
metrics = false;
};
vim_mode = true;
ui_font_size = 16;
buffer_font_size = 16;
theme = {
mode = "system";
light = "Andromeda";
dark = "One Dark";
};
ssh_connections = [
{
# host = "trex.satanic.link";
}
];
};
userKeymaps = [
{bindings = {up = "menu::SelectPrev";};}
{
context = "Editor";
bindings = {escape = "editor::Cancel";};
}
];
};
}
# |----------------------------------------------------------------------| #
]);

meta.maintainers = with localFlake.lib.maintainers; [czichy];
}
3 changes: 2 additions & 1 deletion modules/home-manager/programs/terminals/foot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ in

settings = {
main = {
font = "Iosevka Nerd Font:size=12";
font = "Atkinson Monolegible:size=12";
# font = "Iosevka Nerd Font:size=12";
# font = "${config.fontProfiles.monospace.family}:size=${toString default.terminal.size}";
box-drawings-uses-font-glyphs = "yes";
dpi-aware = "yes";
Expand Down

0 comments on commit 9d4c1ee

Please sign in to comment.