Files
MusicFS/devenv.nix
T
2026-06-29 21:16:55 +02:00

64 lines
1001 B
Nix

{
pkgs,
lib,
config,
inputs,
...
}:
{
languages.rust.enable = true;
git-hooks.hooks = {
clippy = {
enable = true;
settings.allFeatures = true;
};
treefmt.enable = true;
};
treefmt = {
enable = true;
config.programs = {
nixfmt.enable = true;
rustfmt.enable = true;
};
};
packages = with pkgs; [
git
just
flac
ffmpeg
protobuf
buf
grpcurl
opencode
inputs.pinix.packages.${pkgs.system}.default
];
processes.musicfs = {
after = [ "devenv:processes:postgres" ];
exec = ''
cargo run -- \
--source /home/fujin/Music \
--mountpoint /tmp/rust-fuse \
--database "postgresql://fujin@localhost/musicfs?host=$PGHOST"
'';
};
services.postgres = {
enable = true;
initialDatabases = [
{
name = "musicfs";
schema = ./db/schema.sql;
}
];
};
outputs = {
rust-app = config.languages.rust.import ./. { };
};
}