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:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
with:
persist-credentials: false

View file

@ -14,12 +14,39 @@ permissions:
contents: read
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
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # ratchet:actions/checkout@v6
with:
persist-credentials: false
@ -29,21 +56,4 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
- name: Check
run: nix build --print-build-logs '.#checks.x86_64-linux.nixfmt'
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'
run: nix build --fallback --print-build-logs '.#checks.x86_64-linux.${{ matrix.check }}'

86
flake.lock generated
View file

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

View file

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

View file

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

View file

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

View file

@ -3,16 +3,14 @@
# SPDX-License-Identifier: Apache-2.0
{
pkgs,
lib,
config,
...
}:
let
keyValue = pkgs.formats.keyValue {
listsAsDuplicateKeys = true;
mkKeyValue = lib.generators.mkKeyValueDefault { } " = ";
};
{
programs.ghostty = {
enable = true;
package = null;
settings = {
theme = "Catppuccin ${lib.toSentenceCase config.catppuccin.flavor}";
@ -39,7 +37,5 @@ let
keybind = [ "super+backspace=text:\\x15" ];
};
in
{
xdg.configFile."ghostty/config".source = keyValue.generate "ghostty-config" settings;
};
}

View file

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