2023-04-23 22:35:23 +02:00
|
|
|
{
|
|
|
|
description = "c8h4.io NixOS configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2023-07-04 15:43:37 +02:00
|
|
|
nixpkgs = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
ref = "refs/heads/nixos-unstable";
|
2023-09-25 14:17:46 +02:00
|
|
|
rev = "3d4e386a08fbb43fc8b2f81cd6e6a02671ec73ca"; # 31-08-2023
|
2023-07-04 15:43:37 +02:00
|
|
|
};
|
2023-04-23 22:35:23 +02:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2023-10-30 17:15:06 +01:00
|
|
|
treefmt-nix = {
|
|
|
|
url = "github:numtide/treefmt-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-04-23 22:35:23 +02:00
|
|
|
};
|
|
|
|
|
2023-10-30 17:15:06 +01:00
|
|
|
outputs = { self, nixpkgs, flake-utils, treefmt-nix, ... }:
|
2023-04-23 22:35:23 +02:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
2023-10-30 17:15:06 +01:00
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
treefmt = treefmt-nix.lib.evalModule pkgs {
|
|
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs = {
|
|
|
|
nixfmt.enable = true;
|
|
|
|
stylua.enable = true;
|
|
|
|
statix.enable = true;
|
|
|
|
deadnix.enable = true;
|
|
|
|
shellcheck.enable = true;
|
|
|
|
};
|
2023-08-08 21:06:33 +02:00
|
|
|
};
|
2023-10-30 17:15:06 +01:00
|
|
|
in {
|
|
|
|
checks.formatting = treefmt.config.build.check self;
|
|
|
|
formatter = treefmt.config.build.wrapper;
|
|
|
|
|
|
|
|
devShells.default =
|
|
|
|
pkgs.mkShell { inputsFrom = [ treefmt.config.build.devShell ]; };
|
2023-08-08 21:06:33 +02:00
|
|
|
});
|
2023-04-23 22:35:23 +02:00
|
|
|
}
|