-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (56 loc) · 1.93 KB
/
flake.nix
File metadata and controls
62 lines (56 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
description = "A simple env for awesome-niri";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
systems.url = "github:nix-systems/default";
awesome-lint = {
url = "github:tomodachi94/awesome-lint.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
};
outputs =
{ nixpkgs, ... }@inputs:
let
inherit (nixpkgs) lib legacyPackages;
systems = import inputs.systems;
forAllSystems = f: (lib.genAttrs systems) (system: f legacyPackages.${system});
in
{
formatter = forAllSystems (
pkgs:
pkgs.treefmt.withConfig {
runtimeInputs = with pkgs; [
nixfmt
prettier
];
settings.formatter = {
nixfmt = {
command = "nixfmt";
includes = [ "*.nix" ];
options = [ "--indent=4" ];
};
prettier = {
command = "prettier";
includes = [ "*.md" ];
options = [
"--tab-width"
"4"
];
};
};
}
);
packages = forAllSystems (pkgs: {
lint = inputs.awesome-lint.packages.${pkgs.stdenv.hostPlatform.system}.awesome-lint;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
shellHook = ''
echo "Pulling latest changes..."
git pull
'';
};
});
};
}