2026-05-14 12:27:42 +02:00
|
|
|
# Linux Utils
|
2025-03-02 17:38:00 +01:00
|
|
|
|
2025-03-03 13:02:11 +01:00
|
|
|
## Description
|
|
|
|
|
|
2026-05-14 12:27:42 +02:00
|
|
|
A packaged assortment of helpers for Arch Linux and NixOS.
|
2025-03-02 19:46:18 +01:00
|
|
|
|
2025-03-04 13:13:22 +01:00
|
|
|
## Structure
|
|
|
|
|
|
2026-05-14 12:27:42 +02:00
|
|
|
`PKGBUILD`
|
|
|
|
|
|
|
|
|
|
- Coming soon.
|
|
|
|
|
|
2025-03-04 13:55:02 +01:00
|
|
|
`nixos-module.nix`
|
2025-03-04 13:13:22 +01:00
|
|
|
|
2025-03-04 13:55:02 +01:00
|
|
|
- The top-level NixOS module containing all package expressions as an overlay, and all package modules.
|
2026-05-14 12:27:42 +02:00
|
|
|
Once imported the overlay contents can be found under `pkgs`.
|
2025-03-04 13:13:22 +01:00
|
|
|
|
2026-05-14 12:27:42 +02:00
|
|
|
`<util-name>/package.nix`
|
2025-03-04 13:55:02 +01:00
|
|
|
|
|
|
|
|
- A Nix package expression.
|
|
|
|
|
|
2026-05-14 12:27:42 +02:00
|
|
|
`<util-name>/nixos-module.nix`
|
2025-03-04 13:55:02 +01:00
|
|
|
|
|
|
|
|
- NixOS module providing additional features for the package in question, such as for example systemd units.
|
|
|
|
|
Can be imported directly, but is also imported by the top-level module.
|
|
|
|
|
Not present for all packages.
|
2025-03-04 13:13:22 +01:00
|
|
|
|
2026-05-14 12:27:42 +02:00
|
|
|
## Usage examples
|
2025-03-03 13:02:11 +01:00
|
|
|
|
|
|
|
|
> **Note:**
|
|
|
|
|
> You should replace the commits here with the latest one, or whichever one you want to use.
|
|
|
|
|
> The hashes will of course differ.
|
2025-03-03 12:58:27 +01:00
|
|
|
|
2025-03-04 13:20:42 +01:00
|
|
|
Using the top-level NixOS module:
|
2025-03-03 12:58:27 +01:00
|
|
|
|
|
|
|
|
```nix
|
|
|
|
|
imports = [
|
2026-04-29 16:09:15 +02:00
|
|
|
(fetchTarball {
|
|
|
|
|
url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/archive/f91196c8a4a3ba6953c85b94ea75dee5e331548f.tar.gz";
|
|
|
|
|
sha256 = "sha256:1wx7ljabgndandcd11jmr590jfpkhs55mqrgksf24ji90m37wpq0";
|
|
|
|
|
} + "/nixos-module.nix")
|
|
|
|
|
];
|
2025-03-03 12:58:27 +01:00
|
|
|
```
|
2025-03-04 13:20:42 +01:00
|
|
|
|
|
|
|
|
Using a specific package expression:
|
|
|
|
|
|
|
|
|
|
```nix
|
2026-04-29 16:09:15 +02:00
|
|
|
pkgs.callPackage (import (pkgs.fetchurl {
|
2026-05-14 12:27:42 +02:00
|
|
|
url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/raw/commit/c45884c66f31f8d8d80866bebc13e9e963e02a70/python3.11-django-imagekit/package.nix";
|
2026-04-29 16:09:15 +02:00
|
|
|
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
|
|
|
|
|
})) {}
|
2025-03-04 13:20:42 +01:00
|
|
|
```
|