flake: add flake-compat

This commit is contained in:
raf 2023-11-03 12:40:30 +03:00
parent c5a6662b2d
commit 586140ce47
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 28 additions and 4 deletions

19
default.nix Normal file
View file

@ -0,0 +1,19 @@
(
import
(
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/edolstra/flake-compat/archive/${
lock.nodes.${nodeName}.locked.rev
}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
)
{src = ./.;}
)
.defaultNix

View file

@ -1,9 +1,14 @@
{ {
description = "Description for the project"; description = "A personal package overlay";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
}; };
outputs = inputs @ {flake-parts, ...}: outputs = inputs @ {flake-parts, ...}:
@ -11,8 +16,8 @@
systems = ["x86_64-linux" "aarch64-linux"]; systems = ["x86_64-linux" "aarch64-linux"];
imports = [./pkgs]; imports = [./pkgs];
perSystem = _: {}; perSystem = {pkgs, ...}: {
formatter = pkgs.alejandra;
flake = {}; };
}; };
} }