diff --git a/ags/.envrc b/ags/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/ags/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/home/toph/common/optional/hyprland/ags/.gitignore b/ags/.gitignore similarity index 100% rename from home/toph/common/optional/hyprland/ags/.gitignore rename to ags/.gitignore diff --git a/home/toph/common/optional/hyprland/ags/app.ts b/ags/app.ts similarity index 100% rename from home/toph/common/optional/hyprland/ags/app.ts rename to ags/app.ts diff --git a/home/toph/common/optional/hyprland/ags/env.d.ts b/ags/env.d.ts similarity index 100% rename from home/toph/common/optional/hyprland/ags/env.d.ts rename to ags/env.d.ts diff --git a/ags/flake.lock b/ags/flake.lock new file mode 100644 index 0000000..ffbf3f3 --- /dev/null +++ b/ags/flake.lock @@ -0,0 +1,91 @@ +{ + "nodes": { + "ags": { + "inputs": { + "astal": "astal", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738087375, + "narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=", + "owner": "aylur", + "repo": "ags", + "rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "ags", + "type": "github" + } + }, + "astal": { + "inputs": { + "nixpkgs": [ + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737670815, + "narHash": "sha256-ZCxxshGN7XooabArcoGkYSNx5yVunqjKJi2aTv6cznI=", + "owner": "aylur", + "repo": "astal", + "rev": "127e9cdcbf173846a3c40ddc0abfbb038df48042", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, + "astal_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742571008, + "narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=", + "owner": "aylur", + "repo": "astal", + "rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1742422364, + "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "ags": "ags", + "astal": "astal_2", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/ags/flake.nix b/ags/flake.nix new file mode 100644 index 0000000..36a3f45 --- /dev/null +++ b/ags/flake.nix @@ -0,0 +1,72 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + + ags = { + url = "github:aylur/ags"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + astal = { + url = "github:aylur/astal"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + + extraPkgs = with pkgs; [ + fzf + ]; + + agsPkgs = with inputs.ags.packages.${pkgs.system}; [ + apps + bluetooth + greet + hyprland + mpris + network + notifd + tray + wireplumber + ]; + in + { + packages.${system} = { + default = inputs.ags.lib.bundle { + inherit pkgs; + src = ./.; + name = "yash"; # name of executable + entry = "app.ts"; + gtk4 = true; + + # additional libraries and executables to add to gjs' runtime + extraPackages = extraPkgs ++ agsPkgs; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + nativeBuildInputs = [ + pkgs.wrapGAppsHook + pkgs.gobject-introspection + (inputs.ags.packages.${system}.agsFull.override { + extraPackages = [ + # include extra libs here to add to the gjs runtime environment + pkgs.libgtop + ]; + }) + ] ++ extraPkgs; + + buildInputs = [ + inputs.astal.packages.${system}.default + pkgs.pnpm + ]; + }; + }; + }; +} diff --git a/home/toph/common/optional/hyprland/ags/scripts/git.fish b/ags/scripts/git.fish similarity index 95% rename from home/toph/common/optional/hyprland/ags/scripts/git.fish rename to ags/scripts/git.fish index e6fe485..d7019ee 100644 --- a/home/toph/common/optional/hyprland/ags/scripts/git.fish +++ b/ags/scripts/git.fish @@ -6,7 +6,7 @@ if test (count $argv) -ne 1 end set action $argv[1] -set subtree_path "home/toph/common/optional/hyprland/ags" +set subtree_path "ags" set remote "RyotShell-origin" set branch "main" diff --git a/home/toph/common/optional/hyprland/ags/style.scss b/ags/style.scss similarity index 100% rename from home/toph/common/optional/hyprland/ags/style.scss rename to ags/style.scss diff --git a/home/toph/common/optional/hyprland/ags/tsconfig.json b/ags/tsconfig.json similarity index 100% rename from home/toph/common/optional/hyprland/ags/tsconfig.json rename to ags/tsconfig.json diff --git a/home/toph/common/optional/hyprland/ags/widget/Bar.tsx b/ags/widget/Bar.tsx similarity index 100% rename from home/toph/common/optional/hyprland/ags/widget/Bar.tsx rename to ags/widget/Bar.tsx diff --git a/home/toph/common/optional/hyprland/ags/default.nix b/home/toph/common/optional/hyprland/ags/default.nix deleted file mode 100644 index 3f4f2eb..0000000 --- a/home/toph/common/optional/hyprland/ags/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ inputs, pkgs, ... }: -let - extraPkgs = with pkgs; [ - fzf - ]; - - agsPkgs = with inputs.ags.packages.${pkgs.system}; [ - apps - bluetooth - greet - hyprland - mpris - network - notifd - tray - wireplumber - ]; -in -{ - imports = [ inputs.ags.homeManagerModules.default ]; - - home.packages = [ inputs.astal.packages.${pkgs.system}.default ] ++ extraPkgs; - - programs.ags = { - enable = true; - - configDir = ../ags; - - # additional packages to add to gjs's runtime - extraPackages = extraPkgs ++ agsPkgs; - }; -} diff --git a/home/toph/common/optional/hyprland/ags/package.json b/home/toph/common/optional/hyprland/ags/package.json deleted file mode 100644 index 10c87ff..0000000 --- a/home/toph/common/optional/hyprland/ags/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "astal-shell", - "dependencies": { - "astal": "/home/toph/.local/share/ags" - } -}