26 lines
675 B
Nix
26 lines
675 B
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
let secret = config.age.secrets."website".path;
|
|
website = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "website";
|
|
version = "1.0.0";
|
|
cargoSha256 = "sha256-sT5BONGXWCpc+455TS1rc/SwNUtc6hXbwUMO/q/tiJ0=";
|
|
|
|
postPatch = ''
|
|
cp ${secret} secret
|
|
'';
|
|
|
|
src = pkgs.fetchgit {
|
|
url = "https://im.badat.dev/riley/website.git";
|
|
rev = "refs/heads/mistress";
|
|
sha256 = "sha256-NiFinpSOE1wokOgBmgpZfMqR9AsENA9t/N84c/Ms2vU=";
|
|
};
|
|
};
|
|
in {
|
|
systemd.services."website" = {
|
|
enable = true;
|
|
description = "Run my website :)";
|
|
path = [ website ];
|
|
script = "${website}/bin/website";
|
|
};
|
|
}
|