Skip to content

This Program/Script build an flake and pushes all its dependencies to attic

License

Notifications You must be signed in to change notification settings

Svenum/attic-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

attic-builder

This Program/Script build an flake and pushes all its dependencies to attic

Usage

Create .github/workflows/build.yml in you repo with the following contents:

name: "Build"
on:
  push:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: cachix/install-nix-action@v27
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - uses: Svenum/attic-builder@v1
        with:
          build_systems: true
          build_packages: true
          attic_url: https://attic.example.tld/
          attic_cache: CACHENAME
          attic_token: ${{ secrets.ATTIC_TOKEN }}

Setup attic

Setting up Attic is here described: //docs.attic.rs/tutorial.html

Generate a token

atticadm -f /path/to/server.toml --sub 'github' --push 'CACHENAME' --validity '1y'

Known Issues

  • On large Flakes the build sometimes is failing 'cause of to little diskspace

Future Ideas

  • Creating a Docker Container that automatically fetch one or more Repos and build it periotically local
  • updating flake with nix flake update before run.

About

This Program/Script build an flake and pushes all its dependencies to attic

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages