I am very new into Nixos, and need advice for a nix-shell
My mashine is running Nixos 25.11 stable, i am using nix-shells but never touched flakes ore nix command.
Now i like to develop kind of an app with a rust core and a gtk4 UI (i have to learn both of them; rust and gtk as well).
For this project i like to build a nix-shell, but i need advice for tools / packages i need to install, dependencies i have to allocate ore sth. else.
Thank you for Help
I don’t know what you need for gtk development but this is usually what I start with for a new rust project:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs";
outputs = {
nixpkgs,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.x86_64-linux = pkgs.alejandra;
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [rustc cargo rust-analyzer clippy rustfmt clang pkg-config];
};
};
}
Thank you very much for your shell config.
Its not the complete topic with gtk under nixos but i need to learn rust to, so its very helpful.