Added a flake for Trayscale as the nix package wasnt working

This commit is contained in:
2025-08-13 15:30:52 +02:00
parent 3255b199db
commit 726cef8682
4 changed files with 78 additions and 15 deletions

42
flake.lock generated
View File

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1734412921,
"narHash": "sha256-JeMqc7lLowKn6klrCcOkcOg38yNqF7MPbN4Elh6Xvq0=",
"lastModified": 1755072091,
"narHash": "sha256-FCkbELHIFXlVREaopW13QFMzwLPr/otjucmyNLQQXeg=",
"owner": "vinceliuice",
"repo": "grub2-themes",
"rev": "f6ab2438e124f60a340a526543e498e5e33b3c53",
"rev": "03d8c9cf0d1bcf67765ac5fa35263f1b08c584fa",
"type": "github"
},
"original": {
@ -41,11 +41,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1747299480,
"narHash": "sha256-jh2mqZ//3dul63Hdc/xm0elMv3lBd3WH0Z9YTDM+PJU=",
"lastModified": 1755078863,
"narHash": "sha256-MSuCDQ6DILKqN32IIvBGn+A1n/rJgTFpJUavD7U2S1g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a7b6b1ea1abb5f0b630bd9a1765bdb99ae19c313",
"rev": "21c4ea195f7ba00d2211379cd8af83bf242a638c",
"type": "github"
},
"original": {
@ -57,11 +57,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1753489912,
"narHash": "sha256-uDCFHeXdRIgJpYmtcUxGEsZ+hYlLPBhR83fdU+vbC1s=",
"lastModified": 1754937576,
"narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "13e8d35b7d6028b7198f8186bc0347c6abaa2701",
"rev": "ddae11e58c0c345bf66efbddbf2192ed0e58f896",
"type": "github"
},
"original": {
@ -76,9 +76,27 @@
"grub2-themes": "grub2-themes",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"trayscale-src": "trayscale-src",
"zen-browser": "zen-browser"
}
},
"trayscale-src": {
"flake": false,
"locked": {
"lastModified": 1754401603,
"narHash": "sha256-rk4JfK0wBvWLis9XvaZuwAoMyLfoySt3SHLJChYl0SE=",
"owner": "DeedleFake",
"repo": "trayscale",
"rev": "16e99fbe859bf8316977640bdc8c5e0679b5ab85",
"type": "github"
},
"original": {
"owner": "DeedleFake",
"ref": "v0.18.3",
"repo": "trayscale",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [
@ -86,11 +104,11 @@
]
},
"locked": {
"lastModified": 1747282003,
"narHash": "sha256-UlCfXNncIYwUvPxHngoH6pY4fiZlU8Z2Ve/gUEn6h+o=",
"lastModified": 1754886070,
"narHash": "sha256-MZDmxOkVKL1HY72bliN8Gxh0SYkHUa3W/1fTU2ke36I=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "952ca99903f19a7096a3709f2938d9c7840a5f91",
"rev": "e37d2b326311320c8571111b3ef89b29d26d4b64",
"type": "github"
},
"original": {

View File

@ -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

View File

@ -29,6 +29,9 @@ alias nix-aliases="sudoedit /etc/nixos/other/aliases"
alias nix-edit-aliases="sudoedit /etc/nixos/other/aliases"
alias nix-regenerate-config="sudo nixos-generate-config"
alias nix-home="echo To edit home manager run command \'home-edit\'"
alias nix-gc="sudo nix-store --gc"
alias nix-clean="sudo nix-store --gc"
alias nix-clear="sudo nix-store --gc"
alias home-edit="sudoedit /etc/nixos/home.nix"
alias home-upd="home-manager switch"
alias home-update="home-manager switch"

View File

@ -1,4 +1,4 @@
{config, pkgs, libs, inputs, ...}:
{config, pkgs, libs, inputs, trayscale-flake, ...}:
{
environment.systemPackages = with pkgs;
[
@ -48,6 +48,7 @@
#putty Need to find alternative as it sucks on linux
mission-center
trayscale
#trayscale-flake
spotify
rpi-imager
kdePackages.yakuake