1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2026-01-26 19:56:29 +01:00

feat(git): add helpful configs

This commit is contained in:
Ryan Cao 2024-04-06 16:16:32 +08:00
parent 3ea99dd18a
commit 2eb3764b31
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
10 changed files with 94 additions and 48 deletions

88
flake.lock generated
View file

@ -22,11 +22,11 @@
}, },
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1707140582, "lastModified": 1710663401,
"narHash": "sha256-Wzq2W08mSfJ/M1yRQWGwvuEEwQn3+xDx82/9FrouDzw=", "narHash": "sha256-pA1l9dBv85e7r0UWRmgZMYLDa4S1LXFtRLvXCAJGcfI=",
"owner": "Stonks3141", "owner": "Stonks3141",
"repo": "ctp-nix", "repo": "ctp-nix",
"rev": "948fe713ea548764a0a3f122975b8d79c44b7054", "rev": "03b95cad3bbeb9913db6d89dc3f4fccc6c8fcbd4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -78,11 +78,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1710138244, "lastModified": 1712298178,
"narHash": "sha256-vl41HMQ9WrLgUto7EpxWgAjAksYxKddUKQCfcF2Tpac=", "narHash": "sha256-590fpCPXYAkaAeBz/V91GX4/KGzPObdYtqsTWzT6AhI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "5708f08c8bcb6dd98b573a162e05cd5aa506091e", "rev": "569b5b5781395da08e7064e825953c548c26af76",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -107,12 +107,12 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701704947, "lastModified": 1711118970,
"narHash": "sha256-G2bLYand61E/s652Q+5XSfXdM6XUWixiXRRMd3HvfM4=", "narHash": "sha256-fRaKydMSwd1zl6ptBKvn5ej2pqtI8xi9dioFmR8QA+g=",
"rev": "b79c8fd3dc0aa174f0918dccfbca66efcd0e9e4e", "rev": "73fed26f0231ae650122beb3ac1b7654b5cc682c",
"revCount": 405, "revCount": 425,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/fh/0.1.9/018c3585-e222-75a9-ac61-c5916f086445/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/fh/0.1.10/018e66b1-a218-7f23-949d-ace71c4e4c8b/source.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -160,11 +160,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710062421, "lastModified": 1712317700,
"narHash": "sha256-FiCNRfyUgJOLYIokLiFsfI7B+Zn9HDnOzFR3uVr5qsQ=", "narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "36f873dfc8e2b6b89936ff3e2b74803d50447e0a", "rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -220,11 +220,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709771483, "lastModified": 1711763326,
"narHash": "sha256-Hjzu9nCknHLQvhdaRFfCEprH0o15KcaNu1QDr3J88DI=", "narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "550340062c16d7ef8c2cc20a3d2b97bcd3c6b6f6", "rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,11 +235,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1710097495, "lastModified": 1712222121,
"narHash": "sha256-B7Ea7q7hU7SE8wOPJ9oXEBjvB89yl2csaLjf5v/7jr8=", "narHash": "sha256-8f3glF4uwsPlDvaKDRgXD9xGe4YoCH4jA8ICxy/NbCo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d40e866b1f98698d454dad8f592fe7616ff705a4", "rev": "23ff7d9dc4f3d553939e7bfe0d2667198f993536",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -251,16 +251,22 @@
}, },
"nrr": { "nrr": {
"inputs": { "inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
],
"rust-overlay": [
"rust-overlay"
] ]
}, },
"locked": { "locked": {
"lastModified": 1708768548, "lastModified": 1712368415,
"narHash": "sha256-asoXJl5tRnyM8jQzUFEa7lR5zpKWVFJObku3FTu2zCo=", "narHash": "sha256-QRYDTQ2Bs3dP0gx3X5qo6iAfIZRB3KpetDWNdkjZ38E=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "nrr", "repo": "nrr",
"rev": "7eba97bc83cfaca9e2ecaaa1e874b4d7d4e897f4", "rev": "a8a485922abd742bd6f4acd9c50e11d1a72ca7ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -291,11 +297,11 @@
"ohmyzsh": { "ohmyzsh": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1710036976, "lastModified": 1712295516,
"narHash": "sha256-eCWw3OaNJVYrxSKZeUcfheqss53R38FgkmGrB+dT1Xc=", "narHash": "sha256-sorDPoslcg4wEnOuykYwuSncLnesYXECN8ucpHLavRc=",
"owner": "ohmyzsh", "owner": "ohmyzsh",
"repo": "ohmyzsh", "repo": "ohmyzsh",
"rev": "4fd2af0a82e2826317d9551ecd8d5f44553828d7", "rev": "038931039030911852d456215d6f39385d5b7a6e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -322,17 +328,18 @@
"nrr": "nrr", "nrr": "nrr",
"nyoom": "nyoom", "nyoom": "nyoom",
"ohmyzsh": "ohmyzsh", "ohmyzsh": "ohmyzsh",
"rust-overlay": "rust-overlay",
"vivid-zsh": "vivid-zsh" "vivid-zsh": "vivid-zsh"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1709978501, "lastModified": 1712156296,
"narHash": "sha256-NfeDjQZUrVb9hzBPcqO19s0p/zSOatD5ZK+J7rZiE3c=", "narHash": "sha256-St7ZQrkrr5lmQX9wC1ZJAFxL8W7alswnyZk9d1se3Us=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "574e23ec508064613783cba3d1833a95fd9a5080", "rev": "8e581ac348e223488622f4d3003cb2bd412bf27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -342,6 +349,29 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712369449,
"narHash": "sha256-tbWug3uXPlSm1j0xD80Y3xbP+otT6gLnQo1e/vQat48=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "41b3b080cc3e4b3a48e933b87fc15a05f1870779",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View file

@ -33,6 +33,8 @@
nrr = { nrr = {
url = "github:ryanccn/nrr"; url = "github:ryanccn/nrr";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
inputs.flake-utils.follows = "flake-utils";
}; };
choirpack = { choirpack = {
@ -53,6 +55,12 @@
inputs.flake-compat.follows = "flake-compat"; inputs.flake-compat.follows = "flake-compat";
}; };
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
naersk = { naersk = {
url = "github:nix-community/naersk"; url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View file

@ -8,12 +8,12 @@ adjust-cell-height = 50%
adjust-underline-position = 5 adjust-underline-position = 5
command = /run/current-system/sw/bin/fish -l command = /run/current-system/sw/bin/fish -l
shell-integration = fish
shell-integration-features = cursor, sudo shell-integration-features = cursor, sudo
macos-titlebar-tabs = true macos-titlebar-tabs = true
macos-option-as-alt = true macos-option-as-alt = true
window-step-resize = true
window-padding-x = 15 window-padding-x = 15
window-padding-y = 15 window-padding-y = 15

View file

@ -17,7 +17,7 @@
"denoland.vscode-deno" "denoland.vscode-deno"
"dprint.dprint" "dprint.dprint"
"dotjoshjohnson.xml" "dotjoshjohnson.xml"
"eamodio.gitlens" # "eamodio.gitlens"
"editorconfig.editorconfig" "editorconfig.editorconfig"
# "enkia.tokyo-night" # "enkia.tokyo-night"
"esbenp.prettier-vscode" "esbenp.prettier-vscode"
@ -46,6 +46,7 @@
"unifiedjs.vscode-mdx" "unifiedjs.vscode-mdx"
"usernamehw.errorlens" "usernamehw.errorlens"
"vue.volar" "vue.volar"
"waderyan.gitblame"
"xaver.clang-format" "xaver.clang-format"
"yoavbls.pretty-ts-errors" "yoavbls.pretty-ts-errors"
]; ];
@ -54,8 +55,8 @@ in {
enable = true; enable = true;
package = pkgs.stdenv.mkDerivation { package = pkgs.stdenv.mkDerivation {
pname = "vscode"; pname = "vscode";
version = "1.86.2"; version = "1.87.2";
src = pkgs.emptyDirectory; dontUnpack = true;
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
''; '';
@ -74,7 +75,7 @@ in {
"catppuccin.boldKeywords" = false; "catppuccin.boldKeywords" = false;
"catppuccin.italicKeywords" = true; "catppuccin.italicKeywords" = true;
"catppuccin.accentColor" = "sky"; "catppuccin.accentColor" = "sapphire";
"catppuccin.workbenchMode" = "flat"; "catppuccin.workbenchMode" = "flat";
"catppuccin.customUIColors" = { "catppuccin.customUIColors" = {
"all" = { "all" = {
@ -95,6 +96,9 @@ in {
"diffEditor.ignoreTrimWhitespace" = false; "diffEditor.ignoreTrimWhitespace" = false;
"gitlens.showWelcomeOnInstall" = false; "gitlens.showWelcomeOnInstall" = false;
"gitblame.inlineMessageEnabled" = true;
"gitblame.inlineMessageFormat" = "\${author.name} · \${time.ago} · \${commit.summary,120}";
"editor.fontFamily" = "\"Ryan Mono\", \"Symbols Nerd Font\", \"Apple Color Emoji\", monospace"; "editor.fontFamily" = "\"Ryan Mono\", \"Symbols Nerd Font\", \"Apple Color Emoji\", monospace";
"editor.fontLigatures" = true; "editor.fontLigatures" = true;
# "editor.fontLigatures" = "'calt', 'ss01'"; # "editor.fontLigatures" = "'calt', 'ss01'";
@ -146,9 +150,9 @@ in {
"vscord.status.state.text.editing" = "Working on {file_name}{file_extension}"; "vscord.status.state.text.editing" = "Working on {file_name}{file_extension}";
"vscord.status.buttons.button1.enabled" = false; "vscord.status.buttons.button1.enabled" = false;
"gitlens.defaultTimeFormat" = "HH=mm"; # "gitlens.defaultTimeFormat" = "HH=mm";
"gitlens.defaultDateShortFormat" = "YYYY/MM/DD"; # "gitlens.defaultDateShortFormat" = "YYYY/MM/DD";
"gitlens.defaultDateFormat" = null; # "gitlens.defaultDateFormat" = null;
"[python]"."editor.tabSize" = 4; "[python]"."editor.tabSize" = 4;
"[python]"."editor.defaultFormatter" = "charliermarsh.ruff"; "[python]"."editor.defaultFormatter" = "charliermarsh.ruff";

View file

@ -4,10 +4,8 @@
public-sans public-sans
ibm-plex ibm-plex
monaspace
ryan-mono-bin ryan-mono-bin
ryan-term-bin ryan-term-bin
commit-mono
(nerdfonts.override { (nerdfonts.override {
fonts = [ fonts = [
"CascadiaCode" "CascadiaCode"

View file

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

View file

@ -1,7 +1,6 @@
_: { _: {
programs.git = { programs.git = {
enable = true; enable = true;
difftastic.enable = true; difftastic.enable = true;
ignores = [ ignores = [
@ -20,6 +19,14 @@ _: {
gpg.format = "ssh"; gpg.format = "ssh";
"gpg \"ssh\"".program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; "gpg \"ssh\"".program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
log.date = "iso";
merge.conflictstyle = "zdiff3";
diff.algorithm = "histogram";
transfer.fsckobjects = true;
fetch.fsckobjects = true;
receive.fsckObjects = true;
push.autoSetupRemote = true; push.autoSetupRemote = true;
}; };
}; };

View file

@ -7,11 +7,11 @@
in { in {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true;
enableCompletion = true;
dotDir = ".config/zsh"; dotDir = ".config/zsh";
autosuggestion.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
enableCompletion = true;
envExtra = builtins.readFile ./zsh/envExtra.zsh; envExtra = builtins.readFile ./zsh/envExtra.zsh;
# initExtraBeforeCompInit = builtins.readFile ./zsh/initExtraBeforeCompInit.zsh; # initExtraBeforeCompInit = builtins.readFile ./zsh/initExtraBeforeCompInit.zsh;

View file

@ -32,11 +32,11 @@
nodePackages.typescript-language-server nodePackages.typescript-language-server
dprint dprint
google-cloud-sdk # google-cloud-sdk
railway railway
cloudflared cloudflared
flyctl flyctl
pscale # pscale
# btop # btop
doggo doggo

View file

@ -1,5 +1,5 @@
(_: prev: let (_: prev: let
version = "2024.03.11"; version = "2024.04.06";
mkFontVariant = { mkFontVariant = {
variant, variant,
@ -33,11 +33,11 @@
in { in {
ryan-mono-bin = mkFontVariant { ryan-mono-bin = mkFontVariant {
variant = "RyanMono"; variant = "RyanMono";
hash = "sha256-+ReEWd8Kpdgnq9zKA0+7KVkwwrV7tcVM9ldes2UeiG0="; hash = "sha256-oqrG258ONpwekBdyBnxl9x+8wHlBaUpYoP4PIIeD4+4=";
}; };
ryan-term-bin = mkFontVariant { ryan-term-bin = mkFontVariant {
variant = "RyanTerm"; variant = "RyanTerm";
hash = "sha256-eAu26f/pJPMwV4BiABPwNJI1HRF4HbPsm/fL6/tseq4="; hash = "sha256-FwIo1bVNkIrd9LIQUg4hSKv13dv97X7IVo3/IejVuGg=";
}; };
}) })