From 98040ba17e15d3df22d7288d1a1171bff5d9271e Mon Sep 17 00:00:00 2001 From: Laurent Gueret Date: Sun, 4 Oct 2026 17:54:30 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20d=C3=A9pendances?= =?UTF-8?q?=20OSX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/darwin/home/users/alistreaza.nix | 4 +-- hosts/darwin/system/os.nix | 29 ++++++++++++++----- hosts/darwin/system/partials/system.nix | 15 ---------- modules/home/common/devenv.nix | 22 ++++++++++++++ modules/home/common/git.nix | 2 +- modules/system/darwin/casks/ghostty.nix | 4 +++ modules/system/darwin/casks/iterm.nix | 4 +++ .../{jetbrain.nix => jetbrain/clion.nix} | 14 ++++----- .../system/darwin/casks/jetbrain/goland.nix | 21 ++++++++++++++ .../system/darwin/casks/jetbrain/intellij.nix | 21 ++++++++++++++ .../system/darwin/casks/jetbrain/phpstorm.nix | 21 ++++++++++++++ .../system/darwin/casks/jetbrain/pycharm.nix | 21 ++++++++++++++ .../system/darwin/casks/jetbrain/rubymine.nix | 21 ++++++++++++++ .../darwin/casks/jetbrain/rustrover.nix | 21 ++++++++++++++ .../system/darwin/casks/microsoft/excel.nix | 21 ++++++++++++++ .../darwin/casks/microsoft/powerpoint.nix | 21 ++++++++++++++ .../system/darwin/casks/microsoft/team.nix | 21 ++++++++++++++ .../{microsoft.nix => microsoft/word.nix} | 11 +++---- modules/system/darwin/casks/obsidian.nix | 4 +++ modules/system/darwin/casks/zed.nix | 4 +++ modules/system/darwin/casks/zen.nix | 4 +++ modules/system/darwin/casks/zotero.nix | 21 ++++++++++++++ modules/system/darwin/homebrew.nix | 1 + 23 files changed, 289 insertions(+), 39 deletions(-) create mode 100644 modules/home/common/devenv.nix rename modules/system/darwin/casks/{jetbrain.nix => jetbrain/clion.nix} (51%) create mode 100644 modules/system/darwin/casks/jetbrain/goland.nix create mode 100644 modules/system/darwin/casks/jetbrain/intellij.nix create mode 100644 modules/system/darwin/casks/jetbrain/phpstorm.nix create mode 100644 modules/system/darwin/casks/jetbrain/pycharm.nix create mode 100644 modules/system/darwin/casks/jetbrain/rubymine.nix create mode 100644 modules/system/darwin/casks/jetbrain/rustrover.nix create mode 100644 modules/system/darwin/casks/microsoft/excel.nix create mode 100644 modules/system/darwin/casks/microsoft/powerpoint.nix create mode 100644 modules/system/darwin/casks/microsoft/team.nix rename modules/system/darwin/casks/{microsoft.nix => microsoft/word.nix} (51%) create mode 100644 modules/system/darwin/casks/zotero.nix diff --git a/hosts/darwin/home/users/alistreaza.nix b/hosts/darwin/home/users/alistreaza.nix index 10c68b9..8ab39ee 100644 --- a/hosts/darwin/home/users/alistreaza.nix +++ b/hosts/darwin/home/users/alistreaza.nix @@ -1,4 +1,4 @@ -{ pkgs, import-tree, ... }: +{ import-tree, ... }: { home-manager.users.alistreaza = { @@ -33,7 +33,7 @@ targets.darwin.copyApps.enable = false; # Home packages - home.packages = with pkgs; []; + home.packages = []; # The state version is required and should stay at the version you # originally installed. diff --git a/hosts/darwin/system/os.nix b/hosts/darwin/system/os.nix index b699426..e3e985b 100644 --- a/hosts/darwin/system/os.nix +++ b/hosts/darwin/system/os.nix @@ -2,15 +2,28 @@ { system.primaryUser = "alistreaza"; - # Homebrew apps - os.homebrew.ghostty.enable = true; - os.homebrew.zed.enable = true; - os.homebrew.jetbrain.enable = true; - os.homebrew.iina.enable = true; - os.homebrew.zen.enable = true; - os.homebrew.obsidian.enable = true; - os.homebrew.microsoft.enable = true; + # Homebrew System apps os.homebrew.keka.enable = true; + os.homebrew.ghostty.enable = true; + + # Homebrew Net apps + os.homebrew.zen.enable = true; + + # Homebrew Office apps + os.homebrew.microsoft.word.enable = true; + os.homebrew.microsoft.excel.enable = true; + os.homebrew.microsoft.powerpoint.enable = true; + os.homebrew.microsoft.team.enable = true; + os.homebrew.obsidian.enable = true; + + # Homebrew IDE apps + os.homebrew.zed.enable = true; + os.homebrew.jetbrain.intellij.enable = true; + os.homebrew.jetbrain.pycharm.enable = true; + os.homebrew.jetbrain.phpstorm.enable = true; + + # Homebrew Media apps + os.homebrew.iina.enable = true; nixpkgs.hostPlatform = "aarch64-darwin"; } diff --git a/hosts/darwin/system/partials/system.nix b/hosts/darwin/system/partials/system.nix index 24338e4..6d5aba7 100644 --- a/hosts/darwin/system/partials/system.nix +++ b/hosts/darwin/system/partials/system.nix @@ -18,22 +18,7 @@ orientation = "left"; persistent-apps = [ { app = "/System/Applications/Apps.app"; } - { app = "/Applications/Zen.app"; } { app = "/System/Applications/Mail.app"; } - { app = "/Applications/Obsidian.app"; } - { app = "/Applications/Microsoft Word.app"; } - { app = "/Applications/Microsoft Excel.app"; } - { app = "/Applications/Microsoft PowerPoint.app"; } - { app = "/Applications/Microsoft Teams.app"; } - { app = "/Applications/Zed.app"; } - { app = "/Applications/IntelliJ IDEA.app"; } - { app = "/Applications/PyCharm.app"; } - { app = "/Applications/CLion.app"; } - { app = "/Applications/RustRover.app"; } - { app = "/Applications/PhpStorm.app"; } - { app = "/Applications/RubyMine.app"; } - { app = "/Applications/GoLand.app"; } - { app = "/Applications/Ghostty.app"; } ]; persistent-others = [ ]; wvous-bl-corner = 1; diff --git a/modules/home/common/devenv.nix b/modules/home/common/devenv.nix new file mode 100644 index 0000000..2f80fed --- /dev/null +++ b/modules/home/common/devenv.nix @@ -0,0 +1,22 @@ +{ + lib, + pkgs, + config, + ... +}: +with lib; +let + cfg = config.home.shell.devenv; +in +{ + options.home.shell.devenv = { + enable = mkEnableOption "Git options"; + }; + config = mkIf cfg.enable { + + home.packages = with pkgs; [ + devenv + ]; + + }; +} diff --git a/modules/home/common/git.nix b/modules/home/common/git.nix index 01e3c8c..f2b9816 100644 --- a/modules/home/common/git.nix +++ b/modules/home/common/git.nix @@ -9,7 +9,7 @@ let in { options.home.shell.git = { - enable = mkEnableOption "Zen Editor options"; + enable = mkEnableOption "Git options"; }; config = mkIf cfg.enable { diff --git a/modules/system/darwin/casks/ghostty.nix b/modules/system/darwin/casks/ghostty.nix index 00da0cc..b650c4d 100644 --- a/modules/system/darwin/casks/ghostty.nix +++ b/modules/system/darwin/casks/ghostty.nix @@ -13,5 +13,9 @@ in "ghostty" ]; + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Ghostty.app"; } + ]; + }; } diff --git a/modules/system/darwin/casks/iterm.nix b/modules/system/darwin/casks/iterm.nix index c367aad..5e61811 100644 --- a/modules/system/darwin/casks/iterm.nix +++ b/modules/system/darwin/casks/iterm.nix @@ -13,5 +13,9 @@ in "iterm2" ]; + system.defaults.dock.persistent-apps = [ + { app = "/Applications/iTerm.app"; } + ]; + }; } diff --git a/modules/system/darwin/casks/jetbrain.nix b/modules/system/darwin/casks/jetbrain/clion.nix similarity index 51% rename from modules/system/darwin/casks/jetbrain.nix rename to modules/system/darwin/casks/jetbrain/clion.nix index e553d94..e757439 100644 --- a/modules/system/darwin/casks/jetbrain.nix +++ b/modules/system/darwin/casks/jetbrain/clion.nix @@ -1,22 +1,20 @@ { lib, config, ... }: with lib; let - cfg = config.os.homebrew.jetbrain; + cfg = config.os.homebrew.jetbrain.clion; in { - options.os.homebrew.jetbrain = { + options.os.homebrew.jetbrain.clion = { enable = mkEnableOption "System jetbrain homebrew service"; }; config = mkIf cfg.enable { homebrew.casks = [ - "intellij-idea" - "pycharm" "clion" - "rustrover" - "phpstorm" - "rubymine" - "goland" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/CLion.app"; } ]; }; diff --git a/modules/system/darwin/casks/jetbrain/goland.nix b/modules/system/darwin/casks/jetbrain/goland.nix new file mode 100644 index 0000000..f9b727b --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/goland.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.goland; +in +{ + options.os.homebrew.jetbrain.goland = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "goland" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/GoLand.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/jetbrain/intellij.nix b/modules/system/darwin/casks/jetbrain/intellij.nix new file mode 100644 index 0000000..55861b7 --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/intellij.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.intellij; +in +{ + options.os.homebrew.jetbrain.intellij = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "intellij-idea" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/IntelliJ IDEA.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/jetbrain/phpstorm.nix b/modules/system/darwin/casks/jetbrain/phpstorm.nix new file mode 100644 index 0000000..fa297e6 --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/phpstorm.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.phpstorm; +in +{ + options.os.homebrew.jetbrain.phpstorm = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "phpstorm" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/PhpStorm.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/jetbrain/pycharm.nix b/modules/system/darwin/casks/jetbrain/pycharm.nix new file mode 100644 index 0000000..2eca4b4 --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/pycharm.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.pycharm; +in +{ + options.os.homebrew.jetbrain.pycharm = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "pycharm" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/PyCharm.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/jetbrain/rubymine.nix b/modules/system/darwin/casks/jetbrain/rubymine.nix new file mode 100644 index 0000000..a5d21f5 --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/rubymine.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.rubymine; +in +{ + options.os.homebrew.jetbrain.rubymine = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "rubymine" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/RubyMine.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/jetbrain/rustrover.nix b/modules/system/darwin/casks/jetbrain/rustrover.nix new file mode 100644 index 0000000..f4c5d79 --- /dev/null +++ b/modules/system/darwin/casks/jetbrain/rustrover.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.jetbrain.rustrover; +in +{ + options.os.homebrew.jetbrain.rustrover = { + enable = mkEnableOption "System jetbrain homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "rustrover" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/RustRover.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/microsoft/excel.nix b/modules/system/darwin/casks/microsoft/excel.nix new file mode 100644 index 0000000..74aef5d --- /dev/null +++ b/modules/system/darwin/casks/microsoft/excel.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.microsoft.excel; +in +{ + options.os.homebrew.microsoft.excel = { + enable = mkEnableOption "System microsoft homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "microsoft-excel" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Microsoft Excel.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/microsoft/powerpoint.nix b/modules/system/darwin/casks/microsoft/powerpoint.nix new file mode 100644 index 0000000..391e3c7 --- /dev/null +++ b/modules/system/darwin/casks/microsoft/powerpoint.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.microsoft.powerpoint; +in +{ + options.os.homebrew.microsoft.powerpoint = { + enable = mkEnableOption "System microsoft homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "microsoft-powerpoint" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Microsoft PowerPoint.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/microsoft/team.nix b/modules/system/darwin/casks/microsoft/team.nix new file mode 100644 index 0000000..ac26643 --- /dev/null +++ b/modules/system/darwin/casks/microsoft/team.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.microsoft.team; +in +{ + options.os.homebrew.microsoft.team = { + enable = mkEnableOption "System microsoft homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "microsoft-teams" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Microsoft Teams.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/casks/microsoft.nix b/modules/system/darwin/casks/microsoft/word.nix similarity index 51% rename from modules/system/darwin/casks/microsoft.nix rename to modules/system/darwin/casks/microsoft/word.nix index dd4edbf..82f71d9 100644 --- a/modules/system/darwin/casks/microsoft.nix +++ b/modules/system/darwin/casks/microsoft/word.nix @@ -1,19 +1,20 @@ { lib, config, ... }: with lib; let - cfg = config.os.homebrew.microsoft; + cfg = config.os.homebrew.microsoft.word; in { - options.os.homebrew.microsoft = { + options.os.homebrew.microsoft.word = { enable = mkEnableOption "System microsoft homebrew service"; }; config = mkIf cfg.enable { homebrew.casks = [ "microsoft-word" - "microsoft-excel" - "microsoft-powerpoint" - "microsoft-teams" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Microsoft Word.app"; } ]; }; diff --git a/modules/system/darwin/casks/obsidian.nix b/modules/system/darwin/casks/obsidian.nix index d33b410..cba0f0f 100644 --- a/modules/system/darwin/casks/obsidian.nix +++ b/modules/system/darwin/casks/obsidian.nix @@ -13,5 +13,9 @@ in "obsidian" ]; + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Obsidian.app"; } + ]; + }; } diff --git a/modules/system/darwin/casks/zed.nix b/modules/system/darwin/casks/zed.nix index b5ac251..6879332 100644 --- a/modules/system/darwin/casks/zed.nix +++ b/modules/system/darwin/casks/zed.nix @@ -13,5 +13,9 @@ in "zed" ]; + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Zed.app"; } + ]; + }; } diff --git a/modules/system/darwin/casks/zen.nix b/modules/system/darwin/casks/zen.nix index 7ee9db7..2519aaf 100644 --- a/modules/system/darwin/casks/zen.nix +++ b/modules/system/darwin/casks/zen.nix @@ -13,5 +13,9 @@ in "zen" ]; + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Zen.app"; } + ]; + }; } diff --git a/modules/system/darwin/casks/zotero.nix b/modules/system/darwin/casks/zotero.nix new file mode 100644 index 0000000..20fb7c5 --- /dev/null +++ b/modules/system/darwin/casks/zotero.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.os.homebrew.zotero; +in +{ + options.os.homebrew.zotero = { + enable = mkEnableOption "System zotero homebrew service"; + }; + config = mkIf cfg.enable { + + homebrew.casks = [ + "zotero" + ]; + + system.defaults.dock.persistent-apps = [ + { app = "/Applications/Zotero.app"; } + ]; + + }; +} diff --git a/modules/system/darwin/homebrew.nix b/modules/system/darwin/homebrew.nix index b046dec..f49fc03 100644 --- a/modules/system/darwin/homebrew.nix +++ b/modules/system/darwin/homebrew.nix @@ -20,6 +20,7 @@ in # Install Homebrew under the default prefix enable = true; + autoMigrate = true; # Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2 enableRosetta = false;