1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

treewide: refactor, nix, overlays -> packages

This commit is contained in:
Ryan Cao 2024-11-12 13:56:54 +08:00
parent d6238e12af
commit eb6b664802
Signed by: ryanccn
GPG key ID: 48C96B2057D71CB1
23 changed files with 240 additions and 308 deletions

View file

@ -2,16 +2,17 @@ theme = catppuccin-frappe
window-colorspace = display-p3
font-family = "Ryan Term"
font-size = 13
font-size = 14
font-feature = -calt
font-feature = -dlig
adjust-cell-height = 50%
adjust-cell-height = 25%
adjust-underline-position = 5
command = /run/current-system/sw/bin/fish -l
macos-option-as-alt = true
macos-secure-input-indication = false
window-step-resize = true
window-padding-x = 15

View file

@ -1,14 +1,12 @@
{
pkgs,
lib,
self,
# self,
config,
...
}:
let
extensions = [
# "antfu.icons-carbon"
"antfu.unocss"
"astro-build.astro-vscode"
"bierner.lit-html"
"bmalehorn.vscode-fish"
@ -29,20 +27,17 @@ let
"graphql.vscode-graphql-syntax"
"golang.go"
"griimick.vhs"
"leonardssh.vscord"
# "leonardssh.vscord"
# "jdinhlife.gruvbox"
"jnoortheen.nix-ide"
# "miguelsolorio.symbols"
"ms-python.isort"
"ms-python.vscode-pylance"
"ms-python.python"
# "mvllow.rose-pine"
"myriad-dreamin.tinymist"
"naumovs.color-highlight"
"nvarner.typst-lsp"
"prisma.prisma"
"ronnidc.nunjucks"
"rust-lang.rust-analyzer"
"sastan.twind-intellisense"
"skellock.just"
"svelte.svelte-vscode"
"tamasfe.even-better-toml"
@ -51,7 +46,6 @@ let
"usernamehw.errorlens"
"vue.volar"
"waderyan.gitblame"
# "xaver.clang-format"
"yoavbls.pretty-ts-errors"
];
in
@ -80,7 +74,7 @@ in
"catppuccin.accentColor" = config.catppuccin.accent;
"catppuccin.boldKeywords" = false;
"catppuccin.italicKeywords" = true;
"catppuccin.italicKeywords" = false;
"catppuccin.workbenchMode" = "flat";
"catppuccin.customUIColors" = {
"all" = {
@ -99,14 +93,13 @@ in
"git.suggestSmartCommit" = false;
"diffEditor.renderSideBySide" = false;
"diffEditor.ignoreTrimWhitespace" = false;
"gitlens.showWelcomeOnInstall" = false;
# "gitlens.showWelcomeOnInstall" = false;
"gitblame.inlineMessageEnabled" = true;
"gitblame.inlineMessageFormat" = "\${author.name} · \${time.ago} · \${commit.summary,120}";
"editor.fontFamily" = "\"RyanMono Nerd Font\", \"Apple Color Emoji\", monospace";
# "editor.fontLigatures" = true;
"editor.fontLigatures" = "'calt', 'ss01'";
"editor.fontFamily" = ''"Ryan Mono", "Symbols Nerd Font", monospace'';
"editor.fontLigatures" = true;
"editor.fontSize" = 16;
"editor.lineHeight" = 1.5;
"editor.cursorSmoothCaretAnimation" = "on";
@ -114,13 +107,14 @@ in
"editor.cursorBlinking" = "phase";
"workbench.editor.highlightModifiedTabs" = true;
"workbench.editor.empty.hint" = "hidden";
"chat.commandCenter.enabled" = false;
"editor.inlineSuggest.enabled" = true;
"editor.tabSize" = 2;
"editor.insertSpaces" = true;
"editor.formatOnSave" = true;
"terminal.integrated.fontFamily" = "\"RyanTerm Nerd Font\", \"Apple Color Emoji\", monospace";
"terminal.integrated.fontFamily" = ''"Ryan Term", "Symbols Nerd Font Mono", monospace'';
"terminal.integrated.fontSize" = 14;
"terminal.integrated.lineHeight" = 1.5;
"terminal.integrated.cursorBlinking" = true;
@ -149,11 +143,11 @@ in
"extensions.ignoreRecommendations" = true;
"editor.accessibilitySupport" = "off";
"vscord.status.details.text.editing" = "In {workspace}";
"vscord.status.details.text.viewing" = "In {workspace}";
"vscord.status.problems.enabled" = false;
"vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
"vscord.status.buttons.button1.enabled" = false;
# "vscord.status.details.text.editing" = "In {workspace}";
# "vscord.status.details.text.viewing" = "In {workspace}";
# "vscord.status.problems.enabled" = false;
# "vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
# "vscord.status.buttons.button1.enabled" = false;
# "gitlens.defaultTimeFormat" = "HH=mm";
# "gitlens.defaultDateShortFormat" = "YYYY/MM/DD";
@ -198,17 +192,15 @@ in
"[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
"nix.enableLanguageServer" = true;
"nix.serverPath" = lib.getExe pkgs.nixd;
"nix.serverPath" = lib.getExe pkgs.nil;
"nix.serverSettings" = {
nixd = {
nil = {
formatting.command = [ (lib.getExe pkgs.nixfmt-rfc-style) ];
nixpkgs.expr = "(builtins.getFlake \"${self}\").pkgs";
# nixpkgs.expr = "(builtins.getFlake \"${self}\").pkgs";
};
};
"typst-lsp.exportPdf" = "never";
"typst-lsp.experimentalFormatterMode" = "on";
"[typst]"."editor.defaultFormatter" = "nvarner.typst-lsp";
"[typst]"."editor.defaultFormatter" = "myriad-dreamin.tinymist";
};
};

View file

@ -38,5 +38,5 @@
catppuccin.flavor = "frappe";
catppuccin.accent = "sapphire";
home.stateVersion = "23.05";
home.stateVersion = "24.11";
}

View file

@ -1,11 +1,11 @@
{ pkgs, ... }:
{ pkgs, flake', ... }:
{
home.packages = with pkgs; [
inter
public-sans
ibm-plex
ryan-mono-bin
flake'.packages.ibm-plex-compat
flake'.packages.ryan-mono-bin
# Install the variable fonts for Cascadia Code (which
# are recommended) instead of the static fonts
@ -17,6 +17,8 @@
'';
})
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
(nerdfonts.override {
fonts = [ "NerdFontsSymbolsOnly" ];
})
];
}

View file

@ -1,7 +1,7 @@
_: {
programs.eza = {
enable = true;
icons = true;
icons = "auto";
extraOptions = [ "--all" ];
};
}

View file

@ -1,11 +1,12 @@
{ lib, ... }:
let
aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases
shellAbbrs = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: !(lib.maybeAttr "fishAlias" false a)) aliases
);
shellAliases = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases
shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: lib.maybeAttr "fishAlias" false a) aliases
);
in
{

View file

@ -29,8 +29,6 @@ _: {
fetch.fsckObjects = true;
receive.fsckObjects = true;
blame.ignoreRevsFile = ".git-blame-ignore-revs";
fetch.prune = true;
fetch.pruneTags = true;

View file

@ -1,11 +1,13 @@
{
pkgs,
inputs,
lib,
config,
...
}:
let
toml = pkgs.formats.toml { };
rust-bin = inputs.rust-overlay.lib.mkRustBin { } pkgs;
in
{
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {

View file

@ -1,6 +1,11 @@
{ config, inputs, ... }:
{
config,
inputs,
lib,
...
}:
let
shellAliases = builtins.mapAttrs (_: alias: alias.command) (import ./aliases.nix);
shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (import ./aliases.nix);
in
{
programs.zsh = {