refactor: servers

This commit is contained in:
WinterEkisha committed 2026-11-17 09:00:06 -08:00
1 parent 3e662f72f7
commit 32f84fd69e
4 files changed
+31 -20

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
imports = [
./users/minecraft.nix
];
networking.firewall = {
enable = true;
allowedTCPPorts = [ 25565 25567 ];
allowedUDPPorts = [ 25565 25567];
};
}
@@ -0,0 +1,26 @@
{
pkgs,
config,
lib,
...
}: let
username = "minecraft"; #FIXME
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
users.users.${username} = {
isNormalUser = true;
extraGroups = ifTheyExist [
"minecraft"
];
#packages = [pkgs.home-manager];
};
home-manager.users.${username} = import ../../../../../home/Winter/servers/${username}.nix;
security.pam.services = {
swaylock = {};
${username}.enableGnomeKeyring = true;
};
}