add minecraft to fourside

This commit is contained in:
Swarsel 2024-02-19 20:53:28 +01:00
parent abfa84e9aa
commit fda648a01f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
4 changed files with 107 additions and 263 deletions

230
Nix.org
View file

@ -1291,61 +1291,80 @@ New setup for the SP3, this time using NixOS - another machine will take over th
#+begin_src nix :noweb yes :tangle profiles/fourside/nixos.nix #+begin_src nix :noweb yes :tangle profiles/fourside/nixos.nix
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
{ {
<<wrap>> <<wrap>>
services = { services = {
getty.autologinUser = "swarsel"; getty.autologinUser = "swarsel";
greetd.settings.initial_session.user="swarsel"; greetd.settings.initial_session.user="swarsel";
}; };
boot = { boot = {
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
}; };
networking.hostName = "fourside"; # Define your hostname. networking.hostName = "fourside"; # Define your hostname.
networking.firewall.enable = false; networking.firewall.enable = false;
stylix.image = ../../wallpaper/lenovowp.png; stylix.image = ../../wallpaper/lenovowp.png;
<<theme>> <<theme>>
hardware = { hardware = {
opengl = { opengl = {
enable = true; enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
vulkan-loader vulkan-loader
vulkan-validation-layers vulkan-validation-layers
vulkan-extension-layer vulkan-extension-layer
];
};
bluetooth.enable = true;
};
# Configure keymap in X11 (only used for login)
services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
};
users.users.swarsel = {
isNormalUser = true;
description = "Leon S";
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
packages = with pkgs; [];
};
environment.systemPackages = with pkgs; [
]; ];
};
bluetooth.enable = true;
};
system.stateVersion = "23.05"; # Configure keymap in X11 (only used for login)
services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
};
} users.users.swarsel = {
isNormalUser = true;
description = "Leon S";
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
packages = with pkgs; [];
};
environment.systemPackages = with pkgs; [
temurin-bin-17
(prismlauncher.override {
glfw = (let
mcWaylandPatchRepo = fetchFromGitHub {
owner = "Admicos";
repo = "minecraft-wayland";
rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867";
sha256 =
"sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE=";
};
mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}")
(lib.naturalSort (builtins.attrNames (lib.filterAttrs
(name: type:
type == "regular" && lib.hasSuffix ".patch" name)
(builtins.readDir mcWaylandPatchRepo))));
in glfw-wayland.overrideAttrs (previousAttrs: {
patches = previousAttrs.patches ++ mcWaylandPatches;
}));})
];
system.stateVersion = "23.05";
}
#+end_src #+end_src
@ -1709,48 +1728,6 @@ In the long run, I am thinking about a transition to kubernetes or using just a
}; };
}; };
# "sound.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "https://192.168.2.13";
# extraConfig = ''
# client_max_body_size 0;
# '';
# };
# };
# };
# "sound.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "http://192.168.2.13:4040";
# recommendedProxySettings = false;
# # proxyWebsockets = true;
# extraConfig = ''
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "Upgrade";
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto https;
# proxy_set_header X-Forwarded-Host $host;
# proxy_set_header X-Forwarded-Port $server_port;
# proxy_set_header Host $host;
# proxy_max_temp_file_size 0;
# proxy_redirect http:// https://;
# proxy_buffering off;
# proxy_request_buffering off;
# client_max_body_size 0;
# '';
# };
# };
# };
"sound.swarsel.win" = { "sound.swarsel.win" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@ -1827,20 +1804,6 @@ In the long run, I am thinking about a transition to kubernetes or using just a
}; };
}; };
# "books.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "http://192.168.2.22:8083";
# extraConfig = ''
# client_max_body_size 0;
# '';
# };
# };
# };
"blog.swarsel.win" = { "blog.swarsel.win" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@ -1858,10 +1821,6 @@ In the long run, I am thinking about a transition to kubernetes or using just a
}; };
}; };
} }
#+end_src #+end_src
@ -3660,118 +3619,83 @@ It is very convenient to have SSH aliases in place for machines that I use. This
extraConfig = "SetEnv TERM=xterm-256color"; extraConfig = "SetEnv TERM=xterm-256color";
matchBlocks = { matchBlocks = {
"nginx" = { "nginx" = {
hostname = "192.168.2.14"; hostname = "192.168.1.14";
port = 22;
user = "root"; user = "root";
}; };
"jellyfin" = { "jellyfin" = {
hostname = "192.168.2.16"; hostname = "192.168.1.16";
port = 22;
user = "root"; user = "root";
}; };
"pfsense" = { "pfsense" = {
hostname = "192.168.1.1"; hostname = "192.168.1.1";
port = 22;
user = "root"; user = "root";
}; };
"proxmox" = { "proxmox" = {
hostname = "192.168.1.2"; hostname = "192.168.1.2";
port = 22;
user = "root"; user = "root";
}; };
"transmission" = { "transmission" = {
hostname = "192.168.1.6"; hostname = "192.168.1.6";
port = 22;
user = "root"; user = "root";
}; };
"fetcher" = { "fetcher" = {
hostname = "192.168.1.192"; hostname = "192.168.1.7";
port = 22;
user = "root"; user = "root";
}; };
"omv" = { "omv" = {
hostname = "192.168.1.3"; hostname = "192.168.1.3";
port = 22;
user = "root"; user = "root";
}; };
"webbot" = { "webbot" = {
hostname = "192.168.1.11"; hostname = "192.168.1.11";
port = 22;
user = "root";
};
"plex" = {
hostname = "192.168.1.16";
port = 22;
user = "root"; user = "root";
}; };
"nextcloud" = { "nextcloud" = {
hostname = "192.168.2.5"; hostname = "192.168.1.5";
port = 22;
user = "root"; user = "root";
}; };
"subsonic" = { "sound" = {
hostname = "192.168.2.13"; hostname = "192.168.1.13";
port = 22;
user = "root"; user = "root";
}; };
"spotify" = { "spotify" = {
hostname = "192.168.1.17"; hostname = "192.168.1.17";
port = 22;
user = "root"; user = "root";
}; };
"wordpress" = { "wordpress" = {
hostname = "192.168.2.7"; hostname = "192.168.1.9";
port = 22;
user = "root"; user = "root";
}; };
"turn" = { "turn" = {
hostname = "192.168.2.17"; hostname = "192.168.1.18";
port = 22;
user = "root"; user = "root";
}; };
"hugo" = { "hugo" = {
hostname = "192.168.2.19"; hostname = "192.168.1.19";
port = 22;
user = "root"; user = "root";
}; };
"matrix" = { "matrix" = {
hostname = "192.168.2.20"; hostname = "192.168.1.23";
port = 22;
user = "root"; user = "root";
}; };
"matrix2" = { "scroll" = {
hostname = "192.168.2.20"; hostname = "192.168.1.22";
port = 22;
user = "root";
};
"database" = {
hostname = "192.168.2.21";
port = 22;
user = "root"; user = "root";
}; };
"minecraft" = { "minecraft" = {
hostname = "130.61.119.129"; hostname = "130.61.119.129";
port = 22;
user = "opc"; user = "opc";
}; };
"sync" = { "sync" = {
hostname = "193.122.53.173"; hostname = "193.122.53.173";
port = 22;
user = "root"; #this is a oracle vm server but needs root due to nixos-infect user = "root"; #this is a oracle vm server but needs root due to nixos-infect
}; };
"pkv" = { "pkv" = {
hostname = "46.232.248.161"; hostname = "46.232.248.161";
port = 22;
user = "root";
};
"calibre" = {
hostname = "192.168.2.22";
port = 22;
user = "root"; user = "root";
}; };
"nebula" = { "nebula" = {
hostname = "128.131.171.15"; hostname = "128.131.171.15";
port = 22;
user = "amp23s56"; user = "amp23s56";
compression = true; compression = true;
identityFile = "~/.ssh/id_ed25519"; identityFile = "~/.ssh/id_ed25519";
@ -3782,7 +3706,6 @@ It is very convenient to have SSH aliases in place for machines that I use. This
}; };
"efficient" = { "efficient" = {
hostname = "g0.complang.tuwien.ac.at"; hostname = "g0.complang.tuwien.ac.at";
port = 22;
forwardAgent = true; forwardAgent = true;
user = "ep01427399"; user = "ep01427399";
@ -3809,7 +3732,6 @@ It is very convenient to have SSH aliases in place for machines that I use. This
}; };
"hydra" = { "hydra" = {
hostname = "128.131.171.215"; hostname = "128.131.171.215";
port = 22;
user = "hpc23w33"; user = "hpc23w33";
compression = true; compression = true;
forwardAgent = true; forwardAgent = true;

View file

@ -246,118 +246,83 @@ programs.ssh= {
extraConfig = "SetEnv TERM=xterm-256color"; extraConfig = "SetEnv TERM=xterm-256color";
matchBlocks = { matchBlocks = {
"nginx" = { "nginx" = {
hostname = "192.168.2.14"; hostname = "192.168.1.14";
port = 22;
user = "root"; user = "root";
}; };
"jellyfin" = { "jellyfin" = {
hostname = "192.168.2.16"; hostname = "192.168.1.16";
port = 22;
user = "root"; user = "root";
}; };
"pfsense" = { "pfsense" = {
hostname = "192.168.1.1"; hostname = "192.168.1.1";
port = 22;
user = "root"; user = "root";
}; };
"proxmox" = { "proxmox" = {
hostname = "192.168.1.2"; hostname = "192.168.1.2";
port = 22;
user = "root"; user = "root";
}; };
"transmission" = { "transmission" = {
hostname = "192.168.1.6"; hostname = "192.168.1.6";
port = 22;
user = "root"; user = "root";
}; };
"fetcher" = { "fetcher" = {
hostname = "192.168.1.192"; hostname = "192.168.1.7";
port = 22;
user = "root"; user = "root";
}; };
"omv" = { "omv" = {
hostname = "192.168.1.3"; hostname = "192.168.1.3";
port = 22;
user = "root"; user = "root";
}; };
"webbot" = { "webbot" = {
hostname = "192.168.1.11"; hostname = "192.168.1.11";
port = 22;
user = "root";
};
"plex" = {
hostname = "192.168.1.16";
port = 22;
user = "root"; user = "root";
}; };
"nextcloud" = { "nextcloud" = {
hostname = "192.168.2.5"; hostname = "192.168.1.5";
port = 22;
user = "root"; user = "root";
}; };
"subsonic" = { "sound" = {
hostname = "192.168.2.13"; hostname = "192.168.1.13";
port = 22;
user = "root"; user = "root";
}; };
"spotify" = { "spotify" = {
hostname = "192.168.1.17"; hostname = "192.168.1.17";
port = 22;
user = "root"; user = "root";
}; };
"wordpress" = { "wordpress" = {
hostname = "192.168.2.7"; hostname = "192.168.1.9";
port = 22;
user = "root"; user = "root";
}; };
"turn" = { "turn" = {
hostname = "192.168.2.17"; hostname = "192.168.1.18";
port = 22;
user = "root"; user = "root";
}; };
"hugo" = { "hugo" = {
hostname = "192.168.2.19"; hostname = "192.168.1.19";
port = 22;
user = "root"; user = "root";
}; };
"matrix" = { "matrix" = {
hostname = "192.168.2.20"; hostname = "192.168.1.23";
port = 22;
user = "root"; user = "root";
}; };
"matrix2" = { "scroll" = {
hostname = "192.168.2.20"; hostname = "192.168.1.22";
port = 22;
user = "root";
};
"database" = {
hostname = "192.168.2.21";
port = 22;
user = "root"; user = "root";
}; };
"minecraft" = { "minecraft" = {
hostname = "130.61.119.129"; hostname = "130.61.119.129";
port = 22;
user = "opc"; user = "opc";
}; };
"sync" = { "sync" = {
hostname = "193.122.53.173"; hostname = "193.122.53.173";
port = 22;
user = "root"; #this is a oracle vm server but needs root due to nixos-infect user = "root"; #this is a oracle vm server but needs root due to nixos-infect
}; };
"pkv" = { "pkv" = {
hostname = "46.232.248.161"; hostname = "46.232.248.161";
port = 22;
user = "root";
};
"calibre" = {
hostname = "192.168.2.22";
port = 22;
user = "root"; user = "root";
}; };
"nebula" = { "nebula" = {
hostname = "128.131.171.15"; hostname = "128.131.171.15";
port = 22;
user = "amp23s56"; user = "amp23s56";
compression = true; compression = true;
identityFile = "~/.ssh/id_ed25519"; identityFile = "~/.ssh/id_ed25519";
@ -368,7 +333,6 @@ programs.ssh= {
}; };
"efficient" = { "efficient" = {
hostname = "g0.complang.tuwien.ac.at"; hostname = "g0.complang.tuwien.ac.at";
port = 22;
forwardAgent = true; forwardAgent = true;
user = "ep01427399"; user = "ep01427399";
@ -395,7 +359,6 @@ programs.ssh= {
}; };
"hydra" = { "hydra" = {
hostname = "128.131.171.215"; hostname = "128.131.171.215";
port = 22;
user = "hpc23w33"; user = "hpc23w33";
compression = true; compression = true;
forwardAgent = true; forwardAgent = true;

View file

@ -101,6 +101,25 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
temurin-bin-17
(prismlauncher.override {
glfw = (let
mcWaylandPatchRepo = fetchFromGitHub {
owner = "Admicos";
repo = "minecraft-wayland";
rev = "370ce5b95e3ae9bc4618fb45113bc641fbb13867";
sha256 =
"sha256-RPRg6Gd7N8yyb305V607NTC1kUzvyKiWsh6QlfHW+JE=";
};
mcWaylandPatches = map (name: "${mcWaylandPatchRepo}/${name}")
(lib.naturalSort (builtins.attrNames (lib.filterAttrs
(name: type:
type == "regular" && lib.hasSuffix ".patch" name)
(builtins.readDir mcWaylandPatchRepo))));
in glfw-wayland.overrideAttrs (previousAttrs: {
patches = previousAttrs.patches ++ mcWaylandPatches;
}));})
]; ];
system.stateVersion = "23.05"; system.stateVersion = "23.05";

View file

@ -101,48 +101,6 @@
}; };
}; };
# "sound.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "https://192.168.2.13";
# extraConfig = ''
# client_max_body_size 0;
# '';
# };
# };
# };
# "sound.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "http://192.168.2.13:4040";
# recommendedProxySettings = false;
# # proxyWebsockets = true;
# extraConfig = ''
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "Upgrade";
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto https;
# proxy_set_header X-Forwarded-Host $host;
# proxy_set_header X-Forwarded-Port $server_port;
# proxy_set_header Host $host;
# proxy_max_temp_file_size 0;
# proxy_redirect http:// https://;
# proxy_buffering off;
# proxy_request_buffering off;
# client_max_body_size 0;
# '';
# };
# };
# };
"sound.swarsel.win" = { "sound.swarsel.win" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@ -219,20 +177,6 @@
}; };
}; };
# "books.swarsel.win" = {
# enableACME = true;
# forceSSL = true;
# acmeRoot = null;
# locations = {
# "/" = {
# proxyPass = "http://192.168.2.22:8083";
# extraConfig = ''
# client_max_body_size 0;
# '';
# };
# };
# };
"blog.swarsel.win" = { "blog.swarsel.win" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@ -250,8 +194,4 @@
}; };
}; };
} }