mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add astral
This commit is contained in:
parent
c93f124c6f
commit
22390d5456
11 changed files with 188 additions and 12 deletions
104
flake.lock
generated
104
flake.lock
generated
|
|
@ -130,6 +130,40 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"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-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
@ -170,11 +204,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720645875,
|
||||
"narHash": "sha256-9F8Vo6HTFAtRNodjmULVmjwb+qBr9TW+32Mxfer9r5s=",
|
||||
"lastModified": 1720734513,
|
||||
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f79d950ac23a4c63e60bb71475d3321fbd9ace2d",
|
||||
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -204,13 +238,33 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-minecraft": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720748198,
|
||||
"narHash": "sha256-2AxCoCoBnFJcZjp9Se7W7JgQ88rwMLUwi5EAcsj5B9I=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "a1ab2a1353a38a6642fbc69f118adc08faf7dbcb",
|
||||
"revCount": 628,
|
||||
"type": "git",
|
||||
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@codeberg.org/nix-astral/nix-minecraft.git"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720418205,
|
||||
"narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=",
|
||||
"lastModified": 1715266358,
|
||||
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "655a58a72a6601292512670343087c2d75d859c1",
|
||||
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -221,6 +275,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1720542800,
|
||||
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1714912032,
|
||||
"narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=",
|
||||
|
|
@ -239,7 +309,8 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nix-minecraft": "nix-minecraft",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
|
|
@ -252,10 +323,10 @@
|
|||
"base16-kitty": "base16-kitty",
|
||||
"base16-tmux": "base16-tmux",
|
||||
"base16-vim": "base16-vim",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719525570,
|
||||
|
|
@ -270,6 +341,21 @@
|
|||
"repo": "stylix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@
|
|||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# stylix.url = "github:danth/stylix/release-23.11";
|
||||
stylix.url = "github:danth/stylix";
|
||||
|
||||
nix-minecraft.url = "git+ssh://git@codeberg.org/nix-astral/nix-minecraft.git";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, home-manager, stylix, ... }:
|
||||
|
|
|
|||
|
|
@ -9,6 +9,5 @@
|
|||
pavucontrol
|
||||
];
|
||||
programs.mpv.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
home.packages = with pkgs; [
|
||||
# ISO downloader
|
||||
qbittorrent
|
||||
transmission-gtk
|
||||
# transmission_4-gtk
|
||||
|
||||
# email
|
||||
thunderbird
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/${config.mods.user.name}/.config/home";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
imports = [
|
||||
./containers
|
||||
./gaming
|
||||
|
||||
./media.nix
|
||||
];
|
||||
|
|
|
|||
1
modules/nixos/server/gaming/aikar-flags.nix
Normal file
1
modules/nixos/server/gaming/aikar-flags.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
memory: "-Xms${memory} -Xmx${memory} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1"
|
||||
36
modules/nixos/server/gaming/astral.nix
Normal file
36
modules/nixos/server/gaming/astral.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, lib, config, inputs, ... }:
|
||||
let
|
||||
modpack = pkgs.fetchPackwizModpack {
|
||||
# version = "main";
|
||||
url = "https://github.com/nix-astral/create-astral/raw/main/pack.toml";
|
||||
packHash = "sha256-QcUg4PRxgGdQIB5d+XnJCmhh6+r/zDtWRFSTkSOR1ik=";
|
||||
manifestHash = "sha256:0kcwbj2f9h30v8kwxhaxzzs2gi3bydzmjgxb2ysf8jv1av1l21n3";
|
||||
};
|
||||
mcVersion = modpack.manifest.versions.minecraft;
|
||||
fabricVersion = modpack.manifest.versions.fabric;
|
||||
serverVersion = lib.replaceStrings [ "." ] [ "_" ] "fabric-${mcVersion}";
|
||||
|
||||
in {
|
||||
options.mods.server.astral = {
|
||||
enable = lib.mkEnableOption {
|
||||
default = false;
|
||||
description = "enables minecraft create astral server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.server.astral.enable {
|
||||
services.minecraft-servers.servers.astral = {
|
||||
enable = true;
|
||||
jvmOpts = (import ./aikar-flags.nix) "4G";
|
||||
package = pkgs.fabricServers.${serverVersion}.override {
|
||||
loaderVersion = fabricVersion;
|
||||
};
|
||||
symlinks = {
|
||||
"global_packs" = "${modpack}/global_packs";
|
||||
"kubejs" = "${modpack}/kubejs";
|
||||
"config" = "${modpack}/config";
|
||||
"mods" = "${modpack}/mods";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/nixos/server/gaming/default.nix
Normal file
16
modules/nixos/server/gaming/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.server.gaming = {
|
||||
enable = lib.mkEnableOption {
|
||||
default = false;
|
||||
description = "enables gaming servers";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./astral.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf config.mods.server.gaming.enable {
|
||||
mods.server.astral.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -9,11 +9,13 @@ in {
|
|||
imports = [
|
||||
./steam.nix
|
||||
./nvidia.nix
|
||||
./minecraft.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) (
|
||||
(mkPackages "steam") ++
|
||||
(mkPackages "minecraft") ++
|
||||
(mkPackages "nvidia")
|
||||
);
|
||||
}
|
||||
|
|
|
|||
33
modules/nixos/unfree/minecraft.nix
Normal file
33
modules/nixos/unfree/minecraft.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, lib, config, inputs, ... }: {
|
||||
options.mods.unfree.minecraft = {
|
||||
enable = lib.mkEnableOption {
|
||||
default = false;
|
||||
description = "enables minecraft";
|
||||
};
|
||||
packages = lib.mkOption {
|
||||
default = [
|
||||
"minecraft-server"
|
||||
];
|
||||
description = "unfree packages";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
];
|
||||
|
||||
config = lib.mkIf config.mods.unfree.minecraft.enable {
|
||||
nixpkgs.overlays = [
|
||||
inputs.nix-minecraft.overlay
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue