From 5543e1e44c7da4ac36cd5c4004ed69f9c83b0afa Mon Sep 17 00:00:00 2001 From: mat ess Date: Mon, 7 Nov 2022 21:39:25 -0500 Subject: [PATCH] More app fixing --- darwin/homebrew.nix | 1 + flake.lock | 22 ++++++++++++++++++++++ flake.nix | 1 - modules/home/programs/kitty/extras.nix | 20 +++++++++++++++----- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/darwin/homebrew.nix b/darwin/homebrew.nix index 9580c5d..c569afd 100644 --- a/darwin/homebrew.nix +++ b/darwin/homebrew.nix @@ -60,6 +60,7 @@ # "obsidian" "rectangle" "secretive" + "shortcat" "signal" # "slack" "stay" diff --git a/flake.lock b/flake.lock index f56d283..3e28160 100644 --- a/flake.lock +++ b/flake.lock @@ -269,6 +269,27 @@ "type": "github" } }, + "home-manager-atemu": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1613409234, + "narHash": "sha256-BW0xKvUfjy/0Wu1W/st1TTEHhpkyV0lPEW0otysvDSQ=", + "owner": "Atemu", + "repo": "home-manager", + "rev": "e6d905336181ed8f98d48a1f6c9965b77f18e304", + "type": "github" + }, + "original": { + "owner": "Atemu", + "ref": "darwin-copy-apps-fully-wip", + "repo": "home-manager", + "type": "github" + } + }, "homebrew-enabled": { "locked": { "lastModified": 1657739253, @@ -384,6 +405,7 @@ "flake-utils": "flake-utils", "helix": "helix", "home-manager": "home-manager", + "home-manager-atemu": "home-manager-atemu", "homebrew-enabled": "homebrew-enabled", "kitty-icon": "kitty-icon", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index cd23165..0746013 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,6 @@ # Module to workaround https://github.com/nix-community/home-manager/issues/1341 home-manager-atemu.url = "github:Atemu/home-manager/darwin-copy-apps-fully-wip"; home-manager-atemu.inputs.nixpkgs.follows = "nixpkgs-unstable"; - home-manager-atemu.inputs.utils.follows = "flake-utils"; # Extra sources helix.url = "github:helix-editor/helix"; diff --git a/modules/home/programs/kitty/extras.nix b/modules/home/programs/kitty/extras.nix index 0af2efe..7ade092 100644 --- a/modules/home/programs/kitty/extras.nix +++ b/modules/home/programs/kitty/extras.nix @@ -114,11 +114,21 @@ in term-background ]; - home.activation = mkIf (pkgs.stdenv.isDarwin && cfg.fixIcon.enable) { - fixKittyIcon = lib.hm.dag.entryAfter [ "darwinApps" "linkGeneration" ] '' - $DRY_RUN_CMD sudo /opt/homebrew/bin/fileicon set ${cfg.fixIcon.appPath} ${cfg.fixIcon.iconPath} - ''; - }; + home.activation = + let + fileicon = "/opt/homebrew/bin/fileicon"; + in + mkIf (pkgs.stdenv.isDarwin && cfg.fixIcon.enable) { + cleanupKittyIcon = lib.hm.dag.entryBetween [ "darwinApps" ] [ "writeBoundary" ] '' + if ${fileicon} test ${cfg.fixIcon.appPath}; + then + $DRY_RUN_CMD sudo ${fileicon} rm ${cfg.fixIcon.appPath} + fi + ''; + fixKittyIcon = lib.hm.dag.entryAfter [ "darwinApps" ] '' + $DRY_RUN_CMD sudo ${fileicon} set ${cfg.fixIcon.appPath} ${cfg.fixIcon.iconPath} + ''; + }; programs.kitty.settings = optionalAttrs cfg.colors.enable (