2024-08-12 23:29:44 -04:00
|
|
|
{
|
|
|
|
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];
|
|
|
|
};
|
2024-08-15 00:18:15 -04:00
|
|
|
|
|
|
|
emacs = import ./config {inherit pkgs;};
|
|
|
|
in {
|
2024-08-12 23:29:44 -04:00
|
|
|
formatter = treefmt-nix.lib.mkWrapper pkgs {
|
|
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs = {
|
|
|
|
alejandra.enable = true;
|
|
|
|
deadnix.enable = true;
|
|
|
|
stylua.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-15 00:18:15 -04:00
|
|
|
packages = {
|
|
|
|
inherit emacs;
|
|
|
|
default = emacs;
|
|
|
|
};
|
2024-08-12 23:29:44 -04:00
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2024-08-15 00:18:15 -04:00
|
|
|
emacs
|
2024-08-12 23:29:44 -04:00
|
|
|
alejandra
|
|
|
|
nvfetcher
|
|
|
|
stylua
|
|
|
|
(writeScriptBin "up" ''
|
|
|
|
nvfetcher
|
|
|
|
nix flake update
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|