oizys/.github/actions/nix/action.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-18 12:05:43 -06:00
# adapted from https://github.com/azuwis/actions/tree/7236424fa0fdc8d82df7cd4bff831a9d2338ce9e/nix
name: Install Nix and setup cache
inputs:
nix_conf:
description: Extra nix.conf config
default: |
accept-flake-config = true
build-dir = /nix/var
experimental-features = pipe-operator
keep-derivations = true
keep-outputs = true
clean:
description: Clean up disk space
default: false
btrfs:
description: Use BTRFS to setup RAID0
default: false
2024-11-18 12:10:46 -06:00
attic_token:
description: token to access attic cache
2024-12-27 15:39:26 -06:00
2024-11-18 12:05:43 -06:00
runs:
using: composite
steps:
- shell: bash
env:
CLEAN: ${{ inputs.clean }}
BTRFS: ${{ inputs.btrfs }}
run: exec ${{ github.action_path }}/prepare.sh
- uses: DeterminateSystems/nix-installer-action@v15
with:
source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux
extra-conf: ${{ inputs.nix_conf }}
- name: Install and login to attic cache
2024-11-18 12:13:04 -06:00
shell: bash
2024-11-18 12:05:43 -06:00
run: |
nix profile install "nixpkgs#attic-client"
2024-11-18 12:10:46 -06:00
attic login oizys https://attic.dayl.in "${{ inputs.attic_token}}"