diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-02-18 22:03:26 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-02-18 22:03:46 -0500 |
| commit | 0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b (patch) | |
| tree | c2daf12b24a85cdfd00ba6b4800a8db311ef5221 /pkgs/astal/default.nix | |
| parent | update commit more (fix thinkpad) (diff) | |
| download | dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.tar.gz dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.tar.bz2 dotfiles-nix-0cf4bac8d8b5a6b3ecf914f14663cb00d4cb235b.zip | |
Diffstat (limited to 'pkgs/astal/default.nix')
| -rw-r--r-- | pkgs/astal/default.nix | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/pkgs/astal/default.nix b/pkgs/astal/default.nix index dc8f2a7..d076f07 100644 --- a/pkgs/astal/default.nix +++ b/pkgs/astal/default.nix @@ -1,32 +1,29 @@ { - pkgs, - stdenv, - inputs, - options, + astal, + callPackage, + dart-sass, + networkmanager, + runCommand, + writeShellApplication, + # System theme must be passed in + theme ? null, ... }: let - inherit (pkgs) runCommand dart-sass; - - apkgs = inputs.astal.packages.${stdenv.hostPlatform.system}; - scss = "${dart-sass}/bin/sass"; - theme = import ./theme.nix {inherit options;}; - + vars = import ./theme.nix {inherit theme;}; mkAstal = file: - import ./builder.nix { - inherit pkgs; - astal = inputs.astal; + callPackage ./builder.nix { src = runCommand "src" {} '' mkdir -p $out cp -r ${./src}/{*.lua,widget} $out/ cp $out/${file}.lua $out/init.lua cp -r ${./src}/style/* . - echo '${theme}' > theme.scss + echo '${vars}' > theme.scss cat theme.scss style.scss widget/* > main.scss - ${scss} main.scss $out/main.css + ${dart-sass}/bin/sass main.scss $out/main.css ''; name = "astal-${file}"; extraPackages = - (with apkgs; [ + (with astal; [ apps battery hyprland @@ -36,15 +33,15 @@ tray wireplumber ]) - ++ (with pkgs; [ + ++ [ networkmanager - ]); + ]; }; mkAstalWrapper = file: let pkg = mkAstal file; in - pkgs.writeShellApplication { + writeShellApplication { name = "astal-${file}"; text = '' ${pkg}/bin/astal-${file} |