mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
Public terraform
This commit is contained in:
parent
1ab58786d8
commit
79bcde13a9
8 changed files with 108 additions and 0 deletions
27
flake.lock
generated
27
flake.lock
generated
|
|
@ -242,6 +242,32 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"minecraft": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691544427,
|
||||
"narHash": "sha256-OwVJ6hn/Yqye3sO1Z6CjdoQvVUMuielyr1Fn/Epqg7A=",
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "ab3c5557225d31e36bf447561133ef0850c7eb47",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -395,6 +421,7 @@
|
|||
"home-manager": "home-manager",
|
||||
"konawall-rs": "konawall-rs",
|
||||
"mach-nix": "mach-nix",
|
||||
"minecraft": "minecraft",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
|
|
|
|||
|
|
@ -103,6 +103,14 @@
|
|||
url = "github:Mic92/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
minecraft = {
|
||||
url = "github:Infinidoge/nix-minecraft";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "utils";
|
||||
flake-compat.follows = "flake-compat";
|
||||
};
|
||||
};
|
||||
# a bunch of modules (also arcnmx is good)
|
||||
arcexprs = {
|
||||
url = "github:arcnmx/nixexprs/master";
|
||||
|
|
|
|||
44
nixos/roles/minecraft-server.nix
Normal file
44
nixos/roles/minecraft-server.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
environmentFile = pkgs.writeText "aaaa" ''
|
||||
QUILT_LOADER_DISABLE_BEACON=true
|
||||
'';
|
||||
servers.arkamew = let
|
||||
modpack = inputs.minecraft.legacyPackages.${pkgs.system}.fetchPackwizModpack {
|
||||
url = "https://github.com/kittywitch/arka-modpack/raw/main/pack.toml";
|
||||
packHash = "sha256-5JbJvoVd+YxAS+EIFsXHuG5ZqVGxEgf2AjQOLSuG99U=";
|
||||
manifestHash = "sha256:17lg9syx1ddggyq2h8a92frg4lpr2xc7ryh30bniv9dhymr0vc23";
|
||||
side = "both";
|
||||
};
|
||||
mcVersion = modpack.manifest.versions.minecraft;
|
||||
quiltVersion = modpack.manifest.versions.quilt;
|
||||
serverVersion = lib.replaceStrings ["."] ["_"] "quilt-${mcVersion}-${quiltVersion}";
|
||||
in {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
openFirewall = true;
|
||||
whitelist = {
|
||||
katrynn = "356d8cf2-246a-4c07-b547-422aea06c0ab";
|
||||
arcnmx = "e9244315-848c-424a-b004-ae5305449fee";
|
||||
};
|
||||
serverProperties = {
|
||||
server-port = 25565;
|
||||
gamemode = 0;
|
||||
difficulty = 1;
|
||||
white-list = true;
|
||||
motd = "Kat & Abby Minecraft";
|
||||
};
|
||||
symlinks = {
|
||||
mods = "${modpack}/mods";
|
||||
};
|
||||
package = inputs.minecraft.legacyPackages.${pkgs.system}.quiltServers.${serverVersion};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
nixos/roles/public-directory.nix
Normal file
16
nixos/roles/public-directory.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{config, ...}: {
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"public.gensokyo.zone" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/kat-is-a-cute-girl" = {
|
||||
root = "/var/www/public";
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -119,6 +119,7 @@ _: let
|
|||
"pandoc"
|
||||
];
|
||||
casks = [
|
||||
"temurin"
|
||||
"barrier"
|
||||
"bitwarden"
|
||||
"mullvadvpn"
|
||||
|
|
@ -129,6 +130,7 @@ _: let
|
|||
"cyberduck"
|
||||
"spotify"
|
||||
"pycharm-ce"
|
||||
"prismlauncher"
|
||||
"element"
|
||||
"slack"
|
||||
"boop"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ _: let
|
|||
postgres-server
|
||||
matrix-homeserver
|
||||
vaultwarden-server
|
||||
minecraft-server
|
||||
monitoring-server
|
||||
public-directory
|
||||
irc-client
|
||||
]);
|
||||
|
||||
|
|
|
|||
8
tf/gensokyo-public.tf
Normal file
8
tf/gensokyo-public.tf
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
resource "cloudflare_record" "public" {
|
||||
name = "public"
|
||||
proxied = true
|
||||
ttl = 1
|
||||
type = "CNAME"
|
||||
value = "yukari.gensokyo.zone"
|
||||
zone_id = local.zone_ids.gensokyo
|
||||
}
|
||||
1
tree.nix
1
tree.nix
|
|
@ -61,6 +61,7 @@
|
|||
[
|
||||
nix-index-database.nixosModules.nix-index
|
||||
home-manager.nixosModules.home-manager
|
||||
minecraft.nixosModules.minecraft-servers
|
||||
sops-nix.nixosModules.sops
|
||||
]
|
||||
++ (with (import (inputs.arcexprs + "/modules")).nixos; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue