Added a flake for Trayscale as the nix package wasnt working
This commit is contained in:
45
flake.nix
45
flake.nix
@ -3,26 +3,67 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
#zen-browser.url = "github:MarceColl/zen-browser-flake";
|
||||
zen-browser.url = "github:youwen5/zen-browser-flake";
|
||||
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
grub2-themes = { url = "github:vinceliuice/grub2-themes"; };
|
||||
|
||||
trayscale-src = {
|
||||
url = "github:DeedleFake/trayscale/v0.18.3";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, zen-browser, grub2-themes, ... }:
|
||||
outputs = inputs@{ nixpkgs, home-manager, zen-browser, grub2-themes, trayscale-src, ... }:
|
||||
let
|
||||
username = "cookiez";
|
||||
version = "25.05";
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
trayscale-flake = pkgs.buildGoModule {
|
||||
pname = "trayscale-flake";
|
||||
version = "0.18.3";
|
||||
src = trayscale-src;
|
||||
vendorHash = "sha256-8Um5Ps1EEVShJEeCRkGE3pJi2/5PxgEVNqq3JsKdivA=";
|
||||
|
||||
# Trayscale uses gotk4 → needs pkg-config, GTK4, libadwaita, etc.
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
pkgs.wrapGAppsHook4
|
||||
];
|
||||
buildInputs = [
|
||||
pkgs.gtk4
|
||||
pkgs.libadwaita
|
||||
pkgs.gobject-introspection
|
||||
pkgs.gdk-pixbuf
|
||||
pkgs.glib
|
||||
pkgs.cairo
|
||||
pkgs.pango
|
||||
pkgs.harfbuzz
|
||||
pkgs.librsvg
|
||||
];
|
||||
|
||||
# gotk4 uses cgo
|
||||
env.CGO_ENABLED = 1;
|
||||
|
||||
# Only build the actual app binary
|
||||
subPackages = [ "cmd/trayscale" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
#Replace the below with your hostname!!! Like: {hostname} = nixpkgs.lib.nixosSystem {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs username version;
|
||||
trayscale-flake = trayscale-flake;
|
||||
};
|
||||
modules = [
|
||||
./configuration.nix
|
||||
|
||||
Reference in New Issue
Block a user