mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-21 17:20:47 +03:00
contrib: use Alejandra as formatter
This commit is contained in:
parent
bf537f5b72
commit
99e0963743
5 changed files with 38 additions and 19 deletions
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
|
@ -4,20 +4,22 @@ on:
|
||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
tests-linux:
|
tests-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v15
|
- uses: cachix/install-nix-action@v18
|
||||||
with:
|
with:
|
||||||
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
||||||
- run: nix build
|
- run: nix build
|
||||||
|
- run: nix fmt . -- --check
|
||||||
- run: nix flake check
|
- run: nix flake check
|
||||||
tests-darwin:
|
tests-darwin:
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v3
|
||||||
- uses: cachix/install-nix-action@v15
|
- uses: cachix/install-nix-action@v18
|
||||||
with:
|
with:
|
||||||
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm"
|
||||||
- run: nix build
|
- run: nix build
|
||||||
|
- run: nix fmt . -- --check
|
||||||
- run: nix flake check
|
- run: nix flake check
|
||||||
|
|
14
README.md
14
README.md
|
@ -25,6 +25,7 @@
|
||||||
* [agenix CLI reference](#agenix-cli-reference)
|
* [agenix CLI reference](#agenix-cli-reference)
|
||||||
* [Community and Support](#community-and-support)
|
* [Community and Support](#community-and-support)
|
||||||
* [Threat model/Warnings](#threat-modelwarnings)
|
* [Threat model/Warnings](#threat-modelwarnings)
|
||||||
|
* [Contributing](#contributing)
|
||||||
* [Acknowledgements](#acknowledgements)
|
* [Acknowledgements](#acknowledgements)
|
||||||
|
|
||||||
## Problem and solution
|
## 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
|
[sops](https://github.com/Mic92/sops-nix) have, however this was left
|
||||||
out for simplicity in `age`.
|
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
|
## 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.
|
This project is based off of [sops-nix](https://github.com/Mic92/sops-nix) created Mic92. Thank you to Mic92 for inspiration and advice.
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{pkgs ? import <nixpkgs> {}}: {
|
||||||
{
|
agenix = pkgs.callPackage ./pkgs/agenix.nix {};
|
||||||
agenix = pkgs.callPackage ./pkgs/agenix.nix {};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
let
|
let
|
||||||
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0idNvgGiucWgup/mP78zyC23uFjYq0evcWdjGQUaBH";
|
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0idNvgGiucWgup/mP78zyC23uFjYq0evcWdjGQUaBH";
|
||||||
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
|
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
|
||||||
in
|
in {
|
||||||
{
|
"secret1.age".publicKeys = [user1 system1];
|
||||||
"secret1.age".publicKeys = [ user1 system1 ];
|
"secret2.age".publicKeys = [user1];
|
||||||
"secret2.age".publicKeys = [ user1 ];
|
"passwordfile-user1.age".publicKeys = [user1 system1];
|
||||||
"passwordfile-user1.age".publicKeys = [ user1 system1 ];
|
|
||||||
}
|
}
|
||||||
|
|
17
flake.nix
17
flake.nix
|
@ -14,18 +14,23 @@
|
||||||
|
|
||||||
overlays.default = import ./overlay.nix;
|
overlays.default = import ./overlay.nix;
|
||||||
|
|
||||||
packages.aarch64-linux.agenix = agenix "aarch64-linux";
|
formatter.x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.alejandra;
|
||||||
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;
|
|
||||||
|
|
||||||
packages.x86_64-darwin.agenix = agenix "x86_64-darwin";
|
packages.x86_64-darwin.agenix = agenix "x86_64-darwin";
|
||||||
packages.x86_64-darwin.default = self.packages.x86_64-darwin.agenix;
|
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.agenix = agenix "aarch64-darwin";
|
||||||
packages.aarch64-darwin.default = self.packages.aarch64-darwin.agenix;
|
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.agenix = agenix "x86_64-linux";
|
||||||
packages.x86_64-linux.default = self.packages.x86_64-linux.agenix;
|
packages.x86_64-linux.default = self.packages.x86_64-linux.agenix;
|
||||||
checks.x86_64-linux.integration = import ./test/integration.nix {
|
checks.x86_64-linux.integration = import ./test/integration.nix {
|
||||||
|
|
Loading…
Reference in a new issue