-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (50 loc) · 1.48 KB
/
Copy pathflake.nix
File metadata and controls
55 lines (50 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SPDX-FileCopyrightText: 2025 Norbert Melzer
# SPDX-FileContributor: Norbert Melzer
#
# SPDX-License-Identifier: MIT
{
description = "nobbz.dev - Website";
outputs = {
self,
nixpkgs,
nix-filter,
flake-parts,
...
} @ inputs: let
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"];
in
flake-parts.lib.mkFlake {inherit inputs;} {
inherit systems;
imports = [];
perSystem = {
config,
pkgs,
self',
inputs',
system,
...
}: {
formatter = pkgs.writeShellScriptBin "formatter" ''
${pkgs.lib.getExe pkgs.alejandra} .
yarn prettier -w .
'';
devShells.default = pkgs.mkShell {
packages = let
astro-ls = pkgs.writeShellScriptBin "astro-ls" ''exec yarn run astro-ls "$@"'';
mdx-language-server = pkgs.writeShellScriptBin "mdx-language-server" ''exec yarn run mdx-language-server "$@"'';
in
builtins.attrValues {
inherit (pkgs) nodejs_22 yarn2nix nil tailwindcss-language-server;
inherit (pkgs) pre-commit alejandra reuse;
inherit (pkgs.nodejs_22.pkgs) yarn typescript-language-server;
inherit astro-ls mdx-language-server;
};
};
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
nix-filter.url = "github:numtide/nix-filter";
flake-parts.url = "github:hercules-ci/flake-parts";
};
}