This commit is contained in:
암냥 2026-07-26 03:29:26 +09:00
commit f5e9b465c5
No known key found for this signature in database
4 changed files with 63 additions and 10 deletions

View file

@ -1,4 +1,12 @@
{ pkgs, inputs, ... }:
let
amiaBot = pkgs.rustPlatform.buildRustPackage {
pname = "discord-profile-widget-bot";
version = "0.1.0";
src = inputs.amiaBot;
cargoLock.lockFile = "${inputs.amiaBot}/Cargo.lock";
};
in
{
imports = [
./hardware-configuration.nix
@ -28,6 +36,28 @@
networking.firewall.enable = false;
systemd.services.amia = {
description = "Discord Profile Widget Bot";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
unitConfig.ConditionPathExists = "/home/imnyang/amia/config.toml";
serviceConfig = {
Type = "simple";
User = "imnyang";
WorkingDirectory = "/home/imnyang/amia";
UMask = "0077";
ExecStart = "${amiaBot}/bin/discord-profile-widget-bot";
Restart = "on-failure";
RestartSec = "5s";
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = false;
};
};
networking.hostName = "amia";
system.stateVersion = "26.05";
}