# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, mms, ... }: { imports = [ ./hardware-configuration-void.nix ./common.nix mms.module ]; networking.hostName = "void"; # Define your hostname. services.samba = { enable = true; openFirewall = true; securityType = "user"; settings.global = { workgroup = "WORKGROUP"; "server string" = "void"; "netbios name" = "void"; security = "user"; "hosts allow" = "0.0.0.0/0"; "guest account" = "nobody"; "map to guest" = "bad user"; "log level" = 4; #"smb encrypt" = "mandatory"; }; shares."Music" = { path = "/pile/Music"; browsable = "yes"; "read only" = "yes"; "guest ok" = "no"; "read list" = "@music"; }; }; users.users.music = { group = "music"; isNormalUser = true; }; # enqble i2c-dev kernel module for control of backlight in external monitor # https://discourse.nixos.org/t/how-to-enable-ddc-brightness-control-i2c-permissions/20800/3 boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; boot.kernelModules = ["i2c-dev" "ddcci_backlight"]; hardware.i2c.enable = true; # package for controlling brightness on external monitor environment.systemPackages = [ pkgs.ddcutil ]; # mount external drive fileSystems."/external".label = "external"; # backup services.borgbackup.jobs."external" = { paths = [ "/home" "/var" "/pile" ]; exclude = [ "/home/*/.local/share/Steam" "**/*cache" "**/*Cache" "**/*trash" "**/*Trash" "/home/*/.mozilla/firefox" "/home/*/GOG Games" "**/target" "**/result" ]; repo = "/external/voidbackup"; encryption = { mode = "repokey-blake2"; passCommand = "cat /root/borgbackup/passphrase"; }; compression = "auto,lzma"; startAt = "daily"; persistentTimer = true; }; systemd.services."borgbackup-job-external" = { unitConfig = { RequiresMountsFor = "/external"; Requires = "external.mount"; }; }; # minecraft TerraFirmaGreg server services.modded-minecraft-servers = { eula = true; instances.terrafirmagreg = { enable = true; rsyncSSHKeys = [""]; serverConfig = { server-port = 25565; motd = "Welcome to logistic-bot's TerraFirmaGreg server"; allow-flight = true; allow-nether = false; difficulty = 0; enable-rcon = false; level-type = "tfc\:overworld"; view-distance = 24; }; jvmPackage = pkgs.jdk17; jvmMaxAllocation = "8196M"; jvmInitialAllocation = "2048M"; # "Borrowed" from AllTheMods Discord jvmOpts = builtins.concatStringsSep " " [ "-XX:+UseG1GC" "-XX:+ParallelRefProcEnabled" "-XX:MaxGCPauseMillis=200" "-XX:+UnlockExperimentalVMOptions" "-XX:+DisableExplicitGC" "-XX:+AlwaysPreTouch" "-XX:G1NewSizePercent=40" "-XX:G1MaxNewSizePercent=50" "-XX:G1HeapRegionSize=16M" "-XX:G1ReservePercent=15" "-XX:G1HeapWastePercent=5" "-XX:G1MixedGCCountTarget=4" "-XX:InitiatingHeapOccupancyPercent=20" "-XX:G1MixedGCLiveThresholdPercent=90" "-XX:G1RSetUpdatingPauseTimePercent=5" "-XX:SurvivorRatio=32" "-XX:+PerfDisableSharedMem" "-XX:MaxTenuringThreshold=1" ]; }; }; }