Skip to content

Instantly share code, notes, and snippets.

@ihaveamac
Created January 9, 2024 17:40
Show Gist options
  • Save ihaveamac/c22bb7e92b11a93634b7af40526cb8cd to your computer and use it in GitHub Desktop.
Save ihaveamac/c22bb7e92b11a93634b7af40526cb8cd to your computer and use it in GitHub Desktop.
{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "lnshot";
version = "v0.1.3";
src = fetchFromGitHub {
owner = "ticky";
repo = pname;
rev = version;
hash = "sha256-RkeLA1ieuDCJueDxgifef52yJr+DGCEMOAQ3hn9DieA=";
};
cargoHash = "sha256-9G55NliADKIr9UhvZXYhsM5LBAPkZ0+5akJH4UWY9ZI=";
}
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.lnshot;
lnshot = pkgs.callPackage ./deriv-lnshot.nix {};
in
{
options.services.lnshot = {
enable = mkEnableOption "lnshot service";
};
config = mkIf cfg.enable {
home.packages = [ lnshot ];
systemd.user.services.lnshot = {
Unit = {
Description = "Steam Screenshot Symlinking Service";
};
Service = {
ExecStart = "${lnshot}/bin/lnshot daemon";
Restart = "always";
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment