diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..2cccff2 --- /dev/null +++ b/default.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).defaultNix diff --git a/flake.lock b/flake.lock index 71eab8d..6502f00 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1638122382, @@ -117,6 +133,7 @@ "root": { "inputs": { "cargo2nix": "cargo2nix", + "flake-compat": "flake-compat", "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay_2" diff --git a/flake.nix b/flake.nix index c83dd31..695bd7e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,13 @@ description = "Project for syncing various home-system configuration files."; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; - flake-utils.url = "github:numtide/flake-utils"; cargo2nix.url = "github:cargo2nix/cargo2nix/master"; + flake-compat = { + url = github:edolstra/flake-compat; + flake = false; + }; + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs = { @@ -14,7 +18,7 @@ }; }; - outputs = { self, nixpkgs, flake-utils, cargo2nix, rust-overlay }: + outputs = { self, cargo2nix, flake-compat, flake-utils, nixpkgs, rust-overlay }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs {