initial commit
This commit is contained in:
93
configuration/foundryvtt/default.nix
Normal file
93
configuration/foundryvtt/default.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{ pkgs, lib, config, user, ... }:
|
||||
let fhs = (pkgs.buildFHSEnv {
|
||||
name = "node-fhs-env";
|
||||
targetPkgs = pkgs: (with pkgs; [
|
||||
libgcc.lib
|
||||
glibc_multi.out
|
||||
]);
|
||||
runScript = "${lib.getExe pkgs.nodejs_25}";
|
||||
});
|
||||
in {
|
||||
# systemd.packages = [
|
||||
# (pkgs.writeTextFile {
|
||||
# name = "foundryvtt@.service";
|
||||
# destination = "/etc/systemd/system/foundryvtt@.service";
|
||||
# text = ''
|
||||
# [Unit]
|
||||
# Description = "foundryvtt %i"
|
||||
# After=network.target
|
||||
#
|
||||
# [Service]
|
||||
# Type=simple
|
||||
# User=foundryvtt%i
|
||||
# DynamicUser=yes
|
||||
# StateDirectory=foundryvtt%i
|
||||
# ExecStart=${lib.getExe pkgs.nodejs_25} /var/lib/foundryvtt%i/foundryvtt/main.js --dataPath=/var/lib/foundryvtt%i/foundrydata --port=3000%i
|
||||
# Restart=on-failure
|
||||
# RestartSec=30
|
||||
#
|
||||
# [Install]
|
||||
# WantedBy=default.target
|
||||
# '';
|
||||
# })
|
||||
# ];
|
||||
# security.acme.certs."${config.domainName}".extraDomainNames = [ "foundry.${config.domainName}" ];
|
||||
# services.nginx.virtualHosts."foundry.${config.domainName}" = {
|
||||
# useACMEHost = config.domainName;
|
||||
# addSSL = true;
|
||||
# locations."/".proxyPass = "http://localhost:30000";
|
||||
# };
|
||||
security.acme.certs."${config.domainName}".extraDomainNames = [
|
||||
"mitchskeller.${config.domainName}"
|
||||
"inferno.${config.domainName}"
|
||||
"nixland.${config.domainName}"
|
||||
];
|
||||
services.nginx.virtualHosts."mitchskeller.${config.domainName}" = {
|
||||
useACMEHost = config.domainName;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
# make sure websocket connection is forwarded
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
'';
|
||||
proxyPass = "http://localhost:30000";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."inferno.${config.domainName}" = {
|
||||
useACMEHost = config.domainName;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
# make sure websocket connection is forwarded
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
'';
|
||||
proxyPass = "http://localhost:30001";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."nixland.${config.domainName}" = {
|
||||
useACMEHost = config.domainName;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
# make sure websocket connection is forwarded
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
'';
|
||||
proxyPass = "http://localhost:30002";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
users.users.${user}.extraGroups = [ "docker" ];
|
||||
|
||||
users.users.foundry = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
group = "${user}";
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
./mitch.pub
|
||||
] ++ config.users.users.${user}.openssh.authorizedKeys.keyFiles;
|
||||
};
|
||||
}
|
||||
1
configuration/foundryvtt/mitch.pub
Normal file
1
configuration/foundryvtt/mitch.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBvSPgHhppL0aKGIPJlpu6oWgQ5yEsBYyRExp9J5ofTc michi@Mitch-Rechner
|
||||
10
configuration/foundryvtt/package.nix
Normal file
10
configuration/foundryvtt/package.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ lib
|
||||
, stdenvNoCC
|
||||
, unzip
|
||||
}: stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "foundryvtt";
|
||||
version = "14.360";
|
||||
src = ./FoundryVTT-Node-14.360.zip;
|
||||
unpackPhase = "${lib.getExe unzip} $src";
|
||||
buildPhase = "cp -r . $out";
|
||||
})
|
||||
Reference in New Issue
Block a user