My personal-knowledge-system, with deeply integrated task tracking and long term goal planning capabilities.
1{
2 description = "Filaments dev flake";
3
4 # Flake inputs
5 inputs = {
6
7 nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # unstable Nixpkgs
8
9 fenix = {
10 url = "https://flakehub.com/f/nix-community/fenix/0.1";
11 inputs.nixpkgs.follows = "nixpkgs";
12 };
13 };
14
15 # Flake outputs
16 outputs =
17 { self, ... }@inputs:
18
19 let
20 # The systems supported for this flake
21 supportedSystems = [
22 "x86_64-linux" # 64-bit Intel/AMD Linux
23 "aarch64-linux" # 64-bit ARM Linux
24 "x86_64-darwin" # 64-bit Intel macOS
25 "aarch64-darwin" # 64-bit ARM macOS
26 ];
27
28 # Helper to provide system-specific attributes
29 forEachSupportedSystem =
30 f:
31 inputs.nixpkgs.lib.genAttrs supportedSystems (
32 system:
33 f {
34 pkgs = import inputs.nixpkgs {
35 inherit system;
36 overlays = [
37 inputs.self.overlays.default
38 ];
39 };
40 }
41 );
42 in
43 {
44
45 overlays.default = final: prev: {
46 rustToolchain =
47 with inputs.fenix.packages.${prev.stdenv.hostPlatform.system};
48 combine (
49 with stable;
50 [
51 clippy
52 rustc
53 cargo
54 rustfmt
55 rust-src
56 ]
57 );
58 };
59
60 devShells = forEachSupportedSystem (
61 { pkgs }:
62 {
63 default = pkgs.mkShellNoCC {
64 # The Nix packages provided in the environment
65 # Add any you need here
66 packages = with pkgs; [
67
68 rustToolchain
69 openssl
70 pkg-config
71 cargo-deny
72 cargo-edit
73 cargo-watch
74 rust-analyzer
75
76 typst
77 typstyle
78 ];
79
80 # Set any environment variables for your dev shell
81 env = {
82 RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
83 };
84
85 # Add any shell logic you want executed any time the environment is activated
86 shellHook = "";
87 };
88 }
89 );
90 };
91}