Compare commits

..

10 commits

8 changed files with 201 additions and 3 deletions

View file

@ -34,6 +34,22 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
@ -49,6 +65,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -231,6 +265,26 @@
"type": "github" "type": "github"
} }
}, },
"nix-minecraft": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1723685111,
"narHash": "sha256-vQiq7jAdF1ePFJjk67jYCpJagi1zzKGiyR3hHPrabzE=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "e13ed71bc4b9625e4b2779f328cb103b86c84da4",
"type": "github"
},
"original": {
"owner": "Infinidoge",
"repo": "nix-minecraft",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1723175592,
@ -248,6 +302,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1723362943, "lastModified": 1723362943,
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=", "narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
@ -267,13 +337,14 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs_2", "nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_3",
"spicetify-nix": "spicetify-nix" "spicetify-nix": "spicetify-nix"
} }
}, },
"spicetify-nix": { "spicetify-nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -307,6 +378,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",

View file

@ -15,6 +15,8 @@
}; };
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
}; };
outputs = outputs =

View file

@ -23,7 +23,9 @@ in
# Include service configuration # Include service configuration
./services/archi.nix ./services/archi.nix
./services/caddy.nix ./services/caddy.nix
./services/forgejo.nix
./services/jellyfin.nix ./services/jellyfin.nix
./services/minecraft
]; ];
# Enable experimental features # Enable experimental features
@ -125,6 +127,7 @@ in
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
24454 # Minecraft Simple Voice Chat
2626 # Dolphin emulator 2626 # Dolphin emulator
27015 # Source games 27015 # Source games
28910 # Heretic II 28910 # Heretic II
@ -168,6 +171,7 @@ in
"docker" "docker"
"gamemode" "gamemode"
"libvirtd" "libvirtd"
"minecraft"
"networkmanager" "networkmanager"
"openrazer" "openrazer"
"postgresql" "postgresql"
@ -305,7 +309,10 @@ in
}; };
# Enable Thunar and it's dependencies # Enable Thunar and it's dependencies
programs.thunar.enable = true; programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin ];
};
programs.xfconf.enable = true; # For configuring programs.xfconf.enable = true; # For configuring
services.gvfs.enable = true; # For mounting drives, trash, etc. services.gvfs.enable = true; # For mounting drives, trash, etc.
services.tumbler.enable = true; # Thumbnail support services.tumbler.enable = true; # Thumbnail support

View file

@ -25,5 +25,18 @@
flush_interval -1 flush_interval -1
} }
''; '';
virtualHosts."map.thewizard.link".extraConfig = ''
reverse_proxy 192.168.0.100:8123
'';
virtualHosts."git.thewizard.link".extraConfig = ''
reverse_proxy 127.0.0.1:3788
'';
virtualHosts."files.thewizard.link".extraConfig = ''
root * /srv/files
file_server
'';
}; };
} }

15
services/forgejo.nix Normal file
View file

@ -0,0 +1,15 @@
{
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
server = {
DISABLE_REGISTRATION = true;
HTTP_PORT = 3788;
ROOT_URL = "https://git.thewizard.link";
};
};
};
}

View file

@ -1,8 +1,27 @@
{ pkgs, ... }:
{ {
services.jellyfin = { services.jellyfin = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
user = "wizardlink"; user = "wizardlink";
package = pkgs.jellyfin.override {
jellyfin-web = pkgs.jellyfin-web.overrideAttrs (
final: prev: {
installPhase = ''
runHook preInstall
# Inject the skip intro button script.
sed -i "s#</head>#<script src=\"configurationpage?name=skip-intro-button.js\"></script></head>#" dist/index.html
mkdir -p $out/share
cp -a dist $out/share/jellyfin-web
runHook postInstall
'';
}
);
};
}; };
services.jellyseerr = { services.jellyseerr = {

View file

@ -0,0 +1,49 @@
{ pkgs, nix-minecraft, ... }:
let
modpack = pkgs.fetchPackwizModpack {
url = "http://files.thewizard.link/minecraft/pack.toml";
packHash = "sha256-oBCLVNLaBwF7Nv1PMEzNmzSv6khcRIOLfOX9chZPI+Y=";
};
in
{
imports = [ nix-minecraft.nixosModules.minecraft-servers ];
nixpkgs.overlays = [ nix-minecraft.overlay ];
# Needed to package modpacks.
environment.systemPackages = [ pkgs.packwiz ];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
servers = {
silly-pack = {
enable = true;
package = pkgs.fabricServers.fabric-1_20_1.override { loaderVersion = "0.15.11"; };
autoStart = true;
jvmOpts = "-Xms512M -Xmx10112M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=4M -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50";
serverProperties = {
allow-flight = true;
difficulty = "normal";
enforce-secure-profile = true;
level-name = "horror";
motd = "\\u00A70Ready to run?\\u00A7r";
pvp = true;
resource-pack = "https://cdn.modrinth.com/data/p1WH6sHr/versions/3lQn31SZ/From-The-Fog-1.20.5-1.20.6-v1.9.3-Data-Resource-Pack.zip";
server-ip = "192.168.0.100";
server-port = 25565;
view-distance = 16;
};
symlinks = {
mods = "${modpack}/mods";
"ops.json" = ./ops.json;
};
};
};
};
}

View file

@ -0,0 +1,7 @@
[
{
"uuid": "55a58451-8fe9-4dfe-8011-1509e948e7a6",
"name": "WizardlinK",
"level": 4
}
]