Compare commits
3 Commits
555dfaf8ef
...
25c595f32e
Author | SHA1 | Date | |
---|---|---|---|
25c595f32e | |||
57748c08f3 | |||
00b2d0fd26 |
82
flake.lock
generated
82
flake.lock
generated
@ -1,6 +1,22 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"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,
|
||||||
@ -20,6 +36,24 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_4"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
@ -34,9 +68,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_4"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
@ -257,10 +291,32 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-wsl": {
|
"nix-minecraft": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-unstable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711243338,
|
||||||
|
"narHash": "sha256-Vj39ZUwzw+kZF8Tgk/cu6ksWLdu8MXgh0lNNnUea4Fc=",
|
||||||
|
"owner": "infinidoge",
|
||||||
|
"repo": "nix-minecraft",
|
||||||
|
"rev": "25992bbf8fe0ec70b7afa2f26217f97fbb9c8bb4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "infinidoge",
|
||||||
|
"repo": "nix-minecraft",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-wsl": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@ -373,18 +429,19 @@
|
|||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprwm-contrib": "hyprwm-contrib",
|
"hyprwm-contrib": "hyprwm-contrib",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
|
"nix-minecraft": "nix-minecraft",
|
||||||
"nix-wsl": "nix-wsl",
|
"nix-wsl": "nix-wsl",
|
||||||
"nixfiles-assets": "nixfiles-assets",
|
"nixfiles-assets": "nixfiles-assets",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"pkg-android-tools": "pkg-android-tools",
|
"pkg-android-tools": "pkg-android-tools",
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay",
|
||||||
"systems": "systems_5"
|
"systems": "systems_6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@ -478,6 +535,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wlroots": {
|
"wlroots": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -23,6 +23,11 @@
|
|||||||
# android tools versions [ 34.0.0, 34.0.5 ) causes bootloops somehow and 34.0.5 isn't in nixpkgs yet
|
# android tools versions [ 34.0.0, 34.0.5 ) causes bootloops somehow and 34.0.5 isn't in nixpkgs yet
|
||||||
pkg-android-tools.url = "github:NixOS/nixpkgs/55070e598e0e03d1d116c49b9eff322ef07c6ac6";
|
pkg-android-tools.url = "github:NixOS/nixpkgs/55070e598e0e03d1d116c49b9eff322ef07c6ac6";
|
||||||
|
|
||||||
|
nix-minecraft = {
|
||||||
|
url = "github:infinidoge/nix-minecraft";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
# provides an up-to-date database for comma
|
# provides an up-to-date database for comma
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
@ -82,6 +87,7 @@
|
|||||||
inputs.hyprwm-contrib.overlays.default
|
inputs.hyprwm-contrib.overlays.default
|
||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
inputs.nixfiles-assets.overlays.default
|
inputs.nixfiles-assets.overlays.default
|
||||||
|
inputs.nix-minecraft.overlays.default
|
||||||
];
|
];
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.nvidia.package = lib.mkForce config.boot.kernelPackages.nvidiaPackages.production;
|
# hardware.nvidia.package = lib.mkForce config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
hardware.nvidia.open = lib.mkForce false;
|
hardware.nvidia.open = lib.mkForce false;
|
||||||
|
|
||||||
specialisation.plasma.configuration = {
|
specialisation.plasma.configuration = {
|
||||||
|
@ -47,6 +47,12 @@
|
|||||||
options = [ "subvol=@mcserver" ];
|
options = [ "subvol=@mcserver" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/srv/mcserver/.snapshots" =
|
||||||
|
{ device = "/dev/disk/by-uuid/7204ff85-6404-4bd7-ba0d-3fb23a5cf52c";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=snapshots/@mcserver" ];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
@ -1,7 +1,78 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.minecraft-servers;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
fileSystems."/srv/mcserver".options = [ "compress=zstd" "nofail" ];
|
fileSystems = {
|
||||||
|
"/srv/mcserver".options = [ "compress=zstd" "nofail" ];
|
||||||
|
"/srv/mcserver/.snapshots".options = [ "compress=zstd" "nofail" ];
|
||||||
|
};
|
||||||
networking.firewall.trustedInterfaces = [ "wg0" ];
|
networking.firewall.trustedInterfaces = [ "wg0" ];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
users = {
|
||||||
|
nullbite.extraGroups = [ "minecraft" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapper = {
|
||||||
|
configs.mcserver = {
|
||||||
|
FSTYPE = "btrfs";
|
||||||
|
SUBVOLUME = "/srv/mcserver";
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_MIN_AGE = 1800;
|
||||||
|
TIMELINE_LIMIT_HOURLY = 36;
|
||||||
|
TIMELINE_LIMIT_DAILY = 14;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = 4;
|
||||||
|
TIMELINE_LIMIT_MONTHLY = 12;
|
||||||
|
TIMELINE_LIMIT_YEARLY = 10000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.minecraft-servers = {
|
||||||
|
enable = true;
|
||||||
|
eula = true;
|
||||||
|
dataDir = "/srv/mcserver";
|
||||||
|
servers = {
|
||||||
|
minecraft-nixtest = let
|
||||||
|
self = cfg.servers.minecraft-nixtest;
|
||||||
|
package = pkgs.quiltServers.quilt-1_20_1.override { loaderVersion = "0.21.0"; };
|
||||||
|
modpack = pkgs.fetchPackwizModpack {
|
||||||
|
url = "https://gitea.protogen.io/nullbite/notlite/raw/branch/release/1.20.1/pack.toml";
|
||||||
|
packHash = "sha256-N3Pdlqte8OYz6wz3O/TSG75FMAV+XWAipqoXsYbcYDQ=";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
enable = false;
|
||||||
|
inherit package;
|
||||||
|
autoStart = self.enable;
|
||||||
|
whitelist = {
|
||||||
|
YzumThreeEye = "3dad78e8-6979-404f-820e-952ce20964a0";
|
||||||
|
NullBite = "e24e8e0e-7540-4126-b737-90043155bcd4";
|
||||||
|
Silveere = "468554f1-27cd-4ea1-9308-3dd14a9b1a12";
|
||||||
|
};
|
||||||
|
symlinks = let
|
||||||
|
symlinkFolders = lib.genAttrs [ "mods" "kubejs" ] (x: "${modpack}/${x}");
|
||||||
|
in symlinkFolders;
|
||||||
|
serverProperties = {
|
||||||
|
# allow NCR
|
||||||
|
enforce-secure-profile = false;
|
||||||
|
white-list = true;
|
||||||
|
enforce-whitelist = true;
|
||||||
|
|
||||||
|
motd = "owo what's this (nix edition)";
|
||||||
|
|
||||||
|
enable-rcon = false;
|
||||||
|
difficulty = "hard";
|
||||||
|
hardcore = false;
|
||||||
|
online-mode = true;
|
||||||
|
pvp = true;
|
||||||
|
|
||||||
|
sync-chunk-writes = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, config, lib, options, nixpkgs, home-manager, ... }@args:
|
{ pkgs, config, lib, options, nixpkgs, home-manager, inputs, ... }@args:
|
||||||
let
|
let
|
||||||
cfg = config.nixfiles;
|
cfg = config.nixfiles;
|
||||||
flakeType = cfg.lib.types.flake;
|
flakeType = cfg.lib.types.flake;
|
||||||
@ -14,6 +14,9 @@ in
|
|||||||
./testing
|
./testing
|
||||||
./cachix.nix
|
./cachix.nix
|
||||||
./mitigations.nix
|
./mitigations.nix
|
||||||
|
|
||||||
|
# modules
|
||||||
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||||
];
|
];
|
||||||
config = {};
|
config = {};
|
||||||
options.nixfiles = {
|
options.nixfiles = {
|
||||||
|
@ -1,6 +1,21 @@
|
|||||||
{ config, lib, pkgs, ...}:
|
{ config, lib, pkgs, ...}:
|
||||||
let
|
let
|
||||||
cfg = config.nixfiles.hardware.nvidia;
|
cfg = config.nixfiles.hardware.nvidia;
|
||||||
|
nvidia-535 = let
|
||||||
|
rcu_patch = pkgs.fetchpatch {
|
||||||
|
url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch";
|
||||||
|
hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg=";
|
||||||
|
};
|
||||||
|
in config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
|
version = "535.154.05";
|
||||||
|
sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg=";
|
||||||
|
sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k=";
|
||||||
|
openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo=";
|
||||||
|
settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10=";
|
||||||
|
persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE=";
|
||||||
|
|
||||||
|
patches = [ rcu_patch ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# imports = [
|
# imports = [
|
||||||
@ -41,7 +56,7 @@ in
|
|||||||
nvidiaSettings = lib.mkDefault true;
|
nvidiaSettings = lib.mkDefault true;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.production;
|
package = lib.mkDefault nvidia-535;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user