/flake.nix

https://github.com/mw/dots · Nix · 80 lines · 78 code · 2 blank · 0 comment · 4 complexity · 0787b01e887d9d77828b972e90d0b0ac MD5 · raw file

  1. {
  2. description = "basepkgs";
  3. inputs = {
  4. nixpkgs.url = "nixpkgs/22.05";
  5. };
  6. outputs = { self, nixpkgs }: {
  7. packages = nixpkgs.lib.genAttrs nixpkgs.lib.platforms.all
  8. (system:
  9. let
  10. pkgs = nixpkgs.legacyPackages.${system};
  11. isDarwin = builtins.match ".*linux" system == null;
  12. locale = if isDarwin then pkgs.darwin.locale else pkgs.locale;
  13. localePkgs =
  14. if isDarwin then
  15. [ pkgs.darwin.locale ]
  16. else
  17. [ pkgs.glibcLocales pkgs.locale ];
  18. in
  19. {
  20. basepkgs = pkgs.buildEnv {
  21. name = "basepkgs";
  22. paths = with pkgs; [
  23. bash
  24. bat
  25. coreutils-prefixed
  26. diffutils
  27. fd
  28. fzf
  29. gawk
  30. git
  31. gnutar
  32. htop
  33. jq
  34. lsd
  35. mosh
  36. neovim
  37. restic
  38. ripgrep
  39. starship
  40. tailscale
  41. tmux
  42. unzip
  43. wordnet
  44. zoxide
  45. zsh
  46. ] ++ localePkgs;
  47. extraOutputsToInstall = [ "man" "doc" ];
  48. };
  49. dev = pkgs.buildEnv {
  50. name = "dev";
  51. paths = with pkgs; [
  52. cargo
  53. clang
  54. clippy
  55. ctags
  56. go
  57. gopls
  58. gotools
  59. go-tools
  60. nodejs
  61. nodePackages.vscode-langservers-extracted
  62. python39
  63. python39Packages.black
  64. python39Packages.python-lsp-black
  65. python39Packages.python-lsp-server
  66. python39Packages.requests
  67. rnix-lsp
  68. rust-analyzer
  69. rustc
  70. rustfmt
  71. sumneko-lua-language-server
  72. ];
  73. extraOutputsToInstall = [ "man" "doc" ];
  74. };
  75. }
  76. );
  77. };
  78. }