nix/flake.nix
Yan Lin bdbf7a090c Add HTTPie for API testing with comprehensive usage guide
- Add httpie package to home.packages for modern HTTP client capabilities
- Include comprehensive usage examples in README covering:
  * Basic HTTP methods (GET, POST, PUT, DELETE)
  * Authentication with Bearer tokens and API keys
  * File uploads (form and multipart)
  * JSON data handling with type coercion
  * Session management for persistent authentication
  * File downloads and response filtering

HTTPie provides a user-friendly alternative to curl for API testing and development workflows.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 20:06:12 +02:00

78 lines
2 KiB
Nix

{
description = "Default environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
claude-code.url = "github:sadjow/claude-code-nix";
};
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code }:
let
configuration = { pkgs, ... }: {
environment.systemPackages =
[ pkgs.vim
pkgs.git
];
nix.settings.experimental-features = "nix-command flakes";
system.stateVersion = 6;
nixpkgs.hostPlatform = "aarch64-darwin";
programs.zsh.enable = true;
};
homeConfiguration = { pkgs, ... }: {
imports = [
nixvim.homeManagerModules.nixvim
./nvim.nix
./tmux.nix
./zsh.nix
];
home.username = "yanlin";
home.homeDirectory = "/Users/yanlin";
home.stateVersion = "24.05";
home.packages = with pkgs; [
texlive.combined.scheme-full
btop
python312
python312Packages.pip
python312Packages.virtualenv
lftp
httpie
claude-code.packages.aarch64-darwin.claude-code
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
gitui
];
fonts.fontconfig.enable = true;
programs.home-manager.enable = true;
};
in
{
darwinConfigurations."iMac" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem {
modules = [ configuration ];
};
homeConfigurations.yanlin = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
modules = [ homeConfiguration ];
extraSpecialArgs = { inherit claude-code nixvim; };
};
};
}