mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 01:55:13 -05:00
feat: init
This commit is contained in:
commit
96c6f790fc
804 changed files with 33411 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
|
10
templates/haskell/example.cabal
Executable file
10
templates/haskell/example.cabal
Executable file
|
@ -0,0 +1,10 @@
|
|||
cabal-version: 3.0
|
||||
name: example
|
||||
version: 0.1.0.0
|
||||
|
||||
executable main
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
, base
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: src
|
21
templates/haskell/flake.nix
Executable file
21
templates/haskell/flake.nix
Executable file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs = {
|
||||
haskell-flake.url = "github:srid/haskell-flake";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
|
||||
};
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
inputs.haskell-flake.flakeModule
|
||||
inputs.pre-commit-hooks-nix.flakeModule
|
||||
./parts
|
||||
];
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
};
|
||||
}
|
0
templates/haskell/justfile
Executable file
0
templates/haskell/justfile
Executable file
45
templates/haskell/parts/config/devshells.nix
Executable file
45
templates/haskell/parts/config/devshells.nix
Executable file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
haskellProjects.default = {
|
||||
devShell = {
|
||||
enable = true;
|
||||
|
||||
tools = hp: {
|
||||
inherit (hp)
|
||||
cabal-fmt
|
||||
haskell-language-server
|
||||
;
|
||||
|
||||
inherit (pkgs)
|
||||
dhall
|
||||
dhall-json
|
||||
dhall-lsp-server
|
||||
helix-gpt
|
||||
age
|
||||
just
|
||||
nil
|
||||
nixd
|
||||
sops
|
||||
ssh-to-age
|
||||
nixfmt-rfc-style
|
||||
libz
|
||||
ngrep
|
||||
stripe-cli
|
||||
vscode-langservers-extracted
|
||||
zlib
|
||||
;
|
||||
|
||||
inherit (pkgs.haskellPackages)
|
||||
nixfmt
|
||||
;
|
||||
};
|
||||
|
||||
hlsCheck.enable = true;
|
||||
mkShellArgs.shellHook = "${config.pre-commit.installationScript}";
|
||||
};
|
||||
};
|
||||
}
|
1
templates/haskell/parts/config/packages.nix
Executable file
1
templates/haskell/parts/config/packages.nix
Executable file
|
@ -0,0 +1 @@
|
|||
{self, ...}: {packages.default = self.packages.example;}
|
7
templates/haskell/parts/config/pre-commit.nix
Executable file
7
templates/haskell/parts/config/pre-commit.nix
Executable file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
pre-commit.settings.hooks = {
|
||||
nixfmt.enable = true;
|
||||
commitizen.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
}
|
20
templates/haskell/parts/default.nix
Executable file
20
templates/haskell/parts/default.nix
Executable file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
perSystem = {
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
self',
|
||||
...
|
||||
}: let
|
||||
configPath = ./config;
|
||||
|
||||
devshellImports = let
|
||||
files = builtins.attrNames (builtins.readDir configPath);
|
||||
in
|
||||
map
|
||||
(name: configPath + "/${name}")
|
||||
(builtins.filter (name: builtins.match ".*\\.nix$" name != null) files);
|
||||
in {
|
||||
imports = devshellImports;
|
||||
};
|
||||
}
|
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