Created
January 9, 2024 17:40
-
-
Save ihaveamac/c22bb7e92b11a93634b7af40526cb8cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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="; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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