From c8e0dd83f8dc72ef7497fa87c1c3c0f7a108053b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 15 May 2022 08:09:09 +0200 Subject: [PATCH] also build ci for 21.11 --- flake.lock | 25 +++++++++++++++++++++---- flake.nix | 15 ++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 3f1e19c..c3762e6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1652252629, - "narHash": "sha256-SvT64apetqc8P5nYp1/fOZvUmHUPdPFUZbhSpKy+1aI=", + "lastModified": 1652541622, + "narHash": "sha256-Z9BuUCS0IocoRahFvFDJNU5Q+xM5/lS8Ng4JJFH3+UU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2fc6856824cb87742177eefc8dd534bdb6c3439", + "rev": "f7a22851667ac89ac1863ede0d8c386fc6eb12a0", "type": "github" }, "original": { @@ -16,9 +16,26 @@ "type": "github" } }, + "nixpkgs-21_11": { + "locked": { + "lastModified": 1652559422, + "narHash": "sha256-jPVTNImBTUIFdtur+d4IVot6eXmsvtOcBm0TzxmhWPk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8b3398bc7587ebb79f93dfeea1b8c574d3c6dba1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-21_11": "nixpkgs-21_11" } } }, diff --git a/flake.nix b/flake.nix index a1c819c..fb63bcf 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,13 @@ { description = "Integrates sops into nixos"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.nixpkgs-21_11.url = "github:NixOS/nixpkgs/release-21.11"; nixConfig.extra-substituters = ["https://cache.garnix.io"]; nixConfig.extra-trusted-public-keys = ["cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="]; outputs = { self, nixpkgs, + nixpkgs-21_11 }: let systems = [ "x86_64-linux" @@ -17,6 +19,7 @@ "armv7l-linux" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + suffix-21_11 = attrs: nixpkgs.lib.mapAttrs' (name: value: nixpkgs.lib.nameValuePair (name + "-21_11") value) attrs; in { overlay = final: prev: let localPkgs = import ./default.nix {pkgs = final;}; @@ -31,9 +34,15 @@ import ./default.nix { pkgs = import nixpkgs {inherit system;}; }); - checks = - nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] - (system: self.packages.${system}.sops-install-secrets.tests); + checks = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] + (system: let + tests = self.packages.${system}.sops-install-secrets.tests; + packages-21_11 = import ./default.nix { + pkgs = import nixpkgs-21_11 {inherit system;}; + }; + tests-21_11 = packages-21_11.sops-install-secrets.tests; + in tests // (suffix-21_11 tests-21_11) // (suffix-21_11 packages-21_11)); + defaultPackage = forAllSystems (system: self.packages.${system}.sops-init-gpg-key); devShell = forAllSystems ( system: