-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
72 lines (65 loc) · 1.84 KB
/
flake.nix
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
description = "yaaaaaaaaaaaaaaaaaaaaa";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs:
inputs.flake-utils.lib.eachDefaultSystem (system: let
flakePackage = flake: package: flake.packages."${system}"."${package}";
flakeDefaultPackage = flake: flakePackage flake "default";
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit system;
};
})
];
};
fhs = pkgs.buildFHSEnv {
name = "fhs-shell";
targetPkgs = p: (env-packages p) ++ (custom-commands p);
runScript = "${pkgs.zsh}/bin/zsh";
profile = ''
export FHS=1
# source ./.venv/bin/activate
# source .env
'';
};
custom-commands = pkgs: [
(pkgs.writeShellScriptBin "nothingfornowlol" ''
#!/usr/bin/env bash
cd $PROJECT_ROOT
'')
];
env-packages = pkgs:
with pkgs;
[
nodejs_21
unstable.bun
unstable.deno
netlify-cli
nodePackages_latest.svelte-language-server
nodePackages_latest.typescript-language-server
tailwindcss-language-server
]
++ (custom-commands pkgs);
in {
packages = {
# default = hyprkool-rs;
# inherit hyprkool-rs hyprkool-plugin;
};
devShells.default =
pkgs.mkShell {
nativeBuildInputs = (env-packages pkgs) ++ [fhs];
inputsFrom = [
];
shellHook = ''
export PROJECT_ROOT="$(pwd)"
'';
};
});
}