diff --git a/.direnv/flake-profile b/.direnv/flake-profile new file mode 120000 index 0000000..519b17b --- /dev/null +++ b/.direnv/flake-profile @@ -0,0 +1 @@ +flake-profile-3-link \ No newline at end of file diff --git a/.direnv/flake-profile-3-link b/.direnv/flake-profile-3-link new file mode 120000 index 0000000..599a2a8 --- /dev/null +++ b/.direnv/flake-profile-3-link @@ -0,0 +1 @@ +/nix/store/8b5yx1xf1rxjli92p6d51naaglfvpxm7-nix-shell-env \ No newline at end of file diff --git a/.envrc b/.envrc index 65326bb..cb1fc76 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,20 @@ -use nix \ No newline at end of file +use flake + +# Environment variables for GTK4/Wayland +export GDK_BACKEND=wayland + +# Show development environment info (only once per shell session) +if [[ -z "$WAYCAST_DEV_SHOWN" ]]; then + export WAYCAST_DEV_SHOWN=1 + echo "=== Waycast Development Environment ===" + echo "gtk4: $(pkg-config --modversion gtk4 2>/dev/null || echo missing)" + echo "gtk4-layer-shell: $(pkg-config --modversion gtk4-layer-shell-0 2>/dev/null || echo missing)" + echo "wayland-client: $(pkg-config --modversion wayland-client 2>/dev/null || echo missing)" + echo "" + echo "Environment:" + echo " XDG_SESSION_TYPE=$XDG_SESSION_TYPE" + echo " WAYLAND_DISPLAY=$WAYLAND_DISPLAY" + echo " GDK_BACKEND=$GDK_BACKEND" + echo "" + echo "Ready for Waycast development! 🚀" +fi \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e89ce79 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1756787288, + "narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e6d0c58 --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "Waycast - GTK4-based application launcher for Wayland compositors"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + # Build tools + pkg-config + + # GTK4 stack + gtk4 + glib + gdk-pixbuf + pango + cairo + harfbuzz + librsvg + + # Wayland + layer shell (GTK4 variant) + wayland + gtk4-layer-shell + + # Icons (so themed icons resolve) + hicolor-icon-theme + adwaita-icon-theme + ]; + }; + }); +} \ No newline at end of file diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 2cfadc7..0000000 --- a/shell.nix +++ /dev/null @@ -1,38 +0,0 @@ -# shell.nix -{ - pkgs ? import { }, -}: - -pkgs.mkShell { - # Tools you’ll use directly - buildInputs = [ - pkgs.pkg-config - - # GTK4 stack - pkgs.gtk4 - pkgs.glib - pkgs.gdk-pixbuf - pkgs.pango - pkgs.cairo - pkgs.harfbuzz - pkgs.librsvg - - # Wayland + layer shell (GTK4 variant) - pkgs.wayland - pkgs.gtk4-layer-shell - - # Icons (so themed icons resolve; harmless even if you don't use yet) - pkgs.hicolor-icon-theme - pkgs.adwaita-icon-theme - ]; - - shellHook = '' - export GDK_BACKEND=wayland - echo "gtk4: $(pkg-config --modversion gtk4 2>/dev/null || echo missing)" - echo "gtk4-layer-shell: $(pkg-config --modversion gtk4-layer-shell-0 2>/dev/null || echo missing)" - echo "wayland-client: $(pkg-config --modversion wayland-client 2>/dev/null || echo missing)" - echo "XDG_SESSION_TYPE=$XDG_SESSION_TYPE" - echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY" - echo "GDK_BACKEND=$GDK_BACKEND" - ''; -}