diff --git a/.secrets b/.secrets index 3d189e2..c7dc80d 160000 --- a/.secrets +++ b/.secrets @@ -1 +1 @@ -Subproject commit 3d189e205d5fc4194726010e5f31178235c1c046 +Subproject commit c7dc80d23b6bf67ae8e69545b430bb13f000fa03 diff --git a/config/goodomens/plugins/MiniMOTD/icons/goodomens-logo.png b/config/goodomens/plugins/MiniMOTD/icons/goodomens-logo.png new file mode 100644 index 0000000..cc23346 Binary files /dev/null and b/config/goodomens/plugins/MiniMOTD/icons/goodomens-logo.png differ diff --git a/config/goodomens/plugins/MiniMOTD/main.conf b/config/goodomens/plugins/MiniMOTD/main.conf new file mode 100644 index 0000000..202c938 --- /dev/null +++ b/config/goodomens/plugins/MiniMOTD/main.conf @@ -0,0 +1,26 @@ +icon-enabled=true +motd-enabled=true + +motds=[ + { + icon=goodomens-logo + line1="<#ffb3e8>GoodOmens | Begin your journey carefully..." + line2="Declarative Paper Server on NixOS" + } +] + +player-count-settings { + allow-exceeding-maximum=false + disable-player-list-hover=true + fake-players { + fake-players="25%" + fake-players-enabled=false + } + hide-player-count=false + just-x-more-settings { + just-x-more-enabled=false + x-value=3 + } + max-players=69 + max-players-enabled=false +} diff --git a/config/goodomens/plugins/Tablist/config.yml b/config/goodomens/plugins/Tablist/config.yml new file mode 100644 index 0000000..7621324 --- /dev/null +++ b/config/goodomens/plugins/Tablist/config.yml @@ -0,0 +1,11 @@ +tablist: + header: + - "&8&l&m-------------------------------" + - "&c&lGoodOmens" + - "&7mc.elnafo.ru" + - "&8&m-----------------------" + footer: + - " " + - "&eMap: &bmc.elnafo.ru/map" + - "&7%date%" + - "&8&l&m-------------------------------" diff --git a/config/goodomens/plugins/squaremap/advanced.yml b/config/goodomens/plugins/squaremap/advanced.yml new file mode 100644 index 0000000..57ebbdf --- /dev/null +++ b/config/goodomens/plugins/squaremap/advanced.yml @@ -0,0 +1,85 @@ +config-version: 2 +settings: + event-listeners: + BlockSpreadEvent: true + BlockFadeEvent: true + BlockFormEvent: true + EntityExplodeEvent: true + LeavesDecayEvent: true + FluidLevelChangeEvent: true + StructureGrowEvent: true + BlockExplodeEvent: true + EntityChangeBlockEvent: true + BlockBurnEvent: true + EntityBlockFormEvent: true + BlockGrowEvent: true + BlockBreakEvent: true + ChunkPopulateEvent: true + BlockPlaceEvent: true + PlayerChunkLoadEvent: false + PlayerQuitEvent: false + ChunkLoadEvent: true + PlayerMoveEvent: false + BlockPistonRetractEvent: false + BlockPhysicsEvent: false + PlayerJoinEvent: false + BlockPistonExtendEvent: false + BlockFromToEvent: false +world-settings: + default: + invisible-blocks: + - minecraft:tall_grass + - minecraft:fern + - minecraft:grass + - minecraft:large_fern + iterate-up-base-blocks: + - minecraft:netherrack + - minecraft:glowstone + - minecraft:soul_sand + - minecraft:soul_soil + - minecraft:gravel + - minecraft:warped_nylium + - minecraft:crimson_nylium + - minecraft:nether_gold_ore + - minecraft:ancient_debris + - minecraft:nether_quartz_ore + - minecraft:magma_block + - minecraft:basalt + color-overrides: + biomes: + foliage: + minecraft:jungle: '#1f8907' + minecraft:mangrove_swamp: '#6f9623' + minecraft:sparse_jungle: '#1f8907' + minecraft:bamboo_jungle: '#1f8907' + minecraft:dark_forest: '#1c7b07' + grass: {} + water: {} + blocks: + minecraft:oxeye_daisy: '#D6E8E8' + minecraft:glass: '#FFFFFF' + minecraft:white_tulip: '#D6E8E8' + minecraft:mycelium: '#6F6265' + minecraft:spruce_leaves: '#619961' + minecraft:pink_tulip: '#EBC5FD' + minecraft:rose_bush: '#9B221A' + minecraft:blue_orchid: '#2ABFFD' + minecraft:orange_tulip: '#BD6A22' + minecraft:peony: '#EBC5FD' + minecraft:sunflower: '#FFEC4F' + minecraft:allium: '#B878ED' + minecraft:wither_rose: '#211A16' + minecraft:birch_leaves: '#80A755' + minecraft:lava: '#EA5C0F' + minecraft:lily_of_the_valley: '#FFFFFF' + minecraft:poppy: '#ED302C' + minecraft:attached_melon_stem: '#E0C71C' + minecraft:red_tulip: '#9B221A' + minecraft:dandelion: '#FFEC4F' + minecraft:pink_petals: '#FFB4DB' + minecraft:attached_pumpkin_stem: '#E0C71C' + minecraft:lilac: '#B66BB2' + minecraft:cornflower: '#466AEB' + minecraft:terracotta: '#9E6246' + minecraft:lily_pad: '#208030' + minecraft:azure_bluet: '#F7F7F7' diff --git a/config/goodomens/plugins/squaremap/config.yml b/config/goodomens/plugins/squaremap/config.yml new file mode 100644 index 0000000..38697b3 --- /dev/null +++ b/config/goodomens/plugins/squaremap/config.yml @@ -0,0 +1,95 @@ +config-version: 2 +settings: + language-file: lang-en.yml + debug-mode: false + update-checker: true + web-address: http://localhost:8088 + web-directory: + path: web + auto-update: true + image-quality: + compress-images: + enabled: false + value: 0.0 + internal-webserver: + enabled: true + bind: 0.0.0.0 + port: 8088 + ui: + coordinates: + enabled: true + link: + enabled: true + sidebar: + pinned: pinned + page-title: 'Map - GoodOmens' + commands: + main-command-label: squaremap + main-command-aliases: + - map + render-progress-logging: + enabled: true + interval-seconds: 1 +world-settings: + default: + map: + enabled: true + display-name: '{world}' + order: 0 + icon: '' + max-render-threads: -1 + iterate-up: false + max-height: -1 + biomes: + enabled: true + blend-biomes: 3 + glass: + clear: true + lava: + checkerboard: true + water: + clear-depth: true + checkerboard: false + zoom: + maximum: 3 + default: 3 + extra: 2 + background-render: + enabled: true + max-chunks-per-interval: 1024 + interval-seconds: 3 + max-render-threads: -1 + markers: + update-interval-seconds: 5 + spawn-icon: + enabled: true + show-controls: true + default-hidden: false + layer-priority: 0 + z-index: 0 + world-border: + enabled: true + show-controls: true + default-hidden: false + layer-priority: 1 + z-index: 1 + visibility-limits: + - type: world-border + enabled: 'false' + player-tracker: + enabled: true + update-interval-seconds: 1 + show-controls: true + default-hidden: false + layer-priority: 2 + z-index: 2 + nameplate: + enabled: true + show-head: true + heads-url: https://mc-heads.net/avatar/{uuid}/16 + show-armor: true + show-health: true + hide: + invisible: true + spectators: true + use-display-names: false diff --git a/config/goodomens/site/assets/fonts/Kottke Silkscreen License.txt b/config/goodomens/site/assets/fonts/Kottke Silkscreen License.txt new file mode 100644 index 0000000..a3d852e --- /dev/null +++ b/config/goodomens/site/assets/fonts/Kottke Silkscreen License.txt @@ -0,0 +1,25 @@ +Thank you for downloading Silkscreen, a type family for your Web graphics +by Jason Kottke (jason@kottke.org). + +To install the Silkscreen type family, unzip this file and drag the files +into the Fonts folder in the Control Panel. + +If you encounter any problems in using this font, please email me and I'll +see if I can try and fix it. Please note that I can't help you with any +installation issues. Please consult your system's help files for assistance. + +This font is free for personal and corporate use and may be redistributed in +this unmodified form on your Web site. I would ask that you not modify and +then redistribute this font...although you may modify it for your own +personal use. If you really like this font and use it often, feel free to +mail me (e- or snail mail) some small token of your appreciation. A URL +of your work using Silkscreen would be appreciated as well. + +All future bug fixes, updates, and additions to the Silkscreen type family +will be available on my Web site at the following URL: + +http://www.kottke.org/plus/type/silkscreen/index.html + +Again, thanks for downloading Silkscreen. Enjoy! + +-jason \ No newline at end of file diff --git a/config/goodomens/site/assets/fonts/slkscr.ttf b/config/goodomens/site/assets/fonts/slkscr.ttf new file mode 100644 index 0000000..e2dd974 Binary files /dev/null and b/config/goodomens/site/assets/fonts/slkscr.ttf differ diff --git a/config/goodomens/site/assets/images/acacia_planks.png b/config/goodomens/site/assets/images/acacia_planks.png new file mode 100644 index 0000000..e6b7eec Binary files /dev/null and b/config/goodomens/site/assets/images/acacia_planks.png differ diff --git a/config/goodomens/site/assets/images/acacia_sapling.png b/config/goodomens/site/assets/images/acacia_sapling.png new file mode 100644 index 0000000..d65a186 Binary files /dev/null and b/config/goodomens/site/assets/images/acacia_sapling.png differ diff --git a/config/goodomens/site/assets/images/blossom_leaves.png b/config/goodomens/site/assets/images/blossom_leaves.png new file mode 100644 index 0000000..de721f2 Binary files /dev/null and b/config/goodomens/site/assets/images/blossom_leaves.png differ diff --git a/config/goodomens/site/assets/images/creebet.webp b/config/goodomens/site/assets/images/creebet.webp new file mode 100644 index 0000000..bceb411 Binary files /dev/null and b/config/goodomens/site/assets/images/creebet.webp differ diff --git a/config/goodomens/site/assets/images/discord.png b/config/goodomens/site/assets/images/discord.png new file mode 100644 index 0000000..1edddb2 Binary files /dev/null and b/config/goodomens/site/assets/images/discord.png differ diff --git a/config/goodomens/site/assets/images/discord.png.jpg b/config/goodomens/site/assets/images/discord.png.jpg new file mode 100644 index 0000000..7688830 Binary files /dev/null and b/config/goodomens/site/assets/images/discord.png.jpg differ diff --git a/config/goodomens/site/assets/images/favicon.ico b/config/goodomens/site/assets/images/favicon.ico new file mode 100644 index 0000000..bda9e70 Binary files /dev/null and b/config/goodomens/site/assets/images/favicon.ico differ diff --git a/config/goodomens/site/assets/images/goodomens-logo.png b/config/goodomens/site/assets/images/goodomens-logo.png new file mode 100644 index 0000000..cc23346 Binary files /dev/null and b/config/goodomens/site/assets/images/goodomens-logo.png differ diff --git a/config/goodomens/site/assets/images/goodomens.png b/config/goodomens/site/assets/images/goodomens.png new file mode 100644 index 0000000..50c7088 Binary files /dev/null and b/config/goodomens/site/assets/images/goodomens.png differ diff --git a/config/goodomens/site/assets/images/map.webp b/config/goodomens/site/assets/images/map.webp new file mode 100644 index 0000000..52a2bc4 Binary files /dev/null and b/config/goodomens/site/assets/images/map.webp differ diff --git a/config/goodomens/site/assets/images/nixos-minecraft.png b/config/goodomens/site/assets/images/nixos-minecraft.png new file mode 100644 index 0000000..a43f36a Binary files /dev/null and b/config/goodomens/site/assets/images/nixos-minecraft.png differ diff --git a/config/goodomens/site/assets/js/gallery.js b/config/goodomens/site/assets/js/gallery.js new file mode 100644 index 0000000..7258001 --- /dev/null +++ b/config/goodomens/site/assets/js/gallery.js @@ -0,0 +1,34 @@ +var baseUrl = "/gallery/images/"; +var pictureIndex = 0; +var pictures = []; + +function getFiles() { + $.ajax(baseUrl).success(function(data) { + pictures = []; + var lastPicture = ""; + $(data).find("a[href]").each(function() { + var href = $(this).attr('href'); + if (href.indexOf('.jpg') > 0 || href.indexOf('.jpeg') > 0) { + if (href != lastPicture) { + pictures.push(href); + lastPicture = href; + } + } + }); + console.log("gallery: " + pictures.length + " pictures loaded"); + changePicture(0); + }); +} + +function changePicture(indexOffset) { + pictureIndex += indexOffset; + if (pictureIndex >= pictures.length) { + pictureIndex = 0; + } else if (pictureIndex < 0) { + pictureIndex = pictures.length - 1; + } + if (pictures.length != 0) { + $('#viewer').attr('src', baseUrl + pictures[pictureIndex]); + $('#info').text((pictureIndex + 1) + "/" + pictures.length); + } +} diff --git a/config/goodomens/site/assets/style/master.css b/config/goodomens/site/assets/style/master.css new file mode 100644 index 0000000..ea0d4c0 --- /dev/null +++ b/config/goodomens/site/assets/style/master.css @@ -0,0 +1,161 @@ +@font-face { + font-family: "Silkscreen"; + src: url("../fonts/slkscr.ttf"); +} + +html { + background-color: rgb(26, 28, 29); +} + +body { + margin: 0px; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #e8e6e3; +} + +p, ul { + font-size: 1.2em; +} + +li { + padding-bottom: 10px; +} + +li::marker { + color: #ffb3e8; +} + +img, video { + max-width: 100%; + max-height: 100vh; + display: block; + image-rendering: pixelated; +} + +audio { + width: 100%; +} + +header { + padding-bottom: 25px; + padding-top: 25px; + margin-bottom: 25px; + + background: url("images/blossom_leaves.png"); + background-size: 64px; + image-rendering: pixelated; +} + +.mini-title { + padding-bottom: 15px; + padding-top: 15px; + padding-left: 20px; + margin-bottom: 0px; +} + +.sign { + background: url("images/acacia_planks.png"); + background-size: 112px; + image-rendering: pixelated; + border-width: 0px; + border-radius: 0px; + height: 112px; + width: 234px; + padding: unset; +} + +.sign h2 { + color: black; + font-family: Silkscreen; + margin-top: 10px; +} + +.sign center { + padding-top: 10px; +} + +section { + border: rgba(255, 255, 255, 0.9); + border-width: 2px; + border-style: solid; + border-radius: 7px; + border-color: #bc5c91; + padding: 20px; +} + +a:link, a:visited, a:hover, a:active { + text-decoration: none; +} + +h1, h2 { + color: #ffb3e8; + font-family: Silkscreen; +} + +h1 { + font-size: 2em; + margin-top: 15px; +} + +.main { + max-width: 1000px; + margin-left: auto; + margin-right: auto; + margin-top: 20px; + margin-bottom: 20px; +} + +.container { + display: grid; + grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) ); + column-gap: 10px; + row-gap: 15px; + justify-items: center; +} + +#map { + width: 100%; + height: 95vh; +} + +#sidebar { + margin-top: 78px; + height: auto; +} + + +#viewer { + margin-bottom: 20px; +} + +.arrow { + border: solid black; + border-width: 0 3px 3px 0; + display: inline-block; + padding: 3px; +} + +.right { + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); +} + +.left { + transform: rotate(135deg); + -webkit-transform: rotate(135deg); +} + +.mini-sign { + text-align: center; + text-decoration: none; + display: inline-block; + background: url("images/acacia_planks.png"); + background-size: 64px; + image-rendering: pixelated; + border: none; + width: 80px; + height: 36px; + color: black; + font-family: Silkscreen; + line-height: 30px; +} diff --git a/config/goodomens/site/gallery/images/.gitignore b/config/goodomens/site/gallery/images/.gitignore new file mode 100644 index 0000000..225c381 --- /dev/null +++ b/config/goodomens/site/gallery/images/.gitignore @@ -0,0 +1,2 @@ +*.png +*.jpg diff --git a/config/goodomens/site/gallery/index.html b/config/goodomens/site/gallery/index.html new file mode 100644 index 0000000..885f945 --- /dev/null +++ b/config/goodomens/site/gallery/index.html @@ -0,0 +1,51 @@ + + + + + Gallery - GoodOmens + + + + + + + + + + + + + + + + + + + + +
+
+ + GoodOmens + +
+
+
+

Gallery

+ +
+ +
4/8
+ +
+
+ + + + diff --git a/config/goodomens/site/index.html b/config/goodomens/site/index.html new file mode 100644 index 0000000..0268060 --- /dev/null +++ b/config/goodomens/site/index.html @@ -0,0 +1,99 @@ + + + + + GoodOmens + + + + + + + + + + + + + + + + + +
+
+ + GoodOmens + +
+
+
+
+
+

Address

+

mc.elnafo.ru

+
+
+ +
+
+ Map +

Map

+
+
+
+ +
+
+ Gallery +

Gallery

+
+
+
+
+
+

Rules

+ +

It doesn't take much to have a good time. Enjoy your journey!

+
+
+ +
+
+ Discord +

Discord

+
+
+
+ +
+
+ Configuration +

Configuration

+
+
+
+
+
+

Operators

+

People who keep order, develop the server in the wrong direction. You can also ask them for help!*

+ +

*Services provided by the operator are not included in the warranty case.

+
+ + + diff --git a/config/goodomens/site/map/index.html b/config/goodomens/site/map/index.html new file mode 100644 index 0000000..d4b2212 --- /dev/null +++ b/config/goodomens/site/map/index.html @@ -0,0 +1,58 @@ + + + + + Map - GoodOmens + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + GoodOmens + +
+
+ + + diff --git a/nixosConfigurations/catarina/default.nix b/nixosConfigurations/catarina/default.nix index fb79661..a72f3fc 100644 --- a/nixosConfigurations/catarina/default.nix +++ b/nixosConfigurations/catarina/default.nix @@ -47,10 +47,10 @@ rec { videoDrivers = [ "nvidia" ]; displayManager.gdm = { - enable = true; + enable = false; autoSuspend = false; }; - desktopManager.gnome.enable = true; + desktopManager.gnome.enable = false; }; services.printing.enable = true; @@ -69,10 +69,6 @@ rec { settings.KbdInteractiveAuthentication = false; }; - services.udev = { - packages = with pkgs; [ gnome.gnome-settings-daemon ]; - }; - services.blueman.enable = true; services.fail2ban = { @@ -98,13 +94,12 @@ rec { security.acme = { acceptTerms = true; - defaults.email = "l.nafaryus@gmail.com"; + defaults.email = "l.nafaryus@elnafo.ru"; defaults.group = "nginx"; certs = { "elnafo.ru" = { - domain = "elnafo.ru"; - extraDomainNames = [ "www.elnafo.ru" "vcs.elnafo.ru" "media.elnafo.ru" "mc.elnafo.ru" "map.mc.elnafo.ru"]; + extraDomainNames = [ "*.elnafo.ru" ]; dnsProvider = "webnames"; credentialsFile = config.sops.secrets."dns".path; webroot = null; @@ -152,6 +147,7 @@ rec { certificateScheme = "acme-nginx"; enableImapSsl = true; openFirewall = true; + localDnsResolver = true; loginAccounts = import ../../.secrets/mail-recipients.nix { inherit config; }; }; @@ -163,6 +159,17 @@ rec { services.spoofdpi.enable = true; + #services.btrbk = { + # instances."catarina" = { + # onCalendar = "weekly"; + # settings = { + # volume."/" = { + # + # }; + # }; + # }; + #}; + # Packages environment.systemPackages = with pkgs; [ wget @@ -170,6 +177,7 @@ rec { ntfs3g sshfs exfat + btrfs-progs lm_sensors @@ -217,7 +225,7 @@ rec { Host catarina HostName 192.168.156.102 Port 22 - User nafaryus + User l.nafaryus ''; programs.direnv.enable = true; diff --git a/nixosConfigurations/catarina/hardware.nix b/nixosConfigurations/catarina/hardware.nix index 06a6445..5547675 100644 --- a/nixosConfigurations/catarina/hardware.nix +++ b/nixosConfigurations/catarina/hardware.nix @@ -9,7 +9,7 @@ tmp.useTmpfs = lib.mkDefault true; tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs); - initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + initrd.availableKernelModules = [ "nvme" "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; initrd.kernelModules = [ ]; kernelModules = [ "kvm-intel" "tcp_bbr" "coretemp" "nct6775" ]; kernelParams = [ "threadirqs" ]; @@ -63,23 +63,40 @@ rtkit.enable = true; }; - users.users.root.initialPassword = "nixos"; - # Filesystem fileSystems = { "/" = { - device = "/dev/disk/by-uuid/1e26a42f-0546-48f1-8e8e-f1e2dfdcc5fb"; - fsType = "ext4"; + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" ]; + }; + + "/nix" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + + "/home" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = [ "subvol=home" "compress=zstd" ]; }; "/boot" = { - device = "/dev/disk/by-uuid/786A-F24B"; + device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; + + "/swap" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + options = [ "subvol=swap" "noatime" ]; + }; }; swapDevices = [ - { device = "/dev/disk/by-uuid/ff4c8615-e4c8-429b-822e-55cb1c14e125"; } + { device = "/swap/swapfile"; } ]; services.fstrim.enable = true; @@ -88,6 +105,8 @@ hardware = { enableRedistributableFirmware = true; + cpu.intel.updateMicrocode = true; + nvidia.nvidiaSettings = true; nvidia.modesetting.enable = true; @@ -103,7 +122,8 @@ networking = { networkmanager.enable = true; - useDHCP = lib.mkDefault true; + useDHCP = false; +# dhcpcd.enable = false; hostName = "catarina"; extraHosts = ''''; @@ -112,13 +132,33 @@ allowedTCPPorts = [ 80 443 3001 25600 8080 ]; }; - interfaces.enp9s0.ipv4.addresses = [ { - address = "192.168.156.102"; - prefixLength = 24; - } ]; +# interfaces.enp9s0.ipv4.addresses = [ { +# address = "192.168.156.102"; +# prefixLength = 24; +# } ]; + + interfaces.wlp8s0.ipv4.addresses = [ { + address = "192.168.156.102"; + prefixLength = 24; + } ]; + interfaces.wlp8s0.useDHCP = false; - defaultGateway = "192.168.156.1"; + defaultGateway = { + address = "192.168.156.1"; + interface = null; + metric = null; + }; nameservers = [ "192.168.156.1" "8.8.8.8" ]; +# networkmanager.insertNameservers = config.networking.nameservers; + }; + + services.resolved = { + enable = false; + dnssec = "true"; + extraConfig = '' + DNSOverTLS=yes + ''; + fallbackDns = [ "8.8.8.8" ]; }; services.logind.lidSwitchExternalPower = "ignore"; diff --git a/nixosConfigurations/catarina/services/papermc.nix b/nixosConfigurations/catarina/services/papermc.nix index 6459c71..1febf24 100644 --- a/nixosConfigurations/catarina/services/papermc.nix +++ b/nixosConfigurations/catarina/services/papermc.nix @@ -100,8 +100,8 @@ let ''; }; - skinRestorer = stdenv.mkDerivation rec { - pname = "SkinRestorer"; + skinsRestorer = stdenv.mkDerivation rec { + pname = "SkinsRestorer"; version = "15.0.2"; src = fetchurl { url = "https://github.com/SkinsRestorer/SkinsRestorerX/releases/download/${version}/SkinsRestorer.jar"; @@ -145,8 +145,38 @@ let ''; }; + chunky = stdenv.mkDerivation rec { + pname = "Chunky"; + version = "1.3.92"; + src = fetchurl { + url = "https://hangarcdn.papermc.io/plugins/pop4959/Chunky/versions/${version}/PAPER/Chunky-${version}.jar"; + hash = "sha256-ABHfKJK0LQI2ZLt1D83897RAnE9xWu6+34IOlwTh17w="; + }; + meta.homepage = "https://hangar.papermc.io/pop4959/Chunky"; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${pname}.jar + ''; + }; + + xclaim = stdenv.mkDerivation rec { + pname = "XClaim"; + version = "1.11.0"; + src = fetchurl { + url = "https://github.com/WasabiThumb/xclaim/releases/download/${version}/xclaim-${version}.jar"; + hash = "sha256-49R9cj1NnOx9n0yBtOj+m4V+56P4Ko/Co/LOgdhd2y4="; + }; + meta.homepage = "https://hangar.papermc.io/WasabiThumbs/XClaim"; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/${pname}.jar + ''; + }; + plugins = [ - passky grimAnticheat viaVersion directionHUD miniMOTD skinRestorer squaremap stargate + passky grimAnticheat viaVersion directionHUD miniMOTD skinsRestorer squaremap stargate chunky xclaim ]; in { @@ -157,7 +187,7 @@ in { serverProperties = { server-port = 25565; gamemode = "survival"; - motd = "NixOS Paper Server"; + motd = "GoodOmens"; max-players = 10; level-seed = "66666666"; enable-status = true; @@ -173,14 +203,29 @@ in { ops = operators; extraPreStart = '' mkdir -p ${builtins.concatStringsSep " " (map (v: "plugins/${v.pname}") plugins)} - '' + builtins.concatStringsSep "\n" (map (v: "ln -sf ${v.outPath}/bin/${v.pname}.jar plugins/") plugins) + '' + builtins.concatStringsSep "\n" (map (v: "ln -sf ${v.outPath}/bin/${v.pname}.jar plugins/") plugins) + '' + + ln -sf ${config.bonfire.configDir}/goodomens/plugins/MiniMOTD/main.conf plugins/MiniMOTD/ + mkdir -p plugins/MiniMOTD/icons + ln -sf ${config.bonfire.configDir}/goodomens/plugins/MiniMOTD/icons/goodomens-logo.png plugins/MiniMOTD/icons/ + ln -sf ${config.bonfire.configDir}/goodomens/plugins/Tablist/config.yml plugins/Tablist/ + ln -sf ${config.bonfire.configDir}/goodomens/plugins/squaremap/config.yml plugins/squaremap/ + ln -sf ${config.bonfire.configDir}/goodomens/plugins/squaremap/advanced.yml plugins/squaremap/ + ln -sf ${config.bonfire.configDir}/goodomens/plugins/squaremap/advanced.yml plugins/squaremap/ + ln -sf ${config.bonfire.configDir}/goodomens/site/map/index.html plugins/squaremap/web/ + '' ; }; - services.nginx.virtualHosts."map.mc.elnafo.ru" = { + services.nginx.virtualHosts."mc.elnafo.ru" = { forceSSL = true; useACMEHost = "elnafo.ru"; - locations."/".proxyPass = "http://127.0.0.1:8088"; + locations."/".root = "/var/www/goodomens"; + locations."^~ /map/".proxyPass = "http://127.0.0.1:8088/"; + locations."/gallery/".root = "/var/www/goodomens"; + locations."/gallery/images/" = { + root = "/var/www/goodomens"; + extraConfig = ''autoindex on;''; + }; }; - } diff --git a/nixosConfigurations/catarina/users.nix b/nixosConfigurations/catarina/users.nix index f1c5cf4..9efd96d 100644 --- a/nixosConfigurations/catarina/users.nix +++ b/nixosConfigurations/catarina/users.nix @@ -1,15 +1,17 @@ { config, pkgs, lib, ... }: { # Users - users.users.nafaryus = { + users.users.root.hashedPasswordFile = config.sops.secrets."users/root".path; + + users.users."l.nafaryus" = { isNormalUser = true; description = "L-Nafaryus"; extraGroups = [ "networkmanager" "wheel" ]; group = "users"; uid = 1000; - initialPassword = "nixos"; shell = pkgs.fish; + hashedPasswordFile = config.sops.secrets."users/l.nafaryus".path; }; - users.users.nginx.extraGroups = [ "acme" ]; + users.users.nginx.extraGroups = [ "acme" "papermc" ]; }