contrib: use Alejandra as formatter

This commit is contained in:
Ryan Mulligan 2023-01-29 08:27:20 -08:00
parent bf537f5b72
commit 99e0963743
5 changed files with 38 additions and 19 deletions

View file

@ -4,20 +4,22 @@ on:
push:
jobs:
tests-linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v15
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
- run: nix build
- run: nix fmt . -- --check
- run: nix flake check
tests-darwin:
runs-on: macos-11
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v15
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
- run: nix build
- run: nix fmt . -- --check
- run: nix flake check

View file

@ -25,6 +25,7 @@
* [agenix CLI reference](#agenix-cli-reference)
* [Community and Support](#community-and-support)
* [Threat model/Warnings](#threat-modelwarnings)
* [Contributing](#contributing)
* [Acknowledgements](#acknowledgements)
## Problem and solution
@ -536,6 +537,19 @@ authentication code (MAC) like other implementations like GPG or
[sops](https://github.com/Mic92/sops-nix) have, however this was left
out for simplicity in `age`.
## Contributing
* The main branch is protected against direct pushes
* All changes must go through GitHub PR review and get at least one approval
* PR titles and commit messages should be prefixed with at least one of these categories:
* contrib - things that make the project development better
* doc - documentation
* feature - new features
* fix - bug fixes
* Please update or make integration tests for new features
* Use `nix fmt` to format nix code
## Acknowledgements
This project is based off of [sops-nix](https://github.com/Mic92/sops-nix) created Mic92. Thank you to Mic92 for inspiration and advice.

View file

@ -1,4 +1,3 @@
{ pkgs ? import <nixpkgs> {} }:
{
{pkgs ? import <nixpkgs> {}}: {
agenix = pkgs.callPackage ./pkgs/agenix.nix {};
}

View file

@ -1,8 +1,7 @@
let
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0idNvgGiucWgup/mP78zyC23uFjYq0evcWdjGQUaBH";
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
in
{
in {
"secret1.age".publicKeys = [user1 system1];
"secret2.age".publicKeys = [user1];
"passwordfile-user1.age".publicKeys = [user1 system1];

View file

@ -14,18 +14,23 @@
overlays.default = import ./overlay.nix;
packages.aarch64-linux.agenix = agenix "aarch64-linux";
packages.aarch64-linux.default = self.packages.aarch64-linux.agenix;
packages.i686-linux.agenix = agenix "i686-linux";
packages.i686-linux.default = self.packages.i686-linux.agenix;
formatter.x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.alejandra;
packages.x86_64-darwin.agenix = agenix "x86_64-darwin";
packages.x86_64-darwin.default = self.packages.x86_64-darwin.agenix;
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
packages.aarch64-darwin.agenix = agenix "aarch64-darwin";
packages.aarch64-darwin.default = self.packages.aarch64-darwin.agenix;
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
packages.aarch64-linux.agenix = agenix "aarch64-linux";
packages.aarch64-linux.default = self.packages.aarch64-linux.agenix;
formatter.i686-linux = nixpkgs.legacyPackages.i686-linux.alejandra;
packages.i686-linux.agenix = agenix "i686-linux";
packages.i686-linux.default = self.packages.i686-linux.agenix;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
packages.x86_64-linux.agenix = agenix "x86_64-linux";
packages.x86_64-linux.default = self.packages.x86_64-linux.agenix;
checks.x86_64-linux.integration = import ./test/integration.nix {