wow
This commit is contained in:
parent
8949ca3599
commit
f5e9b465c5
4 changed files with 63 additions and 10 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue