72 lines
1.4 KiB
Nix
72 lines
1.4 KiB
Nix
|
{
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
|
||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||
|
|
||
|
treefmt-nix = {
|
||
|
url = "github:numtide/treefmt-nix";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
|
||
|
git-hooks = {
|
||
|
url = "github:cachix/git-hooks.nix";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs =
|
||
|
{ ... }@inputs:
|
||
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||
|
systems = [ "x86_64-linux" ];
|
||
|
|
||
|
imports = [
|
||
|
inputs.git-hooks.flakeModule
|
||
|
inputs.treefmt-nix.flakeModule
|
||
|
|
||
|
./nix/zls
|
||
|
];
|
||
|
|
||
|
perSystem =
|
||
|
{
|
||
|
pkgs,
|
||
|
lib,
|
||
|
config,
|
||
|
...
|
||
|
}:
|
||
|
{
|
||
|
treefmt = {
|
||
|
projectRootFile = "flake.lock";
|
||
|
|
||
|
programs = {
|
||
|
deadnix.enable = true;
|
||
|
nixfmt = {
|
||
|
enable = true;
|
||
|
package = pkgs.nixfmt-rfc-style;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
devShells.default =
|
||
|
with pkgs;
|
||
|
mkShell {
|
||
|
name = "zig-app";
|
||
|
|
||
|
packages = [
|
||
|
zig_0_12
|
||
|
config.packages.zls
|
||
|
|
||
|
wayland
|
||
|
wayland-protocols
|
||
|
wlroots_0_17
|
||
|
wlr-protocols
|
||
|
|
||
|
swayidle
|
||
|
|
||
|
pkg-config
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|