options follow my.schema to avoid conflicts
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib; {
|
||||
users.users.satisfactory = {
|
||||
home = "/var/lib/satisfactory";
|
||||
createHome = true;
|
||||
isSystemUser = true;
|
||||
group = "satisfactory";
|
||||
};
|
||||
users.groups.satisfactory = { };
|
||||
|
||||
# boot.kernel.sysctl."net.ipv6.conf.eth0.disable_ipv6" = true;
|
||||
networking.enableIPv6 = false;
|
||||
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
#
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 15777 15000 7777 27015 ];
|
||||
allowedUDPPortRanges = [{
|
||||
from = 27031;
|
||||
to = 27036;
|
||||
}];
|
||||
allowedTCPPorts = [ 27015 27036 ];
|
||||
};
|
||||
};
|
||||
|
||||
# -beta experimental \
|
||||
systemd.services.satisfactory = {
|
||||
preStart = ''
|
||||
${pkgs.steamcmd}/bin/steamcmd \
|
||||
+force_install_dir /var/lib/satisfactory/SatisfactoryServer \
|
||||
+login anonymous \
|
||||
+app_update 1690800 \
|
||||
validate \
|
||||
+quit
|
||||
'';
|
||||
script = ''
|
||||
${pkgs.steam-run}/bin/steam-run /var/lib/satisfactory/SatisfactoryServer/FactoryServer.sh -DisablePacketRouting
|
||||
'';
|
||||
serviceConfig = {
|
||||
Nice = "-5";
|
||||
Restart = "always";
|
||||
User = "satisfactory";
|
||||
WorkingDirectory = "/var/lib/satisfactory";
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/services/network.nix
Normal file
18
modules/services/network.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.my.services.network.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.services.network.enable {
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
enableIPv6 = false;
|
||||
networkmanager.enable = true;
|
||||
extraHosts = ''
|
||||
192.168.1.64 workstation
|
||||
192.168.1.69 server
|
||||
192.168.1.100 miniserver
|
||||
'';
|
||||
firewall = { enable = true; };
|
||||
};
|
||||
};
|
||||
}
|
||||
25
modules/services/nvidia.nix
Normal file
25
modules/services/nvidia.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.my.services.nvidia.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.services.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/services/printing.nix
Normal file
16
modules/services/printing.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let printingDrivers = [ pkgs.hplip pkgs.hplipWithPlugin ];
|
||||
in {
|
||||
options.my.services.printing.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.services.printing.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = printingDrivers;
|
||||
};
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = printingDrivers;
|
||||
};
|
||||
users.users.jawz.packages = [ pkgs.gnome.simple-scan ];
|
||||
};
|
||||
}
|
||||
27
modules/services/sound.nix
Normal file
27
modules/services/sound.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
# let
|
||||
# nixGaming = import (builtins.fetchTarball
|
||||
# "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
|
||||
# in
|
||||
{
|
||||
imports = [
|
||||
# nixGaming.nixosModules.pipewireLowLatency
|
||||
];
|
||||
options.my.services.sound.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.services.sound.enable {
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# lowLatency = {
|
||||
# enable = true;
|
||||
# quantum = 64;
|
||||
# rate = 48000;
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user