From a97f6b9e284ca35a5c7bf98483f4b790f620f24b Mon Sep 17 00:00:00 2001 From: Alliana <56180684+Allianaab2m@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:26:18 +0900 Subject: [PATCH] chore: separate files --- nix-darwin/brew.nix | 24 +++++++++++++++ nix-darwin/default.nix | 67 ++++-------------------------------------- nix-darwin/system.nix | 43 +++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 62 deletions(-) create mode 100644 nix-darwin/brew.nix create mode 100644 nix-darwin/system.nix diff --git a/nix-darwin/brew.nix b/nix-darwin/brew.nix new file mode 100644 index 0000000..02ff791 --- /dev/null +++ b/nix-darwin/brew.nix @@ -0,0 +1,24 @@ +{...}: { + homebrew = { + enable = true; + onActivation = { + autoUpdate = true; + }; + casks = [ + "1password" + "raycast" + "karabiner-elements" + "arc" + "notion" + "discord" + "microsoft-word" + "microsoft-powerpoint" + "microsoft-excel" + "google-drive" + "orbstack" + "visual-studio-code@insiders" + "tailscale" + ]; + }; + +} diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index 2dbbe61..f61180a 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -1,4 +1,9 @@ { pkgs, ... }: { + imports = [ + ./system.nix + ./brew.nix + ]; + nix = { optimise.automatic = true; settings = { @@ -11,68 +16,6 @@ services.nix-daemon.enable = true; - system = { - stateVersion = 5; - defaults = { - NSGlobalDomain = { - AppleShowAllExtensions = true; - # 長押しして出てくるアクセントメニューを消す - ApplePressAndHoldEnabled = false; - # キーリピート - InitialKeyRepeat = 11; - KeyRepeat = 2; - "com.apple.mouse.tapBehavior" = 1; - }; - finder = { - AppleShowAllFiles = true; - AppleShowAllExtensions = true; - ShowPathbar = true; - ShowStatusBar = true; - }; - dock = { - autohide = true; - show-recents = false; - orientation = "left"; - mineffect = "scale"; - minimize-to-application = true; - wvous-br-corner = 1; - }; - screencapture = { - disable-shadow = true; - }; - controlcenter = { - BatteryShowPercentage = true; - }; - WindowManager = { - EnableTiledWindowMargins = false; - }; - trackpad = { - Clicking = true; - }; - }; - }; - - homebrew = { - enable = true; - onActivation = { - autoUpdate = true; - }; - casks = [ - "1password" - "raycast" - "karabiner-elements" - "arc" - "notion" - "discord" - "microsoft-word" - "microsoft-powerpoint" - "microsoft-excel" - "google-drive" - "orbstack" - "visual-studio-code@insiders" - ]; - }; - fonts = { packages = with pkgs; [ plemoljp-nf diff --git a/nix-darwin/system.nix b/nix-darwin/system.nix new file mode 100644 index 0000000..667416d --- /dev/null +++ b/nix-darwin/system.nix @@ -0,0 +1,43 @@ +{...}: { + system = { + stateVersion = 5; + defaults = { + NSGlobalDomain = { + AppleShowAllExtensions = true; + # 長押しして出てくるアクセントメニューを消す + ApplePressAndHoldEnabled = false; + # キーリピート + InitialKeyRepeat = 11; + KeyRepeat = 2; + "com.apple.mouse.tapBehavior" = 1; + }; + finder = { + AppleShowAllFiles = true; + AppleShowAllExtensions = true; + ShowPathbar = true; + ShowStatusBar = true; + }; + dock = { + autohide = true; + show-recents = false; + orientation = "left"; + mineffect = "scale"; + minimize-to-application = true; + wvous-br-corner = 1; + }; + screencapture = { + disable-shadow = true; + }; + controlcenter = { + BatteryShowPercentage = true; + }; + WindowManager = { + EnableTiledWindowMargins = false; + }; + trackpad = { + Clicking = true; + }; + }; + }; + +}