This commit is contained in:
Sridhar Ratnakumar 2026-02-14 19:33:12 -05:00
parent 4ec757e7b5
commit 1bf5049ebb
10 changed files with 1 additions and 194 deletions

92
flake.lock generated
View file

@ -378,24 +378,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fourmolu-nix": {
"locked": {
"lastModified": 1707266073,
@ -987,20 +969,6 @@
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"revCount": 555097,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.555097%2Brev-91050ea1e57e50388fa87a3302ba12d188ef723a/018c3450-2363-7c34-883b-4ba70b1eb7ae/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1765803225,
"narHash": "sha256-xwaZV/UgJ04+ixbZZfoDE8IsOWjtvQZICh9aamzPnrg=",
@ -1038,26 +1006,6 @@
"type": "github"
}
},
"nuenv": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1731004226,
"narHash": "sha256-vI8qzbfU+tTXTTHaFgNQbZcT3rLwHG+XURYkSv+j3Io=",
"owner": "hallettj",
"repo": "nuenv",
"rev": "2f3bf85765988e4c622694efa20ca966e9a81fe9",
"type": "github"
},
"original": {
"owner": "hallettj",
"ref": "writeShellApplication",
"repo": "nuenv",
"type": "github"
}
},
"process-compose-flake": {
"locked": {
"lastModified": 1764915241,
@ -1110,32 +1058,9 @@
"nixos-vscode-server": "nixos-vscode-server",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"nuenv": "nuenv",
"vira": "vira"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nuenv",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701397143,
"narHash": "sha256-nYUJxZXwCWWVBYZXPgRxGDuQcZRhKTtD/Jp5Jl+9EWU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "bb71557c93cad40f5921b2342d7fd69f9e6497ab",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"servant-event-stream": {
"flake": false,
"locked": {
@ -1212,21 +1137,6 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tabler-icons-hs": {
"flake": false,
"locked": {
@ -1311,7 +1221,7 @@
"nix-serve-ng": "nix-serve-ng",
"nix-systems": "nix-systems",
"nixos-unified": "nixos-unified_3",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_5",
"process-compose-flake": "process-compose-flake",
"record-hasfield": "record-hasfield",
"servant-event-stream": "servant-event-stream",

View file

@ -23,8 +23,6 @@
home-manager.follows = "home-manager";
nixpkgs.follows = "nixpkgs";
};
nuenv.url = "github:hallettj/nuenv/writeShellApplication";
# Software inputs
github-nix-ci.url = "github:juspay/github-nix-ci";
nixos-vscode-server.flake = false;

View file

@ -1,3 +0,0 @@
$env.config = {
edit_mode: vi
}

View file

@ -1,9 +0,0 @@
{ config, ... }:
{
programs.nushell = {
enable = true;
envFile.source = ./env.nu;
configFile.source = ./config.nu;
shellAliases = config.home.shellAliases;
};
}

View file

@ -1,8 +0,0 @@
$env.PATH = (
$env.PATH
| split row (char esep)
| prepend $"/etc/profiles/per-user/($env.USER)/bin"
| prepend $"/Users/($env.USER)/.nix-profile/bin"
| prepend '/run/current-system/sw/bin/'
| prepend "/nix/var/nix/profiles/default/bin"
)

View file

@ -26,7 +26,6 @@ in
# Useful for Nix development
ci
touchpr
omnix
nixpkgs-fmt
just

View file

@ -3,6 +3,5 @@
imports = [
./cli/zsh.nix
./cli/bash.nix
./cli/nushell
];
}

View file

@ -33,9 +33,6 @@ let
in
packageOverlays // {
# External overlays
nuenv = (inputs.nuenv.overlays.nuenv self super).nuenv;
# Use claude-code from nix-ai-tools instead of nixpkgs
claude-code = (nix-ai-tools self.system).claude-code;
copilot-cli = (nix-ai-tools self.system).copilot-cli;

View file

@ -1,14 +0,0 @@
{ nuenv, curl, jq, ... }:
nuenv.writeShellApplication {
name = "touchpr";
runtimeInputs = [ curl jq ];
meta.description = ''
Force push to a PR so as to trigger GitHub Actions
'';
text = ''
#!/usr/bin/env nu
${builtins.readFile ./touchpr.nu}
'';
}

View file

@ -1,62 +0,0 @@
# cf. https://github.com/DeterminateSystems/update-flake-lock/issues/110
# Force push to a GitHub PR
#
# Useful to trigger GitHub Actions CI
def main [
pr_url: string # GitHub PR URL
] {
let parsed = ($pr_url | parse -r 'https://github\.com/(?P<owner>[\w-]+)/(?P<repo>[\w-]+)/pull/(?P<pr_number>\d+)')
if ($parsed | is-empty) {
error make {msg: "Failed to parse GitHub URL. Please ensure it's in the correct format."}
}
print $"Parsed URL data: ($parsed)"
let owner = $parsed.owner.0
let repo = $parsed.repo.0
let pr_number = $parsed.pr_number.0
print $"Owner: ($owner)"
print $"Repo: ($repo)"
print $"PR Number: ($pr_number)"
# Construct API URL
let api_url = $"https://api.github.com/repos/($owner)/($repo)/pulls/($pr_number)"
print $"Constructed API URL: ($api_url)"
let pr_details = (http get $api_url)
let branch_name = $pr_details.head.ref
let clone_url = $pr_details.head.repo.ssh_url
# Create a temporary directory
let temp_dir = (mktemp -d)
cd $temp_dir
# Clone the repository
git clone $clone_url .
if $env.LAST_EXIT_CODE != 0 {
error make {msg: "Failed to clone repository"}
}
# Checkout the PR branch
git checkout $branch_name
if $env.LAST_EXIT_CODE != 0 {
error make {msg: "Failed to checkout branch"}
}
# Force push to the branch
git commit --amend --no-edit
git push -f origin $branch_name
if $env.LAST_EXIT_CODE != 0 {
error make {msg: "Failed to force push"}
}
print $"Successfully force pushed to ($branch_name)"
# Clean up
cd ..
rm -rf $temp_dir
}