this post was submitted on 08 May 2025
3 points (80.0% liked)

Nix / NixOS

2204 readers
71 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

I just want to know from you how you (or how you would) pass options to packages you develop with flakes.

I am currently writing a widget bar using Astal and then import the flake in my NixOS flake and use the package.default output in home.packages. I'd like to also style this bar according to my Stylix theme, how do you do something like this?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 4 days ago (1 children)

one thing I think that may help is creating that file during the build process

This is certainly an option, but I would only use it as a last resort as it means recompiling the project every time you want to change the theme. It's quite easily done though, you can use overrideAttrs on the package in your home-manager module to pass in the desired colors.

[โ€“] [email protected] 1 points 2 days ago

I am seeing this repo: https://github.com/Jas-SinghFSU/HyprPanel/blob/master/nix/module.nix

this uses astal to create the said interface but is also configuring the settings like how I want, except it uses json and ts for it where I have scss and lua, otherwise I just can't wrap my head around how i can translate it to my needs. Maybe I don't need to edit the files in the build, I could just edit or update the astel.scss using nix as well like how its done there using builtins and other functions, can you help me here, if you've got time.