From e8718f3a61f8ba92c00f41eaf340c196b27241f7 Mon Sep 17 00:00:00 2001 From: bricked Date: Sat, 30 Mar 2024 17:42:50 +0100 Subject: [PATCH] ags: add package scripts --- configs/home/bricked/default.nix | 1 - modules/home/ags/default.nix | 11 ++++++----- modules/home/ags/package.json | 8 +++++++- modules/home/bun/default.nix | 17 ----------------- modules/home/default.nix | 1 - 5 files changed, 13 insertions(+), 25 deletions(-) delete mode 100644 modules/home/bun/default.nix diff --git a/configs/home/bricked/default.nix b/configs/home/bricked/default.nix index 76b9f67..7efb52f 100644 --- a/configs/home/bricked/default.nix +++ b/configs/home/bricked/default.nix @@ -30,7 +30,6 @@ enable = true; defaultEditor = true; }; - programs.bun.enable = true; # Music programs.spotify-player.enable = true; diff --git a/modules/home/ags/default.nix b/modules/home/ags/default.nix index b891762..6a68507 100644 --- a/modules/home/ags/default.nix +++ b/modules/home/ags/default.nix @@ -16,15 +16,15 @@ in { nativeBuildInputs = with pkgs; [bun sass]; buildPhase = '' - # Copy assets - cp ${nixos-symbolic} ./assets/nixos-symbolic.svg + # Copy assets + cp ${nixos-symbolic} ./assets/nixos-symbolic.svg # Build sass sass ./style.scss style.css - # Build bun files - bun install - bun run build + # Build bun files + bun install + bun run build ''; installPhase = '' @@ -33,5 +33,6 @@ in { ''; }; }; + home.packages = with pkgs; [bun sass]; }; } diff --git a/modules/home/ags/package.json b/modules/home/ags/package.json index 7de5023..14aea38 100644 --- a/modules/home/ags/package.json +++ b/modules/home/ags/package.json @@ -10,6 +10,12 @@ }, "scripts": { "postinstall": "rm types; ln -s $HOME/.local/share/com.github.Aylur.ags/types types", - "build": "bun build ./config.ts --outfile ./config.js --external \"resource://*\" --external \"gi://*\"" + "build": "bun build:bun & bun build:sass", + "build:bun": "bun build ./config.ts --outfile ./config.js --external \"resource://*\" --external \"gi://*\"", + "build:sass": "sass style.scss:style.css", + "watch": "bun watch:bun & bun watch:sass", + "watch:bun": "bun build:bun --watch", + "watch:sass": "bun build:sass --watch", + "start": "ags --config ./config.js" } } diff --git a/modules/home/bun/default.nix b/modules/home/bun/default.nix deleted file mode 100644 index 5f7ce51..0000000 --- a/modules/home/bun/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.programs.bun; -in { - options.programs.bun = { - enable = mkEnableOption "Bun"; - }; - - config = mkIf cfg.enable { - home.packages = with pkgs; [bun]; - }; -} diff --git a/modules/home/default.nix b/modules/home/default.nix index ea201bd..88634f3 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -17,7 +17,6 @@ ./rofi ./kitty ./nixvim - ./bun ./librewolf ./fastfetch ./spotify-player