Compare commits

...

3 commits

Author SHA1 Message Date
cy
402fe5735e
flake update
Signed-off-by: cy <cy@cy7.sh>
2025-03-26 15:08:33 -04:00
cy
225e01d935
nix fmt 2025-03-26 11:53:06 -04:00
cy
57aa110347
don't overlay pixelflasher and don't patch attic num_prefetch 2025-03-26 11:51:51 -04:00
7 changed files with 84 additions and 115 deletions

View file

@ -3,7 +3,6 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
pull_request: pull_request:
env: env:
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }} ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
NIX_CONFIG: | NIX_CONFIG: |
@ -14,7 +13,6 @@ env:
accept-flake-config = true accept-flake-config = true
system-features = nixos-test benchmark big-parallel kvm system-features = nixos-test benchmark big-parallel kvm
TERM: ansi TERM: ansi
jobs: jobs:
build-machines: build-machines:
strategy: strategy:
@ -38,20 +36,16 @@ jobs:
remove-codeql: 'true' remove-codeql: 'true'
remove-docker-images: 'true' remove-docker-images: 'true'
build-mount-path: /nix build-mount-path: /nix
- name: Install Nix - name: Install Nix
uses: cachix/install-nix-action@v30 uses: cachix/install-nix-action@v30
- name: Sync repository - name: Sync repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
persist-credentials: false persist-credentials: false
- name: setup attic - name: setup attic
run: | run: |
nix profile install github:zhaofengli/attic nix profile install github:zhaofengli/attic
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN" attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
- name: build - name: build
run: | run: |
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel" package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"

123
flake.lock generated
View file

@ -131,11 +131,11 @@
"rocksdb": "rocksdb" "rocksdb": "rocksdb"
}, },
"locked": { "locked": {
"lastModified": 1742266954, "lastModified": 1742567657,
"narHash": "sha256-PoVjZXR24r1WPyWWK+DZDAlVr4otn/BcxY7/jd8fehM=", "narHash": "sha256-p513FwDJl1J8fCpUFbAeZTb0ONbEmn2r5kGFBc9siUw=",
"owner": "girlbossceo", "owner": "girlbossceo",
"repo": "conduwuit", "repo": "conduwuit",
"rev": "7bf92c8a3710eeff229bd86bc81a89daa94b66d5", "rev": "33c5afe050491988ee8224af25b9b06e892f4b50",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -146,11 +146,11 @@
}, },
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1742317686, "lastModified": 1742394900,
"narHash": "sha256-ScJYnUykEDhYeCepoAWBbZWx2fpQ8ottyvOyGry7HqE=", "narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "66cb0013f9a99d710b167ad13cbd8cc4e64f2ddb", "rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -361,11 +361,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742243551, "lastModified": 1742547966,
"narHash": "sha256-hp2tKtJHW/vbiIT4hRhP8cfZEACAWZ92lCdaO9WEi2E=", "narHash": "sha256-AJfw+XRaRyrlpb9Wy6rVz44JePy0AXWPECXVPBnrOfI=",
"owner": "deuxfleurs-org", "owner": "deuxfleurs-org",
"repo": "garage", "repo": "garage",
"rev": "6906a4ff12838da2a74bdaeb7e7cd05cd1d69699", "rev": "14d2f2b18da015508d4a1e31b2f014da5188d516",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -459,11 +459,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742479163, "lastModified": 1742907812,
"narHash": "sha256-YC0zdGyZMu7seA2Jm1mxtcxE4lSeVwvCPMfWzJ8+o/c=", "narHash": "sha256-iloXwOZWx43mRvW3tlqRbqlDCIkOudrbtqVWE+q5OLg=",
"owner": "helix-editor", "owner": "helix-editor",
"repo": "helix", "repo": "helix",
"rev": "b7d735ffe66a03ab5970e5f860923aada50d4e4c", "rev": "388a3b78e3c4feff9c058b020c12f9eb47e72168",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -479,11 +479,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742305478, "lastModified": 1742996658,
"narHash": "sha256-iYCinzZnnUeCkZ031qGRwPdwRsqW6o9Y0MgGpA7Zva4=", "narHash": "sha256-snxgTLVq6ooaD3W3mPHu7LVWpoZKczhxHAUZy2ea4oA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fb74bb76d94a6c55632376c931fc108131260ee9", "rev": "693840c01b9bef9e54100239cef937e53d4661bf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -590,11 +590,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1741888409, "lastModified": 1742622332,
"narHash": "sha256-gJ7QmlwsJ/QdwUjwTjifNo3v7OBQm2N6xa19l3mMWM4=", "narHash": "sha256-z652gNdFc/95Fheq4DzVObERYRo+j9RdCF6tzkR8r80=",
"rev": "20edd45ae816c73504ddfb9c678756e003ceeafd", "rev": "6059cbb031e49e05dd5d16208e2e50d3ab2611db",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/20edd45ae816c73504ddfb9c678756e003ceeafd.tar.gz?rev=20edd45ae816c73504ddfb9c678756e003ceeafd" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/6059cbb031e49e05dd5d16208e2e50d3ab2611db.tar.gz?rev=6059cbb031e49e05dd5d16208e2e50d3ab2611db"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -613,11 +613,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741894565, "lastModified": 1742945498,
"narHash": "sha256-2FD0NDJbEjUHloVrtEIms5miJsj1tvQCc/0YK5ambyc=", "narHash": "sha256-MB/b/xcDKqaVBxJIIxwb81r8ZiGLeKEcqokATRRroo8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a6da43f8193d9e329bba1795c42590c27966082e", "rev": "fa69ae26cc32dda178117b46487c2165c0e08316",
"revCount": 136, "revCount": 138,
"type": "git", "type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module" "url": "https://git.lix.systems/lix-project/nixos-module"
}, },
@ -737,11 +737,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742174123, "lastModified": 1742701275,
"narHash": "sha256-pDNzMoR6m1ZSJToZQ6XDTLVSdzIzmFl1b8Pc3f7iV6Y=", "narHash": "sha256-AulwPVrS9859t+eJ61v24wH/nfBEIDSXYxlRo3fL/SA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "2cfb4e1ca32f59dd2811d7a6dd5d4d1225f0955c", "rev": "36dc43cb50d5d20f90a28d53abb33a32b0a2aae6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -757,11 +757,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742204505, "lastModified": 1742804816,
"narHash": "sha256-sHBzuG9K/VrvOrcLd9GwoCLaQZDVedi/00YmFfdKq/A=", "narHash": "sha256-oRNAhQwybNM5IUeGLR/4APdiec3t8t3vuWALEGg0t/Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-ld", "repo": "nix-ld",
"rev": "bc1ecb8ca83507c764a3909f02f1acf53c033585", "rev": "27a5f75260a086f391c0eca38a5e306b9823a0b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -804,11 +804,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1742268799, "lastModified": 1742751704,
"narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=", "narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "da044451c6a70518db5b730fe277b70f494188f1", "rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -868,11 +868,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1742276595, "lastModified": 1743008566,
"narHash": "sha256-bsg9y3NoMGu0jgTI5XbxvzQFc9JtZB51i500WlVws80=", "narHash": "sha256-vqiNwWvNcIuHIPu6RC1WScwDHlcGerCZWZ8XOLVu0B0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2b3795787eba0066a2bc8bba7362422e5713840f", "rev": "f55926cd4adb4db12ca97a86bc4e48e2c213f4d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -893,11 +893,11 @@
"nuschtosSearch": "nuschtosSearch" "nuschtosSearch": "nuschtosSearch"
}, },
"locked": { "locked": {
"lastModified": 1742255305, "lastModified": 1742991302,
"narHash": "sha256-XxygfriVXQt+5Iqh6AOjZL5Aes5dH2xzVKpHpL8pDQg=", "narHash": "sha256-5S+qnc5ijgFWlAWS9+L7uAgpDnL0RtVEDhVpHWGoavA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "78f6166c23f80bdfbcc8c44b20f7f4132299a33f", "rev": "1c0dd320d9c4f250ac33382e11d370b7abe97622",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -916,11 +916,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738508923, "lastModified": 1742659553,
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", "narHash": "sha256-i/JCrr/jApVorI9GkSV5to+USrRCa0rWuQDH8JSlK2A=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb", "rev": "508752835128a3977985a4d5225ff241f7756181",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -945,22 +945,6 @@
"type": "github" "type": "github"
} }
}, },
"pixelflasher": {
"locked": {
"lastModified": 1741302870,
"narHash": "sha256-7AywZ1b3PaqolAZ0vQmddD6Br4o0a7ucdtE0/W3rnaM=",
"owner": "cything",
"repo": "nixpkgs",
"rev": "5ef8b274bb7f939104295a22cec3382268ed73cc",
"type": "github"
},
"original": {
"owner": "cything",
"ref": "pixelflasher",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -1024,7 +1008,6 @@
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"nixvim": "nixvim", "nixvim": "nixvim",
"nvim-github-theme": "nvim-github-theme", "nvim-github-theme": "nvim-github-theme",
"pixelflasher": "pixelflasher",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"treefmt": "treefmt", "treefmt": "treefmt",
@ -1055,11 +1038,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742265167, "lastModified": 1742956365,
"narHash": "sha256-RB0UEF9IXIgwuuBFC+s9H4rDyvmMZePHlBAK4vRAwf4=", "narHash": "sha256-Slrqmt6kJ/M7Z/ce4ebQWsz2aeEodrX56CsupOEPoz0=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "87f0965f9f5b13fca9f38074eee8369dc767550d", "rev": "a0e3395c63cdbc9c1ec17915f8328c077c79c4a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1075,11 +1058,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742239755, "lastModified": 1742700801,
"narHash": "sha256-ptn8dR4Uat3UUadGYNnB7CIH9SQm8mK69D2A/twBUXQ=", "narHash": "sha256-ZGlpUDsuBdeZeTNgoMv+aw0ByXT2J3wkYw9kJwkAS4M=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "787afce414bcce803b605c510b60bf43c11f4b55", "rev": "67566fe68a8bed2a7b1175fdfb0697ed22ae8852",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1125,11 +1108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742303424, "lastModified": 1742982148,
"narHash": "sha256-2R7cGdcA2npQQcIWu2cTlU63veTzwVZe78BliIuJT00=", "narHash": "sha256-aRA6LSxjlbMI6MmMzi/M5WH/ynd8pK+vACD9za3MKLQ=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "b3b938ab8ba2e8a0ce9ee9b30ccfa5e903ae5753", "rev": "61c88349bf6dff49fa52d7dfc39b21026c2a8881",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1148,11 +1131,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742262692, "lastModified": 1742954036,
"narHash": "sha256-kCuy1Fld1vFmor6SZ48DdtiLv9/zUhW8lCaTA+Py+es=", "narHash": "sha256-L6QGMSkquAqW2IjiAI6Q0e0aOR1DsZW8teDxzHQaNaA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "32de9a383db6b555ac92877dd8b5b986f4151de7", "rev": "463df39cfb76e4896a8625554d3c675c30fbe63a",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -71,7 +71,6 @@
url = "github:nix-community/nix-index-database"; url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
pixelflasher.url = "github:cything/nixpkgs/pixelflasher";
attic = { attic = {
url = "github:zhaofengli/attic"; url = "github:zhaofengli/attic";
inputs = { inputs = {

View file

@ -107,7 +107,7 @@
"vim.enableNeovim" = true; "vim.enableNeovim" = true;
"vim.hlsearch" = true; "vim.hlsearch" = true;
"vim.easymotion" = true; "vim.easymotion" = true;
"editor.lineNumbers" = "relative"; "editor.lineNumbers" = "relative";
"vim.normalModeKeyBindings" = vimCommonKeyBindings ++ [ "vim.normalModeKeyBindings" = vimCommonKeyBindings ++ [
{ {
"before" = [ ";" ]; "before" = [ ";" ];
@ -223,32 +223,32 @@
} }
]; ];
}; };
keybindings = [ keybindings = [
# repeat these vim bindings here cause otherwise they get overridden by vscode # repeat these vim bindings here cause otherwise they get overridden by vscode
{ {
"key" = "ctrl+b"; "key" = "ctrl+b";
"when" = "inputFocus"; "when" = "inputFocus";
"command" = "cursorLeft"; "command" = "cursorLeft";
} }
{ {
"key" = "ctrl+f"; "key" = "ctrl+f";
"when" = "inputFocus"; "when" = "inputFocus";
"command" = "cursorRight"; "command" = "cursorRight";
} }
# clear default bindings that conflict # clear default bindings that conflict
{ {
"key" = "ctrl+f"; "key" = "ctrl+f";
"command" = "-actions.find"; "command" = "-actions.find";
} }
{ {
"key" = "ctrl+b"; "key" = "ctrl+b";
"command" = "-workbench.action.toggleSidebarVisibility"; "command" = "-workbench.action.toggleSidebarVisibility";
} }
{ {
"key" = "ctrl+w"; "key" = "ctrl+w";
"command" = "-workbench.action.closeActiveEditor"; "command" = "-workbench.action.closeActiveEditor";
} }
]; ];
}; };
}; };
} }

View file

@ -18,7 +18,10 @@ in
settings = { settings = {
listen = "[::]:8091"; listen = "[::]:8091";
api-endpoint = "https://cache.cy7.sh/"; api-endpoint = "https://cache.cy7.sh/";
allowed-hosts = [ "cache.cy7.sh" "cdn.cy7.sh" ]; allowed-hosts = [
"cache.cy7.sh"
"cdn.cy7.sh"
];
require-proof-of-possession = false; require-proof-of-possession = false;
compression = { compression = {
type = "none"; type = "none";

View file

@ -11,13 +11,4 @@ index 02e4857..b522154 100644
Download::Url(url) => Ok(Redirect::temporary(&url).into_response()), Download::Url(url) => Ok(Redirect::temporary(&url).into_response()),
Download::AsyncRead(stream) => { Download::AsyncRead(stream) => {
let stream = ReaderStream::new(stream).map_err(|e| { let stream = ReaderStream::new(stream).map_err(|e| {
@@ -262,7 +262,7 @@ async fn get_nar(
// TODO: Make num_prefetch configurable
// The ideal size depends on the average chunk size
- let merged = merge_chunks(chunks, streamer, storage, 2).map_err(|e| {
+ let merged = merge_chunks(chunks, streamer, storage, 8).map_err(|e| {
tracing::error!(%e, "Stream error");
e
});

View file

@ -16,7 +16,6 @@ in
in in
{ {
conduwuit = pkgFrom inputs.conduwuit "default"; conduwuit = pkgFrom inputs.conduwuit "default";
pixelflasher = nixpkgsFrom inputs.pixelflasher "pixelflasher";
attic-server = pkgFrom inputs.attic "attic-server"; attic-server = pkgFrom inputs.attic "attic-server";
attic = pkgFrom inputs.attic "attic"; attic = pkgFrom inputs.attic "attic";
garage = ( garage = (