diff --git a/ci.nix b/ci.nix new file mode 100644 index 0000000..5aab5a2 --- /dev/null +++ b/ci.nix @@ -0,0 +1 @@ +(import ./flake-compat.nix).defaultNix.ciNix diff --git a/flake-compat.nix b/flake-compat.nix new file mode 100644 index 0000000..dab420b --- /dev/null +++ b/flake-compat.nix @@ -0,0 +1,9 @@ +let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + inherit (lock.nodes.flake-compat.locked) owner repo rev narHash; + flake-compat = builtins.fetchTarball { + url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; + sha256 = narHash; + }; +in +import flake-compat { src = ./.; } diff --git a/flake.lock b/flake.lock index a3946d9..09c9f95 100644 --- a/flake.lock +++ b/flake.lock @@ -136,6 +136,21 @@ "type": "github" } }, + "flake-compat-ci": { + "locked": { + "lastModified": 1646664117, + "narHash": "sha256-AX2VewPcS9eRsoirVHfnk07MHAOH6CTDiD10XtRaZbk=", + "owner": "hercules-ci", + "repo": "flake-compat-ci", + "rev": "e588637b2eec4261ed0d36335c83a117f2744dea", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-compat-ci", + "type": "github" + } + }, "flake-compat_2": { "flake": false, "locked": { @@ -153,6 +168,22 @@ } }, "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1648199409, + "narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1641205782, @@ -253,17 +284,6 @@ "type": "github" } }, - "nixos": { - "locked": { - "narHash": "sha256-obk4aD7DmB0yyKsw1tL8Pd1WQLFp/arZETIIMKTVx+E=", - "path": "/nix/store/r4y8hrjiix7zj2m2jgn2bjiqj2hd4rd4-source", - "type": "path" - }, - "original": { - "id": "nixos", - "type": "indirect" - } - }, "nixos-generators": { "inputs": { "nixlib": "nixlib", @@ -319,7 +339,7 @@ "cachix": [ "unstable" ], - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "nixpkgs": [ "unstable" ] @@ -409,8 +429,9 @@ ], "digga": "digga", "emacs-overlay": "emacs-overlay", + "flake-compat": "flake-compat_3", + "flake-compat-ci": "flake-compat-ci", "home": "home", - "nixos": "nixos", "nixos-hardware": "nixos-hardware", "nixpkgs-wayland": "nixpkgs-wayland", "nur": "nur", diff --git a/flake.nix b/flake.nix index 98ee9a7..ce727f9 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,12 @@ digga.inputs.nixlib.follows = "unstable"; digga.inputs.home-manager.follows = "unstable"; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + flake-compat-ci.url = github:hercules-ci/flake-compat-ci; + home.url = "github:nix-community/home-manager/release-21.11"; home.inputs.nixpkgs.follows = "unstable"; @@ -39,7 +45,8 @@ outputs = { self , digga - , nixos + , flake-compat-ci + , unstable , home , nixos-hardware , darwin @@ -81,7 +88,7 @@ }; }; - lib = import ./lib { lib = digga.lib // nixos.lib; }; + lib = import ./lib { lib = digga.lib // unstable.lib; }; sharedOverlays = [ ( @@ -177,5 +184,12 @@ inherit emacs-overlay; unstablePkgsInput = inputs.unstablePkgs; }; }; + + ciNix = flake-compat-ci.lib.recurseIntoFlakeWith { + flake = self; + systems = [ "x86_64-linux" ]; + }; + + }; }