From bc97c0f18496d4a97725b1c5556858fed6ae9908 Mon Sep 17 00:00:00 2001 From: Dylan Frankland Date: Fri, 25 Jun 2021 00:44:54 +0000 Subject: [PATCH] add support for flakes --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a804412 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1624561540, + "narHash": "sha256-izJ2PYZMGMsSkg+e7c9A1x3t/yOLT+qzUM6WQsc2tqo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c6a049a3d32293b24c0f894a840872cf67fd7c11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4c84ed7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "My personal NUR repository"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + outputs = { self, nixpkgs }: + let + systems = [ + "x86_64-linux" + "i686-linux" + "x86_64-darwin" + "aarch64-linux" + "armv6l-linux" + "armv7l-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + in + { + packages = forAllSystems (system: import ./default.nix { + pkgs = import nixpkgs { inherit system; }; + }); + }; +}