From 6fad159c38c3d155b662f782e538ade8534e6e29 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:16:00 +1000 Subject: [PATCH] darwin: merge application configuration from application.nix into desktop.nix makes darwin/applications useful for when programs differ between mac and linux --- flake.nix | 1 - modules/darwin/applications.nix | 47 ++++++++++----------------------- modules/darwin/brew.nix | 14 ---------- modules/darwin/desktop.nix | 37 ++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 48 deletions(-) delete mode 100644 modules/darwin/brew.nix diff --git a/flake.nix b/flake.nix index 0ff0e47..a315236 100644 --- a/flake.nix +++ b/flake.nix @@ -47,7 +47,6 @@ ./modules/darwin/desktop.nix ./modules/darwin/hardware.nix ./modules/darwin/nix.nix - ./modules/darwin/brew.nix ./hosts/faye/conf.nix ./hosts/darwin-common.nix diff --git a/modules/darwin/applications.nix b/modules/darwin/applications.nix index 71c8e43..9e38307 100644 --- a/modules/darwin/applications.nix +++ b/modules/darwin/applications.nix @@ -2,13 +2,6 @@ { # dock - system.defaults.dock.autohide = true; - system.defaults.dock.autohide-delay = 0.01; - system.defaults.dock.autohide-time-modifier = 0.2; - system.defaults.dock.mineffect = "scale"; - system.defaults.dock.orientation = "left"; - system.defaults.dock.show-recents = true; - system.defaults.dock.tilesize = 48; system.defaults.dock.persistent-apps = [ "/Applications/Firefox.app" "/Applications/Ghostty.app" @@ -22,33 +15,21 @@ "${pkgs.audacity}/Applications/Audacity.app" "${pkgs.gimp}/Applications/GNU Image Manipulation Program.app" ]; + + # nix pkgs + environment.systemPackages = with pkgs; [ + ] - # finder - system.defaults.finder = { - AppleShowAllExtensions = true; - AppleShowAllFiles = true; - FXEnableExtensionChangeWarning = false; - FXPreferredViewStyle = "clmv"; - FXRemoveOldTrashItems = true; - NewWindowTarget = "Home"; - ShowStatusBar = true; - _FXShowPosixPathInTitle = true; - _FXSortFoldersFirst = true; - - CreateDesktop = true; # desktop icons - ShowHardDrivesOnDesktop = true; - ShowExternalHardDrivesOnDesktop = true; - ShowMountedServersOnDesktop = true; - ShowRemovableMediaOnDesktop = true; - }; - - # activity monitor - system.defaults.ActivityMonitor = { - IconType = 0; - OpenMainWindow = true; - ShowCategory = 100; - SortColumn = "CPUUsage"; - SortDirection = 0; + # homebrew pkgs + homebrew = { + enable = true; + onActivation.cleanup = "zap"; + casks = [ + "firefox" + "thunderbird" + "ghostty" + "whisky" + ]; }; # hotkey daemon diff --git a/modules/darwin/brew.nix b/modules/darwin/brew.nix deleted file mode 100644 index 6f69e09..0000000 --- a/modules/darwin/brew.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - homebrew = { - enable = true; - onActivation.cleanup = "zap"; - casks = [ - "firefox" - "thunderbird" - "ghostty" - "whisky" - ]; - }; -} diff --git a/modules/darwin/desktop.nix b/modules/darwin/desktop.nix index 662516b..23e3667 100644 --- a/modules/darwin/desktop.nix +++ b/modules/darwin/desktop.nix @@ -43,4 +43,41 @@ system.defaults.dock.mru-spaces = false; # dont rearange spaces based on usage system.defaults.spaces.spans-displays = true; # displays have different spaces system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = true; + + # dock + system.defaults.dock.autohide = true; + system.defaults.dock.autohide-delay = 0.01; + system.defaults.dock.autohide-time-modifier = 0.2; + system.defaults.dock.mineffect = "scale"; + system.defaults.dock.orientation = "left"; + system.defaults.dock.show-recents = true; + system.defaults.dock.tilesize = 48; + + # finder + system.defaults.finder = { + AppleShowAllExtensions = true; + AppleShowAllFiles = true; + FXEnableExtensionChangeWarning = false; + FXPreferredViewStyle = "clmv"; + FXRemoveOldTrashItems = true; + NewWindowTarget = "Home"; + ShowStatusBar = true; + _FXShowPosixPathInTitle = true; + _FXSortFoldersFirst = true; + + CreateDesktop = true; # desktop icons + ShowHardDrivesOnDesktop = true; + ShowExternalHardDrivesOnDesktop = true; + ShowMountedServersOnDesktop = true; + ShowRemovableMediaOnDesktop = true; + }; + + # activity monitor + system.defaults.ActivityMonitor = { + IconType = 0; + OpenMainWindow = true; + ShowCategory = 100; + SortColumn = "CPUUsage"; + SortDirection = 0; + }; }