refactor!: restructure and document configuration
This commit is contained in:
parent
4a02e072a7
commit
f87f9995be
126 changed files with 957 additions and 590 deletions
10
hosts/wizdesk/services/home-manager/default.nix
Normal file
10
hosts/wizdesk/services/home-manager/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gakuen-cosplay-api.nix
|
||||
./hydractify-bot.nix
|
||||
./openttd.nix
|
||||
./terraria.nix
|
||||
];
|
||||
}
|
16
hosts/wizdesk/services/home-manager/gakuen-cosplay-api.nix
Normal file
16
hosts/wizdesk/services/home-manager/gakuen-cosplay-api.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ gakuen-cosplay, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.gakuen-cosplay-api = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit.Description = "Gakuen Cosplay API";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${gakuen-cosplay.packages.${pkgs.system}.backend}/bin/cosplayer_submission";
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
WorkingDirectory = "/mnt/internal/shared/work/gakuen/projects/cosplayer_submission/packages/backend";
|
||||
};
|
||||
};
|
||||
}
|
17
hosts/wizdesk/services/home-manager/hydractify-bot.nix
Normal file
17
hosts/wizdesk/services/home-manager/hydractify-bot.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ hydractify-bot, pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.hydractify-bot = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit.Description = "Hydractify bot";
|
||||
Unit.After = "postgresql.service";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${hydractify-bot.defaultPackage.${pkgs.system}}/bin/hydractify";
|
||||
Restart = "on-failure";
|
||||
Type = "simple";
|
||||
WorkingDirectory = "/mnt/internal/hydractify/GitHub/hydractify";
|
||||
};
|
||||
};
|
||||
}
|
53
hosts/wizdesk/services/home-manager/openttd.nix
Normal file
53
hosts/wizdesk/services/home-manager/openttd.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
openttd
|
||||
];
|
||||
|
||||
systemd.user.services.openttd = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit.Description = "OpenTTD Tmux server";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L openttd new -s OpenTTD -d '${pkgs.openttd}/bin/openttd -g /home/wizardlink/.local/share/openttd/save/hyfy.sav -D'";
|
||||
ExecStop = "${pkgs.tmux}/bin/tmux kill-session -t OpenTTD";
|
||||
Restart = "on-failure";
|
||||
Type = "forking";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.openttd-rcon = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit = {
|
||||
Description = "OpenTTD RCON Password set";
|
||||
After = [ "openttd.service" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L openttd send-keys -t OpenTTD 'rcon_pw aaaa' Enter";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.openttd-save = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit = {
|
||||
Description = "OpenTTD RCON Password set";
|
||||
After = [ "openttd.service" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L openttd send-keys -t OpenTTD 'save hyfy' Enter";
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = "1800s";
|
||||
};
|
||||
};
|
||||
}
|
17
hosts/wizdesk/services/home-manager/terraria.nix
Normal file
17
hosts/wizdesk/services/home-manager/terraria.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services.terraria = {
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
|
||||
Unit.Description = "Terraria TMUX Server";
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tmux}/bin/tmux -L terraria new -s Terraria -d /etc/profiles/per-user/wizardlink/bin/fhs -c 'dotnet ./tModLoader.dll -server -config serverconfig.txt'";
|
||||
ExecStop = "${pkgs.tmux}/bin/tmux kill-session -t Terraria";
|
||||
Restart = "on-failure";
|
||||
Type = "forking";
|
||||
WorkingDirectory = "/mnt/ssd/SteamLibrary/steamapps/common/tModLoader";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue