Merge pull request #84 from ryan4yin/refactor-darwin-packages

Refactor: Remove darwin packages
This commit is contained in:
Ryan Yin
2024-03-11 14:17:15 +08:00
committed by GitHub
5 changed files with 243 additions and 227 deletions
+2 -7
View File
@@ -3,8 +3,7 @@
pkgs, pkgs,
... ...
}: { }: {
home.packages = with pkgs; home.packages = with pkgs; [
[
# infrastructure as code # infrastructure as code
# pulumi # pulumi
# pulumictl # pulumictl
@@ -25,13 +24,9 @@
# aliyun # aliyun
aliyun-cli aliyun-cli
]
++ (
lib.optionals pkgs.stdenv.isLinux [
# cloud tools that nix do not have cache for. # cloud tools that nix do not have cache for.
terraform terraform
terraformer # generate terraform configs from existing cloud resources terraformer # generate terraform configs from existing cloud resources
packer # machine image builder packer # machine image builder
] ];
);
} }
+3 -7
View File
@@ -14,8 +14,7 @@
# #
############################################################# #############################################################
home.packages = with pkgs; home.packages = with pkgs; [
[
colmena # nixos's remote deployment tool colmena # nixos's remote deployment tool
# db related # db related
@@ -39,9 +38,7 @@
# 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 # 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. # It's really useful when you work on a project for a long time.
git-trim git-trim
@@ -55,8 +52,7 @@
insomnia # REST client insomnia # REST client
wireshark # network analyzer wireshark # network analyzer
ventoy # create bootable usb ventoy # create bootable usb
] ];
);
programs = { programs = {
direnv = { direnv = {
+4 -8
View File
@@ -5,8 +5,7 @@
''; '';
}; };
home.packages = with pkgs; home.packages = with pkgs; [
[
#-- c/c++ #-- c/c++
cmake cmake
cmake-language-server cmake-language-server
@@ -121,17 +120,14 @@
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
jsonnet-language-server jsonnet-language-server
hadolint # Dockerfile linter hadolint # Dockerfile linter
]
++ (
lib.optionals pkgs.stdenv.isLinux [
jsonnet
#-- zig #-- zig
zls zls
#-- verilog / systemverilog #-- verilog / systemverilog
verible verible
gdb gdb
] ];
);
} }
+1 -4
View File
@@ -4,8 +4,7 @@
nur-ryan4yin, nur-ryan4yin,
... ...
}: { }: {
home.packages = with pkgs; home.packages = with pkgs; [
[
# Misc # Misc
tldr tldr
cowsay cowsay
@@ -53,9 +52,7 @@
# 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`)
]; ];
+32
View 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)
];
}