diff --git a/README.md b/README.md index 604eb9c..448c88d 100644 --- a/README.md +++ b/README.md @@ -70,37 +70,42 @@ Add to your `flake.nix` inputs: waycast.url = "git+https://gitgud.foo/thegrind/waycast"; ``` -**Install as package:** +Add the overlay and Home Manager module: ```nix -environment.systemPackages = [ inputs.waycast.packages.${system}.default ]; -# or for home-manager: -home.packages = [ inputs.waycast.packages.${system}.default ]; +nixpkgs.overlays = [ inputs.waycast.overlays.default ]; + +home-manager.users.youruser = { + imports = [ inputs.waycast.homeManagerModules.default ]; + + programs.waycast = { + enable = true; + settings = { + plugins.projects = { + search_paths = ["/absolute/path/to/search"]; + skip_dirs = [ "node_modules" "target" ".git" ]; + open_command = "code -n {path}"; + }; + plugins.file_search = { + search_paths = ["/absolute/path/to/search"]; + ignore_dirs = ["scripts", "temp"]; + }; + }; + css = '' + window { + background: rgba(0, 0, 0, 0.8); + border-radius: 12px; + } + ''; + }; +}; ``` -**With Home Manager module (recommended):** +**Just the package:** ```nix -imports = [ inputs.waycast.homeManagerModules.default ]; - -programs.waycast = { - enable = true; - config = { - plugins.projects = { - search_paths = ["/absolute/path/to/search"]; - skip_dirs = [ "node_modules" "target" ".git" ]; - open_command = "code -n {path}"; - }; - plugins.file_search = { - search_paths = ["/absolute/path/to/search"]; - ignore_dirs = ["scripts", "temp"]; # Just directory names here - }; - }; - css = '' - window { - background: rgba(0, 0, 0, 0.8); - border-radius: 12px; - } - ''; -}; +nixpkgs.overlays = [ inputs.waycast.overlays.default ]; +environment.systemPackages = [ pkgs.waycast ]; +# or for home-manager: +home.packages = [ pkgs.waycast ]; ``` ## Contributing diff --git a/flake.nix b/flake.nix index 7a8b31d..c6fc477 100644 --- a/flake.nix +++ b/flake.nix @@ -100,9 +100,6 @@ }; } )) // { - homeManagerModules.default = { pkgs, ... }: import ./modules/home-manager/waycast.nix { - inherit pkgs; - waycastPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default; - }; + homeManagerModules.default = import ./modules/home-manager/waycast.nix; }; } diff --git a/modules/home-manager/waycast.nix b/modules/home-manager/waycast.nix index 93fbb1c..2834227 100644 --- a/modules/home-manager/waycast.nix +++ b/modules/home-manager/waycast.nix @@ -1,5 +1,4 @@ -{ pkgs, waycastPackage }: -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; @@ -16,7 +15,7 @@ in package = mkOption { type = types.package; - default = waycastPackage; + default = pkgs.waycast; description = "The waycast package to use"; }; diff --git a/result b/result index 50a9a37..e26ab43 120000 --- a/result +++ b/result @@ -1 +1 @@ -/nix/store/rvkvjz9b92dd4qx4l78q31bb18lflz70-waycast-0.0.1 \ No newline at end of file +/nix/store/d8xw5yvbik1a39bxgq5l72z9v6flw4h8-waycast-0.0.1 \ No newline at end of file