mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 02:08:29 +02:00
Merge pull request #84 from ryan4yin/refactor-darwin-packages
Refactor: Remove darwin packages
This commit is contained in:
@@ -3,35 +3,30 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
[
|
# infrastructure as code
|
||||||
# infrastructure as code
|
# pulumi
|
||||||
# pulumi
|
# pulumictl
|
||||||
# pulumictl
|
# tf2pulumi
|
||||||
# tf2pulumi
|
# crd2pulumi
|
||||||
# crd2pulumi
|
# pulumiPackages.pulumi-random
|
||||||
# pulumiPackages.pulumi-random
|
# pulumiPackages.pulumi-command
|
||||||
# pulumiPackages.pulumi-command
|
# pulumiPackages.pulumi-aws-native
|
||||||
# pulumiPackages.pulumi-aws-native
|
# pulumiPackages.pulumi-language-go
|
||||||
# pulumiPackages.pulumi-language-go
|
# pulumiPackages.pulumi-language-python
|
||||||
# pulumiPackages.pulumi-language-python
|
# pulumiPackages.pulumi-language-nodejs
|
||||||
# pulumiPackages.pulumi-language-nodejs
|
|
||||||
|
|
||||||
# aws
|
# aws
|
||||||
awscli2
|
awscli2
|
||||||
ssm-session-manager-plugin # Amazon SSM Session Manager Plugin
|
ssm-session-manager-plugin # Amazon SSM Session Manager Plugin
|
||||||
aws-iam-authenticator
|
aws-iam-authenticator
|
||||||
eksctl
|
eksctl
|
||||||
|
|
||||||
# aliyun
|
# aliyun
|
||||||
aliyun-cli
|
aliyun-cli
|
||||||
]
|
# cloud tools that nix do not have cache for.
|
||||||
++ (
|
terraform
|
||||||
lib.optionals pkgs.stdenv.isLinux [
|
terraformer # generate terraform configs from existing cloud resources
|
||||||
# cloud tools that nix do not have cache for.
|
packer # machine image builder
|
||||||
terraform
|
];
|
||||||
terraformer # generate terraform configs from existing cloud resources
|
|
||||||
packer # machine image builder
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,49 +14,45 @@
|
|||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
[
|
colmena # nixos's remote deployment tool
|
||||||
colmena # nixos's remote deployment tool
|
|
||||||
|
|
||||||
# db related
|
# db related
|
||||||
dbeaver
|
dbeaver
|
||||||
mycli
|
mycli
|
||||||
pgcli
|
pgcli
|
||||||
mongosh
|
mongosh
|
||||||
sqlite
|
sqlite
|
||||||
|
|
||||||
# embedded development
|
# embedded development
|
||||||
minicom
|
minicom
|
||||||
|
|
||||||
# ai related
|
# ai related
|
||||||
python311Packages.huggingface-hub # huggingface-cli
|
python311Packages.huggingface-hub # huggingface-cli
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
pkgs-unstable.devbox
|
pkgs-unstable.devbox
|
||||||
bfg-repo-cleaner # remove large files from git history
|
bfg-repo-cleaner # remove large files from git history
|
||||||
k6 # load testing tool
|
k6 # load testing tool
|
||||||
protobuf # protocol buffer compiler
|
protobuf # protocol buffer compiler
|
||||||
|
|
||||||
# solve coding extercises - learn by doing
|
# solve coding extercises - learn by doing
|
||||||
exercism
|
exercism
|
||||||
]
|
|
||||||
++ (
|
|
||||||
lib.optionals pkgs.stdenv.isLinux [
|
|
||||||
# Automatically trims your branches whose tracking remote refs are merged or gone
|
|
||||||
# It's really useful when you work on a project for a long time.
|
|
||||||
git-trim
|
|
||||||
|
|
||||||
# need to run `conda-install` before using it
|
# Automatically trims your branches whose tracking remote refs are merged or gone
|
||||||
# need to run `conda-shell` before using command `conda`
|
# It's really useful when you work on a project for a long time.
|
||||||
# conda is not available for MacOS
|
git-trim
|
||||||
conda
|
|
||||||
|
|
||||||
mitmproxy # http/https proxy tool
|
# need to run `conda-install` before using it
|
||||||
insomnia # REST client
|
# need to run `conda-shell` before using command `conda`
|
||||||
wireshark # network analyzer
|
# conda is not available for MacOS
|
||||||
ventoy # create bootable usb
|
conda
|
||||||
]
|
|
||||||
);
|
mitmproxy # http/https proxy tool
|
||||||
|
insomnia # REST client
|
||||||
|
wireshark # network analyzer
|
||||||
|
ventoy # create bootable usb
|
||||||
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
|
|||||||
@@ -5,133 +5,129 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
[
|
#-- c/c++
|
||||||
#-- c/c++
|
cmake
|
||||||
cmake
|
cmake-language-server
|
||||||
cmake-language-server
|
gnumake
|
||||||
gnumake
|
checkmake
|
||||||
checkmake
|
# c/c++ compiler, required by nvim-treesitter!
|
||||||
# c/c++ compiler, required by nvim-treesitter!
|
gcc
|
||||||
gcc
|
# c/c++ tools with clang-tools, the unwrapped version won't
|
||||||
# c/c++ tools with clang-tools, the unwrapped version won't
|
# add alias like `cc` and `c++`, so that it won't conflict with gcc
|
||||||
# add alias like `cc` and `c++`, so that it won't conflict with gcc
|
llvmPackages.clang-unwrapped
|
||||||
llvmPackages.clang-unwrapped
|
lldb
|
||||||
lldb
|
|
||||||
|
|
||||||
#-- python
|
#-- python
|
||||||
nodePackages.pyright # python language server
|
nodePackages.pyright # python language server
|
||||||
(python311.withPackages (
|
(python311.withPackages (
|
||||||
ps:
|
ps:
|
||||||
with ps; [
|
with ps; [
|
||||||
ruff-lsp
|
ruff-lsp
|
||||||
black # python formatter
|
black # python formatter
|
||||||
|
|
||||||
jupyter
|
jupyter
|
||||||
ipython
|
ipython
|
||||||
pandas
|
pandas
|
||||||
requests
|
requests
|
||||||
pyquery
|
pyquery
|
||||||
pyyaml
|
pyyaml
|
||||||
|
|
||||||
## emacs's lsp-bridge dependenciesge
|
## emacs's lsp-bridge dependenciesge
|
||||||
epc
|
epc
|
||||||
orjson
|
orjson
|
||||||
sexpdata
|
sexpdata
|
||||||
six
|
six
|
||||||
setuptools
|
setuptools
|
||||||
paramiko
|
paramiko
|
||||||
rapidfuzz
|
rapidfuzz
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
|
|
||||||
#-- rust
|
#-- rust
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
cargo # rust package manager
|
cargo # rust package manager
|
||||||
rustfmt
|
rustfmt
|
||||||
|
|
||||||
#-- nix
|
#-- nix
|
||||||
nil
|
nil
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
# nixd
|
# nixd
|
||||||
statix # Lints and suggestions for the nix programming language
|
statix # Lints and suggestions for the nix programming language
|
||||||
deadnix # Find and remove unused code in .nix source files
|
deadnix # Find and remove unused code in .nix source files
|
||||||
alejandra # Nix Code Formatter
|
alejandra # Nix Code Formatter
|
||||||
|
|
||||||
#-- golang
|
#-- golang
|
||||||
go
|
go
|
||||||
gomodifytags
|
gomodifytags
|
||||||
iferr # generate error handling code for go
|
iferr # generate error handling code for go
|
||||||
impl # generate function implementation for go
|
impl # generate function implementation for go
|
||||||
gotools # contains tools like: godoc, goimports, etc.
|
gotools # contains tools like: godoc, goimports, etc.
|
||||||
gopls # go language server
|
gopls # go language server
|
||||||
delve # go debugger
|
delve # go debugger
|
||||||
|
|
||||||
# -- java
|
# -- java
|
||||||
jdk17
|
jdk17
|
||||||
gradle
|
gradle
|
||||||
maven
|
maven
|
||||||
spring-boot-cli
|
spring-boot-cli
|
||||||
|
|
||||||
#-- lua
|
#-- lua
|
||||||
stylua
|
stylua
|
||||||
lua-language-server
|
lua-language-server
|
||||||
|
|
||||||
#-- bash
|
#-- bash
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
shellcheck
|
shellcheck
|
||||||
shfmt
|
shfmt
|
||||||
|
|
||||||
#-- javascript/typescript --#
|
#-- javascript/typescript --#
|
||||||
nodePackages.nodejs
|
nodePackages.nodejs
|
||||||
nodePackages.typescript
|
nodePackages.typescript
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
# HTML/CSS/JSON/ESLint language servers extracted from vscode
|
||||||
nodePackages.vscode-langservers-extracted
|
nodePackages.vscode-langservers-extracted
|
||||||
nodePackages."@tailwindcss/language-server"
|
nodePackages."@tailwindcss/language-server"
|
||||||
emmet-ls
|
emmet-ls
|
||||||
|
|
||||||
# -- Lisp like Languages
|
# -- Lisp like Languages
|
||||||
guile
|
guile
|
||||||
racket-minimal
|
racket-minimal
|
||||||
fnlfmt # fennel
|
fnlfmt # fennel
|
||||||
|
|
||||||
#-- Others
|
#-- Others
|
||||||
taplo # TOML language server / formatter / validator
|
taplo # TOML language server / formatter / validator
|
||||||
nodePackages.yaml-language-server
|
nodePackages.yaml-language-server
|
||||||
sqlfluff # SQL linter
|
sqlfluff # SQL linter
|
||||||
actionlint # GitHub Actions linter
|
actionlint # GitHub Actions linter
|
||||||
buf # protoc plugin for linting and formatting
|
buf # protoc plugin for linting and formatting
|
||||||
proselint # English prose linter
|
proselint # English prose linter
|
||||||
|
|
||||||
#-- Misc
|
#-- Misc
|
||||||
tree-sitter # common language parser/highlighter
|
tree-sitter # common language parser/highlighter
|
||||||
nodePackages.prettier # common code formatter
|
nodePackages.prettier # common code formatter
|
||||||
marksman # language server for markdown
|
marksman # language server for markdown
|
||||||
glow # markdown previewer
|
glow # markdown previewer
|
||||||
fzf
|
fzf
|
||||||
pandoc # document converter
|
pandoc # document converter
|
||||||
hugo # static site generator
|
hugo # static site generator
|
||||||
|
|
||||||
#-- Optional Requirements:
|
#-- Optional Requirements:
|
||||||
gdu # disk usage analyzer, required by AstroNvim
|
gdu # disk usage analyzer, required by AstroNvim
|
||||||
(ripgrep.override {withPCRE2 = true;}) # recursively searches directories for a regex pattern
|
(ripgrep.override {withPCRE2 = true;}) # recursively searches directories for a regex pattern
|
||||||
|
|
||||||
#-- CloudNative
|
#-- CloudNative
|
||||||
nodePackages.dockerfile-language-server-nodejs
|
nodePackages.dockerfile-language-server-nodejs
|
||||||
# terraform # install via brew on macOS
|
# terraform # install via brew on macOS
|
||||||
terraform-ls
|
terraform-ls
|
||||||
jsonnet-language-server
|
jsonnet
|
||||||
hadolint # Dockerfile linter
|
jsonnet-language-server
|
||||||
]
|
hadolint # Dockerfile linter
|
||||||
++ (
|
|
||||||
lib.optionals pkgs.stdenv.isLinux [
|
#-- zig
|
||||||
jsonnet
|
zls
|
||||||
#-- zig
|
#-- verilog / systemverilog
|
||||||
zls
|
verible
|
||||||
#-- verilog / systemverilog
|
gdb
|
||||||
verible
|
];
|
||||||
gdb
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,61 +4,58 @@
|
|||||||
nur-ryan4yin,
|
nur-ryan4yin,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs; [
|
||||||
[
|
# Misc
|
||||||
# Misc
|
tldr
|
||||||
tldr
|
cowsay
|
||||||
cowsay
|
gnupg
|
||||||
gnupg
|
gnumake
|
||||||
gnumake
|
|
||||||
|
|
||||||
# Morden cli tools, replacement of grep/sed/...
|
# Morden cli tools, replacement of grep/sed/...
|
||||||
|
|
||||||
# Interactively filter its input using fuzzy searching, not limit to filenames.
|
# Interactively filter its input using fuzzy searching, not limit to filenames.
|
||||||
fzf
|
fzf
|
||||||
# search for files by name, faster than find
|
# search for files by name, faster than find
|
||||||
fd
|
fd
|
||||||
# search for files by its content, replacement of grep
|
# search for files by its content, replacement of grep
|
||||||
(ripgrep.override {withPCRE2 = true;})
|
(ripgrep.override {withPCRE2 = true;})
|
||||||
|
|
||||||
# A fast and polyglot tool for code searching, linting, rewriting at large scale
|
# A fast and polyglot tool for code searching, linting, rewriting at large scale
|
||||||
# supported languages: only some mainstream languages currently(do not support nix/nginx/yaml/toml/...)
|
# supported languages: only some mainstream languages currently(do not support nix/nginx/yaml/toml/...)
|
||||||
ast-grep
|
ast-grep
|
||||||
|
|
||||||
sad # CLI search and replace, just like sed, but with diff preview.
|
sad # CLI search and replace, just like sed, but with diff preview.
|
||||||
yq-go # yaml processer https://github.com/mikefarah/yq
|
yq-go # yaml processer https://github.com/mikefarah/yq
|
||||||
just # a command runner like make, but simpler
|
just # a command runner like make, but simpler
|
||||||
delta # A viewer for git and diff output
|
delta # A viewer for git and diff output
|
||||||
lazygit # Git terminal UI.
|
lazygit # Git terminal UI.
|
||||||
hyperfine # command-line benchmarking tool
|
hyperfine # command-line benchmarking tool
|
||||||
gping # ping, but with a graph(TUI)
|
gping # ping, but with a graph(TUI)
|
||||||
doggo # DNS client for humans
|
doggo # DNS client for humans
|
||||||
duf # Disk Usage/Free Utility - a better 'df' alternative
|
duf # Disk Usage/Free Utility - a better 'df' alternative
|
||||||
du-dust # A more intuitive version of `du` in rust
|
du-dust # A more intuitive version of `du` in rust
|
||||||
gdu # disk usage analyzer(replacement of `du`)
|
gdu # disk usage analyzer(replacement of `du`)
|
||||||
|
|
||||||
# nix related
|
# nix related
|
||||||
#
|
#
|
||||||
# it provides the command `nom` works just like `nix
|
# it provides the command `nom` works just like `nix
|
||||||
# with more details log output
|
# with more details log output
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
hydra-check # check hydra(nix's build farm) for the build status of a package
|
hydra-check # check hydra(nix's build farm) for the build status of a package
|
||||||
nix-index # A small utility to index nix store paths
|
nix-index # A small utility to index nix store paths
|
||||||
nix-init # generate nix derivation from url
|
nix-init # generate nix derivation from url
|
||||||
# https://github.com/nix-community/nix-melt
|
# https://github.com/nix-community/nix-melt
|
||||||
nix-melt # A TUI flake.lock viewer
|
nix-melt # A TUI flake.lock viewer
|
||||||
# https://github.com/utdemir/nix-tree
|
# https://github.com/utdemir/nix-tree
|
||||||
nix-tree # A TUI to visualize the dependency graph of a nix derivation
|
nix-tree # A TUI to visualize the dependency graph of a nix derivation
|
||||||
|
|
||||||
# productivity
|
# productivity
|
||||||
caddy # A webserver with automatic HTTPS via Let's Encrypt(replacement of nginx)
|
caddy # A webserver with automatic HTTPS via Let's Encrypt(replacement of nginx)
|
||||||
croc # File transfer between computers securely and easily
|
croc # File transfer between computers securely and easily
|
||||||
]
|
|
||||||
# self-hosted nix cache server
|
# self-hosted nix cache server
|
||||||
++ lib.optionals (pkgs.system != "x86_64-darwin") [
|
attic.packages.${pkgs.system}.attic-client
|
||||||
attic.packages.${pkgs.system}.attic-client
|
ncdu # analyzer your disk usage Interactively, via TUI(replacement of `du`)
|
||||||
ncdu # analyzer your disk usage Interactively, via TUI(replacement of `du`)
|
];
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# A modern replacement for ‘ls’
|
# A modern replacement for ‘ls’
|
||||||
|
|||||||
32
modules/darwin/broken-packages.nix
Normal file
32
modules/darwin/broken-packages.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{lib, ...}:
|
||||||
|
# ===================================================================
|
||||||
|
# Remove packages that are not well supported for the Darwin platform
|
||||||
|
# ===================================================================
|
||||||
|
let
|
||||||
|
brokenPackages = [
|
||||||
|
"terraform"
|
||||||
|
"terraformer"
|
||||||
|
"packer"
|
||||||
|
"git-trim"
|
||||||
|
"conda"
|
||||||
|
"mitmproxy"
|
||||||
|
"insomnia"
|
||||||
|
"wireshark"
|
||||||
|
"ventoy"
|
||||||
|
"jsonnet"
|
||||||
|
"zls"
|
||||||
|
"verible"
|
||||||
|
"gdb"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(_: super: let
|
||||||
|
removeUnwantedPackages = pname:
|
||||||
|
lib.warn "the ${pname} has been removed on the darwin platform"
|
||||||
|
super.emptyDirectory;
|
||||||
|
in
|
||||||
|
lib.genAttrs
|
||||||
|
brokenPackages
|
||||||
|
removeUnwantedPackages)
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user