File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
home-manager/personalities/cli Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 5656 nixos-facter-modules . url = "github:nix-community/nixos-facter-modules" ;
5757 nix-reshade . url = "github:LovingMelody/nix-reshade" ;
5858 nix-reshade . inputs . nixpkgs . follows = "nixpkgs" ;
59+ attic . url = "github:zhaofengli/attic" ;
5960 } ;
6061
6162 outputs = {
Original file line number Diff line number Diff line change 1+ { inputs , pkgs , ...} : {
2+ home . packages = [ inputs . attic . packages . ${ pkgs . system } . attic-client ] ;
3+ programs . fish . functions = {
4+ nix-build-push = {
5+ description = "Build a nix package and push its full closure (including build deps) to an attic cache" ;
6+ body = ''
7+ if test (count $argv) -lt 2
8+ echo "Usage: nix-build-push <package> <cache>"
9+ echo "Example: nix-build-push .#cwctl attic-prod:coreweave"
10+ return 1
11+ end
12+ set -l package $argv[1]
13+ set -l cache $argv[2]
14+
15+ echo "Building $package..."
16+ nix build -L $package; or return 1
17+
18+ echo "Pushing build closure to $cache..."
19+ set -l drv (nix path-info --derivation $package)
20+ nix-store -qR --include-outputs "$drv" \
21+ | grep -v '\.drv$' \
22+ | while read -l p; test -e "$p" && echo "$p"; end \
23+ | xargs attic push $cache
24+ '' ;
25+ } ;
26+ } ;
27+ }
Original file line number Diff line number Diff line change 1313 ./direnv.nix
1414 ./nh.nix
1515 ./crush.nix
16+ ./attic.nix
1617 ] ;
1718 home . packages = with pkgs ;
1819 [
You can’t perform that action at this time.
0 commit comments