1
0
Fork 0
generated from me/nix-flake-template
nix-flake-haskell-template/flake.nix
2025-09-01 00:17:24 -05:00

89 lines
2.8 KiB
Nix

# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{
description = "Nix Flake Haskell template";
inputs = {
flake-lib = {
url = "git+https://git.sudoer777.dev/me/nix-flake-base.git?ref=main";
flake = true;
inputs = {
devshell.follows = "devshell";
flake-parts.follows = "flake-parts";
git-hooks-nix.follows = "git-hooks-nix";
lix-module.follows = "lix-module";
nixgl.follows = "nixgl";
nixpkgs.follows = "nixpkgs";
treefmt-nix.follows = "treefmt-nix";
};
};
devshell.url = "github:numtide/devshell";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
git-hooks-nix.url = "github:cachix/git-hooks.nix";
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ withSystem, ... }:
{
systems = [ "aarch64-linux" ];
imports = [ inputs.flake-lib.flakeModule ];
perSystem =
{ pkgs, system, ... }:
{
editors.helix.enable = true;
languages = {
en-us = {
enable = true;
dictionary = [
"Haskell"
"Reece"
];
vale."{**/*.md,**/*.txt}".packages = {
RedHat.enable = true;
proselint.enable = true;
write-good.enable = true;
alex.enable = true;
};
};
haskell = {
enable = true;
package = pkgs.haskellPackages.ghcWithPackages (pkgs: [ pkgs.cabal-install ]);
};
markdown.enable = true;
nix.enable = true;
plain-text.enable = true;
toml.enable = true;
yaml.enable = true;
};
devshells.default = {
packages = [ pkgs.forgejo-cli ];
# reuse annotate -c "Ethan Reece <contact@ethanreece.com>" -l MIT -y 2025
devshell = {
motd = ''
{202} Nix Flake Haskell template{reset}
$(type -p menu &>/dev/null && menu)
'';
name = "Template";
};
};
packages.default = pkgs.haskellPackages.callCabal2nix "nix-flake-haskell-template" ./. { };
};
}
);
}