diff --git a/flake.nix b/flake.nix index 8897704..1d63093 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ home-manager.users.francis = { imports = [ self.homeModules.common - self.homeModules.darwin + self.homeModules.darwin-x86-64 ]; }; } @@ -59,7 +59,7 @@ home-manager.users.francis = { imports = [ self.homeModules.common - self.homeModules.darwin + self.homeModules.darwin-aarch64 ]; }; } diff --git a/home-manager/flake-module.nix b/home-manager/flake-module.nix index 8d1aef8..da329de 100644 --- a/home-manager/flake-module.nix +++ b/home-manager/flake-module.nix @@ -11,6 +11,7 @@ ./modules/eza.nix ./modules/fzf.nix ./modules/git.nix + ./modules/gui.nix ./modules/helix.nix ./modules/ssh.nix ./modules/starship.nix @@ -22,9 +23,13 @@ ]; home.stateVersion = "22.11"; }; - darwin.imports = [ + darwin-x86-64.imports = [ ./modules/1password/darwin.nix - ./modules/zsh/darwin.nix + ./modules/zsh/darwin-x86-64.nix + ]; + darwin-aarch64.imports = [ + ./modules/1password/darwin.nix + ./modules/zsh/darwin-aarch64.nix ]; linux.imports = [ ./modules/1password/linux.nix diff --git a/home-manager/modules/gui.nix b/home-manager/modules/gui.nix new file mode 100644 index 0000000..d5b9b86 --- /dev/null +++ b/home-manager/modules/gui.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = [ + pkgs.discord + pkgs.slack + ]; +} diff --git a/home-manager/modules/zsh/darwin-aarch64.nix b/home-manager/modules/zsh/darwin-aarch64.nix new file mode 100644 index 0000000..311a4f3 --- /dev/null +++ b/home-manager/modules/zsh/darwin-aarch64.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + imports = [ ./common.nix ]; + + # Disable last login message + home.file.".hushlogin".text = ""; + + programs.zsh.initExtra = '' + eval "$(/opt/homebrew/bin/brew shellenv)" + ''; +} diff --git a/home-manager/modules/zsh/darwin.nix b/home-manager/modules/zsh/darwin-x86-64.nix similarity index 100% rename from home-manager/modules/zsh/darwin.nix rename to home-manager/modules/zsh/darwin-x86-64.nix diff --git a/nixos/darwin/homebrew.nix b/nixos/darwin/homebrew.nix index 0a45f40..254dfca 100644 --- a/nixos/darwin/homebrew.nix +++ b/nixos/darwin/homebrew.nix @@ -1,10 +1,15 @@ { ... }: +let + # Change to true when you want to upgrade homebrew packages + upgrade = false; +in { homebrew = { onActivation = { - autoUpdate = false; + autoUpdate = upgrade; cleanup = "zap"; + upgrade = upgrade; }; enable = true; casks = [ @@ -13,12 +18,9 @@ "arc" "dash" "datagrip" - "discord" - "firefox" "google-chrome" "obsidian" "raycast" - "slack" "spotify" "todoist" "yubico-yubikey-manager"