darwin compatibility logic & darwin mcp

This commit is contained in:
Danilo Reyes
2026-03-18 15:58:19 -06:00
parent 9c6f17f113
commit 29bb85b5c9
6 changed files with 93 additions and 47 deletions

View File

@@ -1,11 +1,22 @@
{ {
inputs, inputs,
pkgs,
... ...
}: }:
{ {
home = { home = {
username = "cdreyes"; username = "carlosdaniloreyesmartinez";
homeDirectory = "/Users/cdreyes"; homeDirectory = "/Users/carlosdaniloreyesmartinez";
packages = [ pkgs.google-cloud-sdk ];
};
programs = {
starship.enable = true;
kitty = {
enable = true;
shellIntegration.enableBashIntegration = false;
shellIntegration.enableZshIntegration = true;
settings.term = "xterm-256color";
};
}; };
my = import ./toggles.nix { inherit inputs; }; my = import ./toggles.nix { inherit inputs; };
} }

View File

@@ -5,28 +5,47 @@
emacsExtraConfig, emacsExtraConfig,
emacsExtraPackages, emacsExtraPackages,
}: }:
let
clipboardPackages =
if pkgs.stdenv.isDarwin then
builtins.attrValues {
inherit (pkgs) pngpaste;
}
else
builtins.attrValues {
inherit (pkgs)
xclip
wl-clipboard-rs
;
};
linuxWindowPackages = lib.optionals pkgs.stdenv.isLinux (
builtins.attrValues {
inherit (pkgs.xorg) xwininfo;
inherit (pkgs) xdotool;
}
);
in
{ {
packages = builtins.attrValues { packages =
inherit (pkgs.xorg) xwininfo; linuxWindowPackages
inherit (pkgs) ++ clipboardPackages
xdotool ++ builtins.attrValues {
xclip inherit (pkgs)
wl-clipboard-rs fd
fd fzf
fzf ripgrep
ripgrep tree-sitter
tree-sitter graphviz
graphviz tetex
tetex languagetool
languagetool yaml-language-server
yaml-language-server markdownlint-cli
markdownlint-cli ;
; inherit (pkgs.nodePackages)
inherit (pkgs.nodePackages) vscode-json-languageserver
vscode-json-languageserver prettier
prettier ;
; };
};
extraPackages = extraPackages =
epkgs: epkgs:
let let

View File

@@ -111,9 +111,11 @@ in
fi fi
'' ''
'' ''
if command -v fzf-share >/dev/null; then if [ -f "${pkgs.fzf}/share/fzf/key-bindings.zsh" ]; then
source "$(fzf-share)/key-bindings.bash" source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
source "$(fzf-share)/completion.bash" fi
if [ -f "${pkgs.fzf}/share/fzf/completion.zsh" ]; then
source "${pkgs.fzf}/share/fzf/completion.zsh"
fi fi
''; '';
}; };

View File

@@ -9,7 +9,10 @@ let
}; };
in in
{ {
systems = [ system ]; systems = [
system
"aarch64-darwin"
];
flake = { flake = {
lib = { lib = {
commonOverlays = mkpkgs: inputs: [ commonOverlays = mkpkgs: inputs: [

View File

@@ -1,16 +1,23 @@
{ inputs, ... }: { inputs, ... }:
{ {
perSystem = _: { perSystem =
devShells = { pkgs, ... }:
let {
hostShells = inputs.self.nixosConfigurations.emacs.config.devShells; devShells =
in if pkgs.stdenv.isLinux then
inputs.self.lib.langList let
|> builtins.filter (name: hostShells ? ${name}) hostShells = inputs.self.nixosConfigurations.emacs.config.devShells;
|> map (name: { in
inherit name; inputs.self.lib.langList
value = hostShells.${name}; |> builtins.filter (name: hostShells ? ${name})
}) |> map (name: {
|> builtins.listToAttrs; inherit name;
}; value = hostShells.${name};
})
|> builtins.listToAttrs
else
{
mcp = (import ../modules/dev/mcp/common.nix { inherit pkgs inputs; }).devShell;
};
};
} }

View File

@@ -52,12 +52,16 @@
}; };
in in
{ {
packages = (inputs.jawz-scripts.packages.${system} or { }) // { packages =
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm; (inputs.jawz-scripts.packages.${system} or { })
vps-linode = vpsLinodeConfig.config.system.build.images.linode; // {
mcp-tests = mcpTests; mcp-tests = mcpTests;
nixos-mcp = nixosMcp; nixos-mcp = nixosMcp;
nixos-mcp-server = mcpServerPkg; nixos-mcp-server = mcpServerPkg;
}; }
// pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
emacs-vm = inputs.self.nixosConfigurations.emacs.config.system.build.vm;
vps-linode = vpsLinodeConfig.config.system.build.images.linode;
};
}; };
} }