Good morning,
does someone have an guide for how I can create an package for NixOS? I'm currently scripting my configuration for the plasma-manager and have seen, that my themes are not packaged.

I'm a beginner at NixOS btw. ;)

#NixOS #nixpkgs #nixosflakes

@liamthexpl0rer the official wiki, the nixpkgs repo for examples and a lot of trying is what I used

@IncredibleLaser The official wiki is hard to understand sometimes. I hope, that someone wrote an easy guide to understand how this process works.

Git Repos will also help for understanding, but I have seen, that KDE themes are packaged in different ways.

@liamthexpl0rer I looked at a random theme and it doesn't look to difficult tbh

https://github.com/NixOS/nixpkgs/blob/nixos-25.11/pkgs/by-name/pl/plasma-overdose-kde-theme/package.nix it looks pretty straightforward, I don't know what your theme does but it seems you just need to ensure the theme files are in their respective directory under $out/share

nixpkgs/pkgs/by-name/pl/plasma-overdose-kde-theme/package.nix at nixos-25.11 ยท NixOS/nixpkgs

Nix Packages collection & NixOS. Contribute to NixOS/nixpkgs development by creating an account on GitHub.

GitHub

@liamthexpl0rer Often the guides on https://nix.dev/ are useful, and the nixpkgs manual is also quite extensive.

For packaging in particular I often look into the sources of nixpkgs to find something similar and use that as a starting point.

Welcome to nix.dev โ€” nix.dev documentation

Official documentation for getting things done with Nix.

@liamthexpl0rer https://nix.dev/tutorials/packaging-existing-software is a good guide-level intro. You'll most definitely need to look into how existing Plasma themes are packaged in nixpkgs after that ๐Ÿ™‚
Packaging existing software with Nix โ€” nix.dev documentation

Packaging Existing Software With Nix