mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-01-09 07:07:22 +08:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
5d07ee4901
3 changed files with 36 additions and 1 deletions
31
.github/workflows/test-flakes.yml
vendored
Normal file
31
.github/workflows/test-flakes.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
name: "Flake test"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '51 2 * * *'
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest, macos-latest ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
# Nix Flakes doesn't work on shallow clones
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: cachix/install-nix-action@v12
|
||||||
|
with:
|
||||||
|
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
system-features = nixos-test benchmark big-parallel kvm
|
||||||
|
- name: Setup cachix
|
||||||
|
uses: cachix/cachix-action@v8
|
||||||
|
with:
|
||||||
|
name: mic92
|
||||||
|
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||||
|
- name: List flake structure
|
||||||
|
run: nix flake show
|
||||||
|
- name: Run unit tests (flake)
|
||||||
|
run: nix build --no-link .#unit-tests -L
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
in {
|
in {
|
||||||
nixosModules.sops = import ./modules/sops;
|
nixosModules.sops = import ./modules/sops;
|
||||||
packages = forAllSystems (system: nixpkgs.legacyPackages.${system}.callPackage ./default.nix {});
|
packages = forAllSystems (system: import ./default.nix {
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
});
|
||||||
defaultPackage = forAllSystems (system: self.packages.${system}.sops-init-gpg-key);
|
defaultPackage = forAllSystems (system: self.packages.${system}.sops-init-gpg-key);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
'';
|
'';
|
||||||
} {
|
} {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
inherit (pkgs) system;
|
||||||
};
|
};
|
||||||
|
|
||||||
pgp-keys = makeTest {
|
pgp-keys = makeTest {
|
||||||
|
|
@ -73,5 +74,6 @@
|
||||||
'';
|
'';
|
||||||
} {
|
} {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
inherit (pkgs) system;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue