image: nixos/unstable
packages:
- nixos.cachix
sources:
- https://git.sr.ht/~averagechris/dotfiles
secrets:
- 731f7e55-4497-4228-8fa4-1657da7d3625
- d9a1d776-3f07-477d-9ee0-173606550bc0
tasks:
- setup-nix: |
mkdir -p ~/.config/nix/
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
echo "max-jobs = auto" >> ~/.config/nix/nix.conf
set +x
echo "access-tokens = github.com=$(cat ~/.ci_secrets/github_token)" >> ~/.config/nix/nix.conf
set -x
- setup-cachix: |
cachix authtoken --stdin < ~/.ci_secrets/cachix_token
cachix use nix-community
cachix use nixpkgs-wayland
cachix use averagechris-dotfiles
- pre-commit-checks: |
cd ~/dotfiles
nix flake check
- nix-build-nixos-configurations: |
cd ~/dotfiles
nix build .#nixosConfigurations.thelio-nixos.config.system.build.toplevel
nix build .#nixosConfigurations.xps-nixos.config.system.build.toplevel
nix build .#nixosConfigurations.tootsie.config.system.build.toplevel
nix build .#nixosConfigurations.taz.config.system.build.toplevel
nix build .
- push-cachix: |
nix path-info --all | cachix push averagechris-dotfiles