55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
description = "A nixvim configuration";
|
|
|
|
inputs = {
|
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
};
|
|
|
|
outputs = {
|
|
emacs-overlay,
|
|
flake-utils,
|
|
nixpkgs,
|
|
treefmt-nix,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = [emacs-overlay.overlay];
|
|
};
|
|
|
|
emacs = import ./config {inherit pkgs;};
|
|
in {
|
|
formatter = treefmt-nix.lib.mkWrapper pkgs {
|
|
projectRootFile = "flake.nix";
|
|
programs = {
|
|
alejandra.enable = true;
|
|
deadnix.enable = true;
|
|
stylua.enable = true;
|
|
};
|
|
};
|
|
|
|
packages = {
|
|
inherit emacs;
|
|
default = emacs;
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
emacs
|
|
alejandra
|
|
nvfetcher
|
|
stylua
|
|
(writeScriptBin "up" ''
|
|
nvfetcher
|
|
nix flake update
|
|
'')
|
|
];
|
|
};
|
|
});
|
|
}
|