{
    description = "AGS Config";
    inputs = {
        nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";

        ags = {
            url = "github:aylur/ags";
            inputs.nixpkgs.follows = "nixpkgs";
        };
    };

    outputs = {
        self,
        nixpkgs,
        ags,
        }: let
            system = "x86_64-linux";
            pkgs = nixpkgs.legacyPackages.${system};
            extraPackages = with ags.packages.${pkgs.system}; [
                pkgs.gtksourceview
                pkgs.accountsservice

                battery
                hyprland
                tray
                powerprofiles
                wireplumber
                mpris
                network
                apps
                notifd
            ];
        in {
            packages.${system} = {
                default = ags.lib.bundle {
                    inherit pkgs;
                    src = ./files;
                    name = "ags-bar";
                    entry = "app.ts";
                    extraPackages = extraPackages;
                };
            };

            devShells.${system} = {
                default = pkgs.mkShell {
                    buildInputs = [
                        # ags.packages.${system}.agsFull
                        (ags.packages.${system}.default.override {
                            extraPackages = extraPackages;
                        })
                    ];
                };
            };
        };
}
