From bc209395723188917aae952a1ad712063f1c0be6 Mon Sep 17 00:00:00 2001 From: Bazyli Cyran Date: Thu, 19 Dec 2024 17:34:08 +0100 Subject: [PATCH] docs(readme): Document usage with Nix --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 8c6d8bb..adac669 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,38 @@ The binary named `timewall` has to be placed in directory in your `$PATH`, e.g. cargo install timewall ``` +### Nix +This repository contains a flake exposing a Nix package, `nixpkgs` overlay and a Home Manager module. +Add `timewall` input to your `flake.nix`: +```nix +inputs.timewall.url = "github:bcyran/timewall"; +``` +#### Package +```nix +environment.systemPackages = [ + inputs.timewall.packages.${pkgs.system}.timewall +]; +``` + +#### Overlay +```nix +nixpkgs.overlays = [ + inputs.timewall.overlays.default +] +environment.systemPackages = [ + pkgs.timewall +]; +``` + +#### Home Manager +```nix +home.services.timewall = { + enable = true; + wallpaperPath = ./wallpaper.jpg; # optional, can be set at runtime + config = {} # optional, see the configuration section +} +``` + ## Usage > [!IMPORTANT]