mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
readme: document non-flake nixos usage
This commit is contained in:
parent
f32c447cf7
commit
231b6625ee
29
README.md
29
README.md
|
@ -2264,7 +2264,7 @@ some recommended dependencies are enabled by default; [override the package](htt
|
||||||
|
|
||||||
## nixos module
|
## nixos module
|
||||||
|
|
||||||
for this setup, you will need a [flake-enabled](https://nixos.wiki/wiki/Flakes) installation of NixOS.
|
for [flake-enabled](https://nixos.wiki/wiki/Flakes) installations of NixOS:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
|
@ -2291,6 +2291,33 @@ for this setup, you will need a [flake-enabled](https://nixos.wiki/wiki/Flakes)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
if you don't use a flake in your configuration, you can use other dependency management tools like [npins](https://github.com/andir/npins), [niv](https://github.com/nmattia/niv), or even plain [`fetchTarball`](https://nix.dev/manual/nix/stable/language/builtins#builtins-fetchTarball), like so:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# npins example, adjust for your setup. copyparty should be a path to the downloaded repo
|
||||||
|
# for niv, just replace the npins folder import with the sources.nix file
|
||||||
|
copyparty = (import ./npins).copyparty;
|
||||||
|
|
||||||
|
# or with fetchTarball:
|
||||||
|
copyparty = fetchTarball "https://github.com/9001/copyparty/archive/hovudstraum.tar.gz";
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
# load the copyparty NixOS module
|
||||||
|
imports = [ "${copyparty}/contrib/nixos/modules/copyparty.nix" ];
|
||||||
|
|
||||||
|
# add the copyparty overlay to expose the package to the module
|
||||||
|
nixpkgs.overlays = [ "${copyparty}/contrib/package/nix/overlay.nix" ];
|
||||||
|
# (optional) install the package globally
|
||||||
|
environment.systemPackages = [ pkgs.copyparty ];
|
||||||
|
# configure the copyparty module
|
||||||
|
services.copyparty.enable = true;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
copyparty on NixOS is configured via `services.copyparty` options, for example:
|
copyparty on NixOS is configured via `services.copyparty` options, for example:
|
||||||
```nix
|
```nix
|
||||||
services.copyparty = {
|
services.copyparty = {
|
||||||
|
|
Loading…
Reference in a new issue