diff --git a/flake.lock b/flake.lock index 5e23f7f..16d78bd 100644 --- a/flake.lock +++ b/flake.lock @@ -94,11 +94,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1675471726, - "narHash": "sha256-526iHwidfdtZZ7aAU9od1/zbyfSFBEailBTet+Gvfqg=", + "lastModified": 1676854489, + "narHash": "sha256-hWmx3JFLNPGMtflyjgEn5GZydbLW3msjXvarS1NsBDM=", "owner": "bandithedoge", "repo": "nixpkgs-firefox-darwin", - "rev": "813d55a3e3b3c0423eb5d1fcb4bf82197c9f7796", + "rev": "6a5cca0ea8dfab4718e1e43e243c80ba110c2364", "type": "github" }, "original": { @@ -176,11 +176,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1675935446, - "narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=", + "lastModified": 1678271387, + "narHash": "sha256-H2dv/i1LRlunRtrESirELzfPWdlG/6ElDB1ksO529H4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2dce7f1a55e785a22d61668516df62899278c9e4", + "rev": "36999b8d19eb6eebb41983ef017d7e0095316af2", "type": "github" }, "original": { @@ -301,11 +301,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1676973346, - "narHash": "sha256-rft8oGMocTAhUVqG3LW6I8K/Fo9ICGmNjRqaWTJwav0=", + "lastModified": 1676885936, + "narHash": "sha256-ZRKb6zBfTvdCOXI7nGC1L9UWSU5ay2ltxg+f5UIzBOU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d0d55259081f0b97c828f38559cad899d351cad1", + "rev": "b69883faca9542d135fa6bab7928ff1b233c167f", "type": "github" }, "original": { @@ -510,11 +510,11 @@ }, "utils": { "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "type": "github" }, "original": { diff --git a/hosts/lookingglass/default.nix b/hosts/lookingglass/default.nix index 30c7e35..505f65d 100644 --- a/hosts/lookingglass/default.nix +++ b/hosts/lookingglass/default.nix @@ -44,6 +44,7 @@ darwin.lib.darwinSystem { lua.enable = true; kubernetes.enable = true; _1password.enable = true; + slack.enable = true; } ]; } diff --git a/modules/common/applications/default.nix b/modules/common/applications/default.nix index 942f8d4..77682e3 100644 --- a/modules/common/applications/default.nix +++ b/modules/common/applications/default.nix @@ -7,9 +7,10 @@ ./firefox.nix ./kitty.nix ./media.nix + ./nautilus.nix ./obsidian.nix ./qbittorrent.nix - ./nautilus.nix + ./slack.nix ./yt-dlp.nix ]; diff --git a/modules/common/applications/slack.nix b/modules/common/applications/slack.nix new file mode 100644 index 0000000..4bd866f --- /dev/null +++ b/modules/common/applications/slack.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: { + + options = { + slack = { + enable = lib.mkEnableOption { + description = "Enable Slack."; + default = false; + }; + }; + }; + + config = lib.mkIf (config.gui.enable && config.slack.enable) { + unfreePackages = [ "slack" ]; + home-manager.users.${config.user} = { + home.packages = with pkgs; [ slack ]; + }; + }; + +} diff --git a/modules/darwin/hammerspoon.nix b/modules/darwin/hammerspoon.nix index ebfc5e6..d4f5f87 100644 --- a/modules/darwin/hammerspoon.nix +++ b/modules/darwin/hammerspoon.nix @@ -16,6 +16,7 @@ firefox = "${pkgs.firefox-bin}/Applications/Firefox.app"; discord = "${pkgs.discord}/Applications/Discord.app"; kitty = "${pkgs.kitty}/Applications/kitty.app"; + slack = "${pkgs.slack}/Applications/Slack.app"; }; xdg.configFile."hammerspoon/Spoons/MoveWindow.spoon".source = ./hammerspoon/Spoons/MoveWindow.spoon; diff --git a/modules/darwin/hammerspoon/Spoons/Launcher.spoon/init.lua b/modules/darwin/hammerspoon/Spoons/Launcher.spoon/init.lua index 0e6e988..57eb477 100644 --- a/modules/darwin/hammerspoon/Spoons/Launcher.spoon/init.lua +++ b/modules/darwin/hammerspoon/Spoons/Launcher.spoon/init.lua @@ -93,7 +93,7 @@ function obj:init() hs.reload() end) self.launcher:bind("", "S", function() - self:switch("Slack.app") + self:switch("@slack@") end) self.launcher:bind("", "Z", function() self:switch("zoom.us.app") diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix index 2212c04..6361485 100644 --- a/modules/darwin/system.nix +++ b/modules/darwin/system.nix @@ -166,7 +166,7 @@ echo "Choose and order dock icons" defaults write com.apple.dock persistent-apps -array \ "$(__dock_item /Applications/1Password.app)" \ - "$(__dock_item /Applications/Slack.app)" \ + "$(__dock_item ${pkgs.slack}/Applications/Slack.app)" \ "$(__dock_item /System/Applications/Calendar.app)" \ "$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \ "$(__dock_item /System/Applications/Messages.app)" \