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

chore: update

This commit is contained in:
Ryan Cao 2025-12-27 18:10:33 +08:00
parent 5e189a590f
commit 17cd6aed1d
Signed by: ryanccn
GPG key ID: F605AB4AF937D5D0
8 changed files with 126 additions and 109 deletions

View file

@ -27,7 +27,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false

View file

@ -14,12 +14,39 @@ permissions:
contents: read contents: read
jobs: jobs:
nixfmt: collect:
runs-on: ubuntu-latest
outputs:
checks: ${{ steps.checks.outputs.checks }}
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
with:
persist-credentials: false
- name: Install Nix
run: .github/workflows/install-nix.sh
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Collect checks
id: checks
run: |
echo "checks=$(nix eval --impure --json --expr 'builtins.attrNames (builtins.getFlake (toString ./.)).checks.${builtins.currentSystem}')" | tee "$GITHUB_OUTPUT"
check:
needs: collect
strategy:
matrix:
check: ${{ fromJson(needs.collect.outputs.checks) }}
fail-fast: false
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
with: with:
persist-credentials: false persist-credentials: false
@ -29,21 +56,4 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
- name: Check - name: Check
run: nix build --print-build-logs '.#checks.x86_64-linux.nixfmt' run: nix build --fallback --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}'
reuse:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
with:
persist-credentials: false
- name: Install Nix
run: .github/workflows/install-nix.sh
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Check
run: nix build --print-build-logs '.#checks.x86_64-linux.reuse'

86
flake.lock generated
View file

@ -10,11 +10,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761333240, "lastModified": 1766829716,
"narHash": "sha256-YhM7OWLLAGNuv5oujvLhX7mR1PLBOM5hSNnjvtrGgSs=", "narHash": "sha256-i3UkfiVu/YY1NmboXzGiYQagExzKoRy1doY1QxLUtJw=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "am", "repo": "am",
"rev": "62cdff6c151a8d0e628929876fb0482f5405c779", "rev": "997c4b3a93e01d040e5cae4be283d6b73534108a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -33,11 +33,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758553728, "lastModified": 1766829398,
"narHash": "sha256-/2UTfnfJJfapFxM5j+9VJBmqOk5Jd9JF1hYi5psOnXA=", "narHash": "sha256-USGDcdaDoR1xjfkKDj/z2tHsEYLwsXLHJeWKew6HfgY=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "arkencrab", "repo": "arkencrab",
"rev": "6d0d2333cf84ff1a0a71ae951bc36960a53e6852", "rev": "13d5620e04950a83a3ab119095814bf3ebd1de0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,11 +53,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760953099, "lastModified": 1765990358,
"narHash": "sha256-sOKx2YcHa+lWEvaEOIGqLN2WWk1Wf5z6KM02tdfhMtw=", "narHash": "sha256-l8x0gU8mnYaGMl+gWrsSHKBJlZWD8KXJfHTkRlFiPI0=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "f5b21876888265d2fee7fb0640d1b66a1c1c6503", "rev": "de1b60ca45a578f59f7d84c8d338b346017b2161",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -88,11 +88,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760948891, "lastModified": 1765835352,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -108,11 +108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761316995, "lastModified": 1766682973,
"narHash": "sha256-BAAjCpjTnfaxtc9NCkbUl9MUv5JmAG5qU7/G8TTHmb4=", "narHash": "sha256-GKO35onS711ThCxwWcfuvbIBKXwriahGqs+WZuJ3v9E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "82b58f38202540bce4e5e00759d115c5a43cab85", "rev": "91cdb0e2d574c64fae80d221f4bf09d5592e9ec2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -131,11 +131,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758555422, "lastModified": 1766829609,
"narHash": "sha256-TyOOpRDDrsS/EUhlok9G0P/bTP7l4ftVDaTFIFZi7G4=", "narHash": "sha256-BV5IkN9IA7PckjdHOGpIbM2/PiyPgtaxy+sOHtU1mMY=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "moldau", "repo": "moldau",
"rev": "f0c6f94073928e41e7b836105eac50f08a12568c", "rev": "5e941ab11adbf208d9dc66caa9a0908e6bcc8a3e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -154,11 +154,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761332097, "lastModified": 1766828281,
"narHash": "sha256-2eZrnxD9rOpnKq31eiNHQxvCrS/sHj4akwT4rpQqQt4=", "narHash": "sha256-G+PIfTgQJxraJ8BJtqRF0xqqvML4pLDELc2JmqiVZ50=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "morlana", "repo": "morlana",
"rev": "94b16504df6f6ae0a16d13e2c43c17d2ab0aa1ad", "rev": "6b9d4c0d330dad25bc60c5b18938fb2323eec260",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,11 +174,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761339987, "lastModified": 1766784396,
"narHash": "sha256-IUaawVwItZKi64IA6kF6wQCLCzpXbk2R46dHn8sHkig=", "narHash": "sha256-rIlgatT0JtwxsEpzq+UrrIJCRfVAXgbYPzose1DmAcM=",
"owner": "nix-darwin", "owner": "nix-darwin",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "7cd9aac79ee2924a85c211d21fafd394b06a38de", "rev": "f0c8e1f6feb562b5db09cee9fb566a2f989e6b55",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,11 +194,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760846226, "lastModified": 1765267181,
"narHash": "sha256-xmU8kAsRprJiTGBTaGrwmjBP3AMA9ltlrxHKFuy5JWc=", "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "5024e1901239a76b7bf94a4cd27f3507e639d49e", "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -209,11 +209,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 315532800, "lastModified": 1766747458,
"narHash": "sha256-SZz0rBxQMdd1qUh1ZAIRAJ2N2AF5fhPG7WYTna2ZTsk=", "narHash": "sha256-elNwNVLXR2r58KutTM34eSe5lUbFdrzdRe32d+avpRs=",
"rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1", "rev": "c633f572eded8c4f3c75b8010129854ed404a6ce",
"type": "tarball", "type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre882962.d5faa84122bc/nixexprs.tar.xz" "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre916896.c633f572eded/nixexprs.tar.xz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -230,11 +230,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761332484, "lastModified": 1766828145,
"narHash": "sha256-ZRClnXjLNgLoUx1ebzcKCCOmNrsiKs9AyVnODKMQIS4=", "narHash": "sha256-HwR8BrxJeBHYyc2pk97ujnaP3y5KPtOh9dgBkP/kVOk=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "nrr", "repo": "nrr",
"rev": "bf62b975d08b19ac0566b51df36ff2aba0b335ef", "rev": "6fd663df418bd7be680c440cdeb04cb1d9d52132",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -253,11 +253,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761332339, "lastModified": 1766828336,
"narHash": "sha256-sXv+44WdV497H3MwgAiRwXLF5Xh7D98okMok7tic9rY=", "narHash": "sha256-+IqaQBUWtz1cOjVj/DkDKhO7q5RjZvSMLVQ6fKugdKM=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "nyoom", "repo": "nyoom",
"rev": "af407eef4c1184306744f3c5d6ca06cc316cd4e9", "rev": "5dc1eb3d7a277dae27c4fc31f3150ea5fa831e24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -292,11 +292,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761273263, "lastModified": 1766803264,
"narHash": "sha256-6d6ojnu6A6sVxIjig8OL6E1T8Ge9st3YGgVwg5MOY+Q=", "narHash": "sha256-eGK6He8BR6L7N73kyyjz/vGxZX1Usnr8Gwfs3D18KgE=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "28405834d4fdd458d28e123fae4db148daecec6f", "rev": "6b5c52313aaf3f3e1a0a6757bb89846edfb5195c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -315,11 +315,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758552530, "lastModified": 1766829399,
"narHash": "sha256-6TZCSIK1ds8PuhSqAjM7/N4tRs1P4g276g2beYRArd8=", "narHash": "sha256-E1CHpceiiZdJbIJjMebh0VrynC2f9JxIXM5AMCxrHIk=",
"owner": "ryanccn", "owner": "ryanccn",
"repo": "spdx-gen", "repo": "spdx-gen",
"rev": "ca5a833641f479ca4f9a8df2692c77fca55aa037", "rev": "839fb73921b5426577f49d1f9a4e587546480e13",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,12 +6,7 @@
outputs = outputs =
inputs: inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ systems = inputs.nixpkgs.lib.systems.flakeExposed;
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [ imports = [
./checks ./checks

View file

@ -2,7 +2,12 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
{ pkgs, lib, ... }: {
pkgs,
lib,
config,
...
}:
{ {
nix.package = pkgs.nixVersions.latest; nix.package = pkgs.nixVersions.latest;
@ -44,6 +49,12 @@
hostPlatform = "aarch64-darwin"; hostPlatform = "aarch64-darwin";
# config.allowUnfree = true; # config.allowUnfree = true;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ ]; config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ ];
overlays = [
(_: prev: {
comma = prev.comma.override { nix = config.nix.package; };
})
];
}; };
environment.variables = { environment.variables = {

View file

@ -41,9 +41,12 @@ in
nerdfix nerdfix
reuse reuse
ripgrep ripgrep
shellcheck
tokei tokei
vhs vhs
watchexec watchexec
curl
xh xh
exiftool exiftool

View file

@ -3,43 +3,39 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
{ {
pkgs,
lib, lib,
config, config,
... ...
}: }:
let
keyValue = pkgs.formats.keyValue {
listsAsDuplicateKeys = true;
mkKeyValue = lib.generators.mkKeyValueDefault { } " = ";
};
settings = {
theme = "Catppuccin ${lib.toSentenceCase config.catppuccin.flavor}";
window-colorspace = "display-p3";
font-family = "Ryan Term";
font-size = 14;
font-feature = [
"-calt"
"-dlig"
];
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;
window-padding-y = 15;
keybind = [ "super+backspace=text:\\x15" ];
};
in
{ {
xdg.configFile."ghostty/config".source = keyValue.generate "ghostty-config" settings; programs.ghostty = {
enable = true;
package = null;
settings = {
theme = "Catppuccin ${lib.toSentenceCase config.catppuccin.flavor}";
window-colorspace = "display-p3";
font-family = "Ryan Term";
font-size = 14;
font-feature = [
"-calt"
"-dlig"
];
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;
window-padding-y = 15;
keybind = [ "super+backspace=text:\\x15" ];
};
};
} }

View file

@ -31,7 +31,6 @@ let
"dotjoshjohnson.xml" "dotjoshjohnson.xml"
"dprint.dprint" "dprint.dprint"
"editorconfig.editorconfig" "editorconfig.editorconfig"
"esbenp.prettier-vscode"
"github.vscode-github-actions" "github.vscode-github-actions"
"graphql.vscode-graphql" "graphql.vscode-graphql"
"graphql.vscode-graphql-syntax" "graphql.vscode-graphql-syntax"
@ -42,6 +41,7 @@ let
"ms-python.python" "ms-python.python"
"ms-python.vscode-pylance" "ms-python.vscode-pylance"
"naumovs.color-highlight" "naumovs.color-highlight"
"prettier.prettier-vscode"
"prisma.prisma" "prisma.prisma"
"ronnidc.nunjucks" "ronnidc.nunjucks"
"rust-lang.rust-analyzer" "rust-lang.rust-analyzer"
@ -73,11 +73,11 @@ in
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.writeShellApplication { package = pkgs.writeShellApplication {
name = "vscode-1.100.2"; name = "vscode-1.107.0";
text = ""; text = "";
derivationArgs = { derivationArgs = {
pname = "vscode"; pname = "vscode";
version = "1.100.2"; version = "1.107.0";
}; };
}; };
@ -127,7 +127,9 @@ in
# "editor.minimap.renderCharacters" = false; # "editor.minimap.renderCharacters" = false;
"workbench.editor.highlightModifiedTabs" = true; "workbench.editor.highlightModifiedTabs" = true;
"workbench.editor.empty.hint" = "hidden"; "workbench.editor.empty.hint" = "hidden";
"chat.disableAIFeatures" = true; "chat.disableAIFeatures" = true;
"workbench.settings.showAISearchToggle" = false;
"editor.inlineSuggest.enabled" = true; "editor.inlineSuggest.enabled" = true;
"editor.tabSize" = 2; "editor.tabSize" = 2;
@ -149,7 +151,7 @@ in
}; };
}; };
"editor.defaultFormatter" = "esbenp.prettier-vscode"; "editor.defaultFormatter" = "prettier.prettier-vscode";
"javascript.preferGoToSourceDefinition" = true; "javascript.preferGoToSourceDefinition" = true;
"typescript.preferGoToSourceDefinition" = true; "typescript.preferGoToSourceDefinition" = true;