mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
chore: init
This commit is contained in:
commit
1b2c1ea359
891 changed files with 37053 additions and 0 deletions
1
templates/haskell/.envrc
Executable file
1
templates/haskell/.envrc
Executable file
|
|
@ -0,0 +1 @@
|
|||
use flake
|
||||
4
templates/haskell/.gitignore
vendored
Executable file
4
templates/haskell/.gitignore
vendored
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
.direnv
|
||||
.pre-commit-config.yaml
|
||||
.vscode
|
||||
dist-newstyle
|
||||
57
templates/haskell/flake.nix
Executable file
57
templates/haskell/flake.nix
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
description = "Haskell Environment";
|
||||
|
||||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ inputs.treefmt-nix.flakeModule ];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
hp = pkgs.haskellPackages;
|
||||
project = hp.callCabal2nix "project" ./. { };
|
||||
in
|
||||
{
|
||||
devShells.default = hp.shellFor {
|
||||
nativeBuildInputs = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
nil
|
||||
stylish-haskell
|
||||
ghc
|
||||
;
|
||||
inherit (hp)
|
||||
cabal-install
|
||||
cabal-gild
|
||||
haskell-language-server
|
||||
;
|
||||
};
|
||||
packages = _: [ project ];
|
||||
};
|
||||
|
||||
packages.default = project;
|
||||
|
||||
treefmt = {
|
||||
programs = {
|
||||
cabal-fmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
hlint.enable = true;
|
||||
nixfmt.enable = true;
|
||||
ormolu.enable = true;
|
||||
statix.enable = true;
|
||||
typstyle.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
};
|
||||
projectRootFile = "flake.nix";
|
||||
};
|
||||
};
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
12
templates/haskell/fourmolu.yaml
Executable file
12
templates/haskell/fourmolu.yaml
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
indentation: 2
|
||||
comma-style: trailing
|
||||
import-export-style: diff-friendly
|
||||
respectful: false
|
||||
column-limit: 80
|
||||
function-arrows: trailing
|
||||
haddock-style: single-line
|
||||
let-style: inline
|
||||
in-style: right-align
|
||||
unicode: never
|
||||
pragma-style: leading
|
||||
newlines-between-decls: 1
|
||||
2
templates/haskell/justfile
Executable file
2
templates/haskell/justfile
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
cabal:
|
||||
cabal clean ; cabal run
|
||||
10
templates/haskell/project.cabal
Executable file
10
templates/haskell/project.cabal
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
cabal-version: 3.0
|
||||
name: project
|
||||
version: 0.1.0.0
|
||||
|
||||
executable main
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
, base
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: src
|
||||
4
templates/haskell/src/Main.hs
Executable file
4
templates/haskell/src/Main.hs
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
module Main where
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, World!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue