2024-11-21 10:01:26 +07:00
|
|
|
{
|
|
|
|
description = "My Awesome Desktop Shell";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
|
|
|
|
|
|
ags = {
|
|
|
|
url = "github:aylur/ags";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-11-21 20:53:50 +07:00
|
|
|
outputs =
|
|
|
|
{ nixpkgs, ags, ... }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
layout =
|
|
|
|
pkgs.writeText "layout.kdl"
|
|
|
|
# kdl
|
|
|
|
''
|
|
|
|
layout {
|
|
|
|
pane {
|
|
|
|
pane name="command"
|
|
|
|
pane command="bash" {
|
|
|
|
name "ags"
|
2024-11-21 22:45:00 +07:00
|
|
|
args "-c" "wgo -file=.ts -file=.tsx -xfile=.d.ts -file=.scss ags run ./app.ts"
|
2024-11-21 20:53:50 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
devRunScript = pkgs.writeShellScriptBin "dev-run" ''
|
|
|
|
zellij --layout ${layout} attach --create ags
|
|
|
|
'';
|
|
|
|
devStopScript = pkgs.writeShellScriptBin "dev-stop" ''
|
2024-11-21 22:45:00 +07:00
|
|
|
killall gjs || true
|
2024-11-21 20:53:50 +07:00
|
|
|
zellij delete-session --force ags || true
|
|
|
|
'';
|
2024-11-21 22:45:00 +07:00
|
|
|
agsPkg = ags.packages.${system};
|
2024-11-21 20:53:50 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.${system} = {
|
|
|
|
default = ags.lib.bundle {
|
|
|
|
inherit pkgs;
|
|
|
|
src = ./.;
|
2024-11-23 18:36:32 +07:00
|
|
|
name = "ags-calendar";
|
2024-11-21 20:53:50 +07:00
|
|
|
entry = "app.ts";
|
2024-11-21 10:01:26 +07:00
|
|
|
|
2024-11-21 20:53:50 +07:00
|
|
|
# additional libraries and executables to add to gjs' runtime
|
|
|
|
extraPackages = [
|
|
|
|
# ags.packages.${system}.battery
|
|
|
|
# pkgs.fzf
|
|
|
|
];
|
|
|
|
};
|
2024-11-21 10:01:26 +07:00
|
|
|
};
|
|
|
|
|
2024-11-21 20:53:50 +07:00
|
|
|
devShells.${system} = {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
devRunScript
|
|
|
|
devStopScript
|
|
|
|
pkgs.zellij
|
2024-11-21 22:45:00 +07:00
|
|
|
pkgs.typescript
|
|
|
|
pkgs.wgo
|
2024-11-21 20:53:50 +07:00
|
|
|
# includes all Astal libraries
|
|
|
|
# ags.packages.${system}.agsFull
|
2024-11-21 10:01:26 +07:00
|
|
|
|
2024-11-21 20:53:50 +07:00
|
|
|
# includes astal3 astal4 astal-io by default
|
|
|
|
(ags.packages.${system}.default.override {
|
|
|
|
extraPackages = [
|
|
|
|
# cherry pick packages
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2024-11-21 10:01:26 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|