diff --git a/CHANGELOG.md b/CHANGELOG.md index 30b2153..6f14f47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +- Fixed `joplin-desktop` by installing it outside of Nixpkgs +- Use `discord` without OpenASAR on macOS +- Changed `rectangle` and `aldente` to autostart +- Replaced `dockutil` with `system.defaults.dock.persistent-apps` - Use `armcord` on `aarch64-linux` - Removed `x11vnc` - Removed `gnome` diff --git a/hosts/chi/darwin-configuration.nix b/hosts/chi/darwin-configuration.nix index 2f01d0e..f6871ba 100644 --- a/hosts/chi/darwin-configuration.nix +++ b/hosts/chi/darwin-configuration.nix @@ -17,4 +17,12 @@ type = "git"; url = "file:///Users/${user}/Projects/nix-darwin"; }; + + system.defaults.dock.persistent-apps = [ + # Update this when firefox-bin-unwrapped is merged + (assert pkgs.firefox.meta.unsupported && pkgs.firefox-bin.meta.unsupported; + "/Applications/Firefox.app") + "${pkgs.utm}/Applications/UTM.app" + "/System/Applications/System Settings.app" + ]; } diff --git a/hosts/echo/darwin-configuration.nix b/hosts/echo/darwin-configuration.nix index fe64b48..c64eb20 100644 --- a/hosts/echo/darwin-configuration.nix +++ b/hosts/echo/darwin-configuration.nix @@ -14,4 +14,9 @@ publicHostKey = "c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo="; }]; + + system.defaults.dock.persistent-apps = [ + "/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app" + "/System/Applications/System Settings.app" + ]; } diff --git a/hosts/hermes/darwin-configuration.nix b/hosts/hermes/darwin-configuration.nix index 3194c00..cd40e65 100644 --- a/hosts/hermes/darwin-configuration.nix +++ b/hosts/hermes/darwin-configuration.nix @@ -1,4 +1,4 @@ -{ user, ... }: +{ user, pkgs, ... }: { networking.knownNetworkServices = [ "Wi-Fi" ]; @@ -15,4 +15,17 @@ type = "git"; url = "file:///Users/${user}/Code/nix-darwin"; }; + + system.defaults.dock.persistent-apps = [ + # Update this when firefox-bin-unwrapped is merged + (assert pkgs.firefox.meta.unsupported && pkgs.firefox-bin.meta.unsupported; + "/Applications/Firefox.app") + "/System/Applications/Utilities/Terminal.app" + "/Applications/1Password.app" + "${pkgs.vscode}/Applications/Visual Studio Code.app" + "${pkgs.spotify}/Applications/Spotify.app" + "/System/Applications/Calendar.app" + "/Applications/Joplin.app" + "/System/Applications/System Settings.app" + ]; } diff --git a/modules/firefox.nix b/modules/firefox.nix index b86088c..d243628 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -1,11 +1,19 @@ { hmModule = { config, pkgs, lib, ... }: - let inherit (pkgs.stdenv) hostPlatform; + let + inherit (pkgs.stdenv) hostPlatform; + + firefoxUnsupported = pkgs.firefox.meta.unsupported + && pkgs.firefox-bin.meta.unsupported; in { home.activation.setDefaultBrowser = lib.mkIf hostPlatform.isDarwin + # Update this to ~/Applications/Home Manager Apps/Firefox.app when firefox-bin-unwrapped is merged (lib.hm.dag.entryAfter [ "writeBoundary" ] '' if ! ${lib.getExe pkgs.defaultbrowser} firefox; then - /usr/bin/open ~/Applications/Home\ Manager\ Apps/Firefox.app + /usr/bin/open ${ + assert firefoxUnsupported; + "/Applications/Firefox.app" + } ${lib.getExe pkgs.defaultbrowser} firefox fi ''); @@ -13,9 +21,7 @@ programs.firefox.enable = true; programs.firefox.package = if hostPlatform.isDarwin then # Leaving this until firefox-bin-unwrapped is merged - assert (pkgs.firefox.meta.unsupported - && pkgs.firefox-bin.meta.unsupported); - pkgs.emptyDirectory + assert firefoxUnsupported; pkgs.emptyDirectory else pkgs.firefox; programs.firefox.profiles.base = { diff --git a/modules/graphical-minimal.nix b/modules/graphical-minimal.nix index 93d2b6b..1225bee 100644 --- a/modules/graphical-minimal.nix +++ b/modules/graphical-minimal.nix @@ -5,6 +5,12 @@ environment.systemPackages = builtins.attrValues { inherit (pkgs) rectangle; }; + launchd.user.agents.rectangle = { + serviceConfig.ProgramArguments = + [ "/Applications/Nix Apps/Rectangle.app/Contents/MacOS/Rectangle" ]; + serviceConfig.RunAtLoad = true; + }; + # Close Terminal if shell exited cleanly system.activationScripts.extraUserActivation.text = '' if [[ -f ~/Library/Preferences/com.apple.Terminal.plist ]]; then diff --git a/modules/graphical.nix b/modules/graphical.nix index 44be75f..4ec32a1 100644 --- a/modules/graphical.nix +++ b/modules/graphical.nix @@ -32,7 +32,7 @@ hmModule = { config, pkgs, lib, ... }: let inherit (pkgs.stdenv) hostPlatform; - inherit (lib) mkIf optionalAttrs; + inherit (lib) optionalAttrs; in { home.packages = builtins.attrValues ({ inherit (pkgs) qalculate-gtk remmina; @@ -44,17 +44,6 @@ programs.vscode.package = pkgs.vscode; - # WORKAROUND: home-manager uses `sudo -u` to run activation scripts as the correct user - # however dockutil uses `SUDO_USER` to determine the user who ran the command - # meaning that it attempts to edit root's Dock intead of the current user - home.activation.updateDock = mkIf hostPlatform.isDarwin - (lib.hm.dag.entryAfter [ "writeBoundary" ] '' - echo "adding Visual Studio Code.app to the dock" - SUDO_USER= ${ - lib.getExe pkgs.dockutil - } --add "${config.programs.vscode.package}/Applications/Visual Studio Code.app" --replacing "Visual Studio Code" - ''); - home.file.".ssh/config".text = let _1password-agent = if hostPlatform.isDarwin then "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock" diff --git a/modules/laptop.nix b/modules/laptop.nix index e54cc48..be7632c 100644 --- a/modules/laptop.nix +++ b/modules/laptop.nix @@ -35,6 +35,12 @@ environment.systemPackages = builtins.attrValues { inherit (pkgs) aldente; }; + launchd.user.agents.alDente = { + serviceConfig.ProgramArguments = + [ "/Applications/Nix Apps/AlDente.app/Contents/MacOS/AlDente" ]; + serviceConfig.RunAtLoad = true; + }; + system.defaults.trackpad.Clicking = true; # WORKAROUND: Setting this via `system.defaults` won't check the checkbox diff --git a/modules/personal.nix b/modules/personal.nix index a874628..45909b1 100644 --- a/modules/personal.nix +++ b/modules/personal.nix @@ -52,9 +52,12 @@ inherit (pkgs) gramps; } // optionalAttrs (!hostPlatform.isLinux || !hostPlatform.isAarch64) { # Runs on everything except `aarch64-linux` - inherit (pkgs) discord joplin-desktop; + discord = if hostPlatform.isLinux then + pkgs.discord.override { withOpenASAR = true; } + else + pkgs.discord; } // optionalAttrs (hostPlatform.isLinux && hostPlatform.isx86_64) { - inherit (pkgs) signal-desktop; + inherit (pkgs) joplin-desktop signal-desktop; } // optionalAttrs (hostPlatform.isLinux && hostPlatform.isAarch64) { inherit (pkgs) armcord; }); diff --git a/overlays/discord.nix b/overlays/discord.nix deleted file mode 100644 index dfd5a98..0000000 --- a/overlays/discord.nix +++ /dev/null @@ -1,5 +0,0 @@ -self: super: { - discord = super.discord.override { withOpenASAR = true; }; - discord-ptb = super.discord-ptb.override { withOpenASAR = true; }; - discord-canary = super.discord-canary.override { withOpenASAR = true; }; -}