Further file arrangement

This commit is contained in:
Yan Lin 2025-08-30 17:36:51 +02:00
parent ad5598e202
commit db6dd6076e
3 changed files with 27 additions and 37 deletions

View file

@ -18,39 +18,9 @@
};
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, nixvim, claude-code, firefox-addons, nix-homebrew }:
let
# Common system configuration shared across all Darwin systems
commonSystemConfig = { pkgs, ... }: {
imports = [
./modules/tailscale.nix
];
environment.systemPackages = [
# System-level packages only
];
nix.settings.experimental-features = "nix-command flakes";
nix.settings.substituters = [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
"https://devenv.cachix.org"
];
nix.settings.trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
system.stateVersion = 6;
nixpkgs.hostPlatform = "aarch64-darwin";
programs.zsh.enable = true;
};
in
{
darwinConfigurations."iMac" = nix-darwin.lib.darwinSystem {
modules = [
commonSystemConfig
./hosts/darwin/iMac
];
specialArgs = { inherit nix-homebrew; };
@ -58,7 +28,6 @@
darwinConfigurations."MacBook-Air" = nix-darwin.lib.darwinSystem {
modules = [
commonSystemConfig
./hosts/darwin/MacBook-Air
];
specialArgs = { inherit nix-homebrew; };

View file

@ -242,12 +242,14 @@
},
})
-- Dictionary completion setup
require("cmp_dictionary").setup({
paths = { "/usr/share/dict/words" }, -- Standard dictionary path
exact_length = 2, -- Minimum length before completion
first_case_insensitive = true, -- Case insensitive matching
})
-- Dictionary completion setup (macOS only)
${lib.optionalString pkgs.stdenv.isDarwin ''
require("cmp_dictionary").setup({
paths = { "/usr/share/dict/words" }, -- Standard dictionary path on macOS
exact_length = 2, -- Minimum length before completion
first_case_insensitive = true, -- Case insensitive matching
})
''}
-- Telescope setup for better file finding
local telescope = require('telescope')

View file

@ -4,8 +4,27 @@
imports = [
../../modules/homebrew.nix
nix-homebrew.darwinModules.nix-homebrew
../../modules/tailscale.nix
];
# Nix configuration
nix.settings.experimental-features = "nix-command flakes";
nix.settings.substituters = [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
"https://devenv.cachix.org"
];
nix.settings.trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
# System configuration
system.stateVersion = 6;
nixpkgs.hostPlatform = "aarch64-darwin";
programs.zsh.enable = true;
# Set primary user for system preferences
system.primaryUser = "yanlin";