27 lines
682 B
Nix
27 lines
682 B
Nix
|
{ pkgs, lib, config, ... }:
|
||
|
|
||
|
let secret = config.age.secrets."website-secret".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";
|
||
|
};
|
||
|
}
|