Compare commits

...

3 commits

Author SHA1 Message Date
Victor Mignot c9b9cf00b1
camelot: Add minecraft server 2024-10-26 15:15:28 +02:00
Victor Mignot 4fee95b03c
Update flake.lock 2024-10-26 15:15:27 +02:00
Victor Mignot ccb7a77a1c
london: add Minecraft 2024-10-26 15:15:25 +02:00
6 changed files with 64 additions and 19 deletions

View file

@ -55,6 +55,7 @@
my.server.mollysocket.enable = true;
my.server.blog.enable = true;
my.server.papermc.enable = true;
my.users = {
dala = {

View file

@ -72,8 +72,6 @@
{
programs.helix.enable = true;
home.packages = with pkgs; [ (cutter.withPlugins (plugins: with plugins; [ rz-ghidra ])) ];
my.desktop.sway.monitors = [
{
name = "Iiyama North America PL2470H 0x0000047B";
@ -94,6 +92,7 @@
my.development.tools.networking.enable = true;
my.games.wine.enable = true;
my.games.steam.enable = true;
my.games.minecraft.enable = true;
};
};
};

View file

@ -184,11 +184,11 @@
]
},
"locked": {
"lastModified": 1728337164,
"narHash": "sha256-VdRTjJFyq4Q9U7Z/UoC2Q5jK8vSo6E86lHc2OanXtvc=",
"lastModified": 1729894599,
"narHash": "sha256-nL9nzNE5/re/P+zOv7NX6bRm5e+DeS1HIufQUJ01w20=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "038630363e7de57c36c417fd2f5d7c14773403e4",
"rev": "93435d27d250fa986bfec6b2ff263161ff8288cb",
"type": "github"
},
"original": {
@ -289,11 +289,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1728500571,
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"lastModified": 1729691686,
"narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d51c28603def282a24fa034bcb007e2bcb5b5dd0",
"rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37",
"type": "github"
},
"original": {
@ -305,11 +305,11 @@
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1728156290,
"narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
"lastModified": 1729357638,
"narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "17ae88b569bb15590549ff478bab6494dde4a907",
"rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
"type": "github"
},
"original": {
@ -321,11 +321,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"lastModified": 1729665710,
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
"type": "github"
},
"original": {
@ -424,11 +424,11 @@
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1728345710,
"narHash": "sha256-lpunY1+bf90ts+sA2/FgxVNIegPDKCpEoWwOPu4ITTQ=",
"lastModified": 1729931925,
"narHash": "sha256-3tjYImjVzsSM4sU+wTySF94Yop1spI/XomMBEpljKvQ=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "06535d0e3d0201e6a8080dd32dbfde339b94f01b",
"rev": "b2211d1a537136cc1d0d5c0af391e8712016b34e",
"type": "github"
},
"original": {

View file

@ -5,5 +5,6 @@
./nginx.nix
./mollysocket.nix
./blog.nix
./minecraft.nix
];
}

View file

@ -0,0 +1,22 @@
{
pkgs,
lib,
config,
...
}:
with lib;
{
options.my.server.papermc.enable = mkOption {
type = types.bool;
default = false;
};
config = mkIf config.my.server.papermc.enable {
services.minecraft-server = {
enable = true;
package = pkgs.papermc;
dataDir = "/srv/minecraft";
openFirewall = true;
};
};
}

View file

@ -16,9 +16,31 @@ with lib;
type = types.bool;
default = false;
};
minecraft.enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.my.games.wine.enable {
home.packages = with pkgs; [ wineWowPackages.waylandFull ];
config = {
home.packages =
[ ]
++ (
if config.my.games.wine.enable then
[
pkgs.wineWowPackages.waylandFull
]
else
[ ]
)
++ (
if config.my.games.minecraft.enable then
[
pkgs.prismlauncher
]
else
[ ]
);
};
}