From 2dba9ee088125d3c4a9ba73f6e2071daade03943 Mon Sep 17 00:00:00 2001 From: Sveske_Juice Date: Mon, 7 Apr 2025 16:51:15 +0200 Subject: [PATCH] Example flake readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index eb77281..b472299 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,34 @@ Users, Libraries, Plugins, Settings, etc. - [x] Nix options - [ ] Branding - [ ] Nix options + +# Usage +## Setup +Add the flake to your `inputs` and import the `nixosModule` in your configuration. + +Example minimal flake.nix: +```nix +{ + description = "An example using declarative-jellyfin flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + declarative-jellyfin.url = "gitlab:SpoodyTheOne/declarative-jellyfin"; + # optional follow: + declarative-jellyfin.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { + nixpkgs, + declarative-jellyfin, + ... + }: { + nixosConfigurations."your-hostname" = nixpkgs.lib.nixosSystem { + modules = [ + declarative-jellyfin.nixosModules.default # <- this imports the NixOS module that provides the options + ./configuration.nix # <- your host entrypoint + ]; + }; + }; +} +```