Compare commits

..

No commits in common. "57aa1103476fa98b45e43ae8ce43a756ee6ccd94" and "8c921fc1ab4d703cffd19bee965280845ff1ad24" have entirely different histories.

7 changed files with 37 additions and 70 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"

17
flake.lock generated
View file

@ -945,6 +945,22 @@
"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": [
@ -1008,6 +1024,7 @@
"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",

View file

@ -71,6 +71,7 @@
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 = {
@ -133,6 +134,7 @@
imports = [ imports = [
inputs.treefmt.flakeModule inputs.treefmt.flakeModule
]; ];
debug = true;
systems = [ systems = [
"x86_64-linux" "x86_64-linux"
]; ];
@ -145,14 +147,11 @@
treefmt = { treefmt = {
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs.nixfmt.enable = true; programs.nixfmt.enable = true;
programs.stylua.enable = true;
programs.yamlfmt.enable = true;
programs.typos.enable = true; programs.typos.enable = true;
programs.shellcheck.enable = true; programs.shellcheck.enable = true;
programs.yamlfmt = {
enable = true;
settings.retain_line_breaks = true;
};
settings.global.excludes = [ settings.global.excludes = [
"secrets/*" "secrets/*"
"**/*.png" # tries to format a png file "**/*.png" # tries to format a png file

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
@ -23,12 +23,10 @@
tamasfe.even-better-toml tamasfe.even-better-toml
golang.go golang.go
ms-python.python ms-python.python
christian-kohler.path-intellisense
]; ];
userSettings = userSettings =
let let
vimCommonKeyBindings = [ vimCommonKeyBindings = [
# nice emacs bindings
{ {
"before" = [ "C-a" ]; "before" = [ "C-a" ];
"commands" = [ "cursorHome" ]; "commands" = [ "cursorHome" ];
@ -37,19 +35,6 @@
"before" = [ "C-e" ]; "before" = [ "C-e" ];
"commands" = [ "cursorEnd" ]; "commands" = [ "cursorEnd" ];
} }
{
"before" = [ "C-b" ];
"commands" = [ "cursorLeft" ];
}
{
"before" = [ "C-f" ];
"commands" = [ "cursorRight" ];
}
# ctrl+h to turn off search highlighting
{
"before" = [ "C-h" ];
"commands" = [ ":nohl" ];
}
]; ];
in in
{ {
@ -89,7 +74,7 @@
"markdown-preview-enhanced.previewTheme" = "github-dark.css"; "markdown-preview-enhanced.previewTheme" = "github-dark.css";
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nil}"; "nix.serverPath" = "nil";
"bookmarks.saveBookmarksInProject" = true; "bookmarks.saveBookmarksInProject" = true;
"cSpell.enabledFileTypes" = { "cSpell.enabledFileTypes" = {
@ -99,15 +84,6 @@
# vim stuff # vim stuff
"vim.leader" = ","; "vim.leader" = ",";
"extensions.experimental.affinity" = {
"vscodevim.vim" = 1;
};
"vim.sneak" = true;
"vim.sneakUseIgnorecaseAndSmartcase" = true;
"vim.enableNeovim" = true;
"vim.hlsearch" = true;
"vim.easymotion" = true;
"editor.lineNumbers" = "relative";
"vim.normalModeKeyBindings" = vimCommonKeyBindings ++ [ "vim.normalModeKeyBindings" = vimCommonKeyBindings ++ [
{ {
"before" = [ ";" ]; "before" = [ ";" ];
@ -142,13 +118,6 @@
]; ];
"commands" = [ "workbench.action.toggleSidebarVisibility" ]; "commands" = [ "workbench.action.toggleSidebarVisibility" ];
} }
{
"before" = [
"<space>"
"s"
];
"commands" = [ "workbench.action.toggleSidebarVisibility" ];
}
{ {
"before" = [ "before" = [
"<leader>" "<leader>"
@ -222,33 +191,10 @@
"commands" = [ "editor.action.outdentLines" ]; "commands" = [ "editor.action.outdentLines" ];
} }
]; ];
"extensions.experimental.affinity" = {
"vscodevim.vim" = 1;
};
}; };
keybindings = [
# repeat these vim bindings here cause otherwise they get overridden by vscode
{
"key" = "ctrl+b";
"when" = "inputFocus";
"command" = "cursorLeft";
}
{
"key" = "ctrl+f";
"when" = "inputFocus";
"command" = "cursorRight";
}
# clear default bindings that conflict
{
"key" = "ctrl+f";
"command" = "-actions.find";
}
{
"key" = "ctrl+b";
"command" = "-workbench.action.toggleSidebarVisibility";
}
{
"key" = "ctrl+w";
"command" = "-workbench.action.closeActiveEditor";
}
];
}; };
}; };
} }

View file

@ -76,6 +76,7 @@
)) ))
p7zip p7zip
qbittorrent qbittorrent
nil
android-tools android-tools
frida-tools frida-tools
mitmproxy mitmproxy

View file

@ -11,4 +11,13 @@ 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,6 +16,7 @@ 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 = (