mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-15 12:05:12 -05:00
feat: fixed horrible lsp problem
This commit is contained in:
parent
38b0583e7f
commit
c4db6a0617
7 changed files with 122 additions and 103 deletions
|
@ -1 +1 @@
|
|||
/nix/store/a2kn134qqb4whsh5y4bikcryhka2dgl4-pre-commit-config.json
|
||||
/nix/store/si1f73qc72k63h6kqdb5yz230p0vlnm4-pre-commit-config.json
|
108
flake.lock
generated
108
flake.lock
generated
|
@ -1,15 +1,31 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736143030,
|
||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||
"lastModified": 1743550720,
|
||||
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -17,13 +33,34 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks-nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskell-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1736651225,
|
||||
"narHash": "sha256-uLIDMc3DjZuXCKydXLDH6Inb/35qIIGa6acGytYkQCs=",
|
||||
"lastModified": 1743922999,
|
||||
"narHash": "sha256-Wh+Zak8sZUgair4pnZR0mLrLIhhInHS8izj7C1H10B8=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "4b12bdd07b3aee5e4e5768b1b3db3c8b429af446",
|
||||
"rev": "d102e0f8a1773b1a63a616faef670cf5e129f9e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -34,54 +71,77 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1736883708,
|
||||
"narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1744316434,
|
||||
"narHash": "sha256-lzFCg/1C39pyY2hMB2gcuHV79ozpOz/Vu15hdjiFOfI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8",
|
||||
"rev": "d19cf9dfc633816a437204555afeb9e722386b76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1735774519,
|
||||
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
"lastModified": 1743296961,
|
||||
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1720535198,
|
||||
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
|
||||
"lastModified": 1730768919,
|
||||
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
|
||||
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742649964,
|
||||
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
34
flake.nix
34
flake.nix
|
@ -1,30 +1,22 @@
|
|||
{
|
||||
description = "Elm Environment";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
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 @ {
|
||||
flake-parts,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
./parts
|
||||
inputs.haskell-flake.flakeModule
|
||||
inputs.pre-commit-hooks-nix.flakeModule
|
||||
./parts
|
||||
];
|
||||
systems = [system];
|
||||
perSystem = {pkgs, ...}: {
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
_module.args.pkgs-stable = import inputs.nixpkgs-stable {
|
||||
inherit system;
|
||||
};
|
||||
};
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
module Auth exposing (User, onPageLoad, viewLoadingPage)
|
||||
|
||||
import Auth.Action
|
||||
import Dict
|
||||
import Route exposing (Route)
|
||||
import Route.Path
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
type alias User =
|
||||
{}
|
||||
|
||||
|
||||
{-| Called before an auth-only page is loaded.
|
||||
-}
|
||||
onPageLoad : Shared.Model -> Route () -> Auth.Action.Action User
|
||||
onPageLoad shared route =
|
||||
Auth.Action.pushRoute
|
||||
{ path = Route.Path.NotFound_
|
||||
, query = Dict.empty
|
||||
, hash = Nothing
|
||||
}
|
||||
|
||||
|
||||
{-| Renders whenever `Auth.Action.showLoadingPage` is returned from `onPageLoad`.
|
||||
-}
|
||||
viewLoadingPage : Shared.Model -> Route () -> View Never
|
||||
viewLoadingPage shared route =
|
||||
View.fromString "Loading..."
|
|
@ -1,40 +1,32 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
haskellProjects.default = {
|
||||
devShell = {
|
||||
enable = true;
|
||||
|
||||
tools = hp: {
|
||||
inherit
|
||||
(hp)
|
||||
cabal-fmt
|
||||
haskell-language-server
|
||||
;
|
||||
inherit (hp) cabal-fmt haskell-language-server;
|
||||
|
||||
inherit
|
||||
(pkgs)
|
||||
alejandra
|
||||
inherit (pkgs)
|
||||
age
|
||||
just
|
||||
nil
|
||||
nixd
|
||||
sops
|
||||
ssh-to-age
|
||||
nixfmt-rfc-style
|
||||
dhall
|
||||
dhall-json
|
||||
dhall-lsp-server
|
||||
helix-gpt
|
||||
just
|
||||
libz
|
||||
ngrep
|
||||
nil
|
||||
sops
|
||||
ssh-to-age
|
||||
stripe-cli
|
||||
vscode-langservers-extracted
|
||||
zlib
|
||||
;
|
||||
|
||||
inherit
|
||||
(pkgs-stable.elmPackages)
|
||||
inherit (pkgs.elmPackages)
|
||||
elm
|
||||
elm-format
|
||||
elm-land
|
||||
|
@ -43,17 +35,11 @@
|
|||
elm-test
|
||||
;
|
||||
|
||||
inherit
|
||||
(pkgs.nodePackages_latest)
|
||||
dotenv-cli
|
||||
forever
|
||||
nodejs
|
||||
npm
|
||||
typescript-language-server
|
||||
;
|
||||
inherit (pkgs.haskellPackages) nixfmt;
|
||||
};
|
||||
|
||||
hlsCheck.enable = true;
|
||||
mkShellArgs.shellHook = "${config.pre-commit.installationScript}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
4
parts/config/packages.nix
Executable file
4
parts/config/packages.nix
Executable file
|
@ -0,0 +1,4 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
packages.default = self.packages.example;
|
||||
}
|
7
parts/config/pre-commit.nix
Executable file
7
parts/config/pre-commit.nix
Executable file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
pre-commit.settings.hooks = {
|
||||
nixfmt-rfc-style.enable = true;
|
||||
commitizen.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue