Merge remote-tracking branch 'origin' into neovim-refactoring
This commit is contained in:
+25
-15
@@ -76,6 +76,16 @@ in {
|
||||
enable = lib.mkEnableOption "OpenGL/Vulkan overlay tool shown in games presenting FPS, CPU/GPU/memory utilization, load, etc.";
|
||||
};
|
||||
|
||||
proton = {
|
||||
enable = lib.mkEnableOption "Proton compatibility tool management";
|
||||
|
||||
manager = lib.mkOption {
|
||||
type = lib.types.enum ["protonplus" "protonup-qt"];
|
||||
default = "protonup-qt";
|
||||
description = "Graphical Proton compatibility tool manager to install";
|
||||
};
|
||||
};
|
||||
|
||||
lutris = {
|
||||
enable = lib.mkEnableOption "Lutris game manager and launcher";
|
||||
package = lib.mkOption {
|
||||
@@ -93,14 +103,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# Compatibility layers for Lutris
|
||||
compatibility = {
|
||||
protonSupport = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Proton-like compatibility layers for Lutris";
|
||||
};
|
||||
|
||||
extraTools = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [];
|
||||
@@ -153,17 +156,27 @@ in {
|
||||
archon = {
|
||||
enable = lib.mkEnableOption "Archon from NUR";
|
||||
};
|
||||
|
||||
opengoal = {
|
||||
enable = lib.mkEnableOption "OpenGOAL, a game engine used in a certain PlayStation 2 franchise";
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
agl = cfg.aagl;
|
||||
nurPkgs = import "${nur.outPath}/pkgs" {
|
||||
inherit pkgs;
|
||||
hildibrand = nur.inputs.hildibrand.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
};
|
||||
nurPkgs = import "${nur.outPath}/pkgs" { inherit pkgs; };
|
||||
protonManager = {
|
||||
protonplus = pkgs.protonplus;
|
||||
protonup-qt = pkgs.protonup-qt;
|
||||
}.${cfg.proton.manager};
|
||||
in {
|
||||
programs.steam = lib.mkIf cfg.steam.enable {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
gamescope
|
||||
gamemode
|
||||
];
|
||||
|
||||
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
||||
localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers;
|
||||
};
|
||||
@@ -217,13 +230,10 @@ in {
|
||||
cfg.lutris.wine.package
|
||||
pkgs.winetricks
|
||||
]) ++
|
||||
(lib.optionals cfg.lutris.compatibility.protonSupport [
|
||||
pkgs.protonup-ng
|
||||
pkgs.protonup-qt
|
||||
]) ++
|
||||
cfg.lutris.compatibility.extraTools ++
|
||||
cfg.lutris.extraPackages
|
||||
)) ++
|
||||
(lib.optionals cfg.proton.enable [protonManager]) ++
|
||||
(lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++
|
||||
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++
|
||||
(lib.optionals cfg.vintage-story.enable [nurPkgs.vintage-story]) ++
|
||||
|
||||
@@ -43,6 +43,11 @@ in {
|
||||
vulkan-tools
|
||||
mesa-demos
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
}
|
||||
|
||||
(mkIf (cfg.gpuVendor == "nvidia") {
|
||||
@@ -61,9 +66,6 @@ in {
|
||||
|
||||
(mkIf (cfg.gpuVendor == "amd") {
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
# hardware.graphics.extraPackages = with pkgs; [
|
||||
# amdvlk
|
||||
# ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
@@ -82,7 +84,6 @@ in {
|
||||
environment.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
pkgs,
|
||||
userName,
|
||||
aagl,
|
||||
nur,
|
||||
...
|
||||
}: let
|
||||
flatpakPackages = [
|
||||
@@ -111,15 +110,16 @@ in {
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
mangohud.enable = true;
|
||||
proton = {
|
||||
enable = true;
|
||||
manager = "protonplus";
|
||||
};
|
||||
lutris = {
|
||||
enable = true;
|
||||
wine = {
|
||||
enable = true;
|
||||
package = pkgs.wine-staging;
|
||||
};
|
||||
compatibility = {
|
||||
protonSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
ffxiv.enable = true;
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
nur,
|
||||
...
|
||||
}: let
|
||||
hildibrand = nur.packages.${pkgs.stdenv.hostPlatform.system}.hildibrand;
|
||||
in {
|
||||
imports = [
|
||||
../../pwrMgmt
|
||||
../../networking/core.nix
|
||||
];
|
||||
|
||||
# Enable flakes for NixOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Custom kernel/boot stuff
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Set your timezone
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Enable keyring
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable GnuPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable SUID wrappers (some programs need them)
|
||||
programs.mtr.enable = true;
|
||||
|
||||
# Enable Polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Power management (see ../../pwrMgmt/default.nix)
|
||||
pwrMgmt = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "performance";
|
||||
powertop.enable = false;
|
||||
};
|
||||
|
||||
network = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
};
|
||||
networkManager.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
hildibrand
|
||||
];
|
||||
|
||||
systemd.services.hildibrand = {
|
||||
description = "Hildibrand - trivia buzzer bot";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = userName;
|
||||
WorkingDirectory = "/home/${userName}";
|
||||
ExecStart = "${hildibrand}/bin/hildebrand";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
|
||||
# Add username to groups "wheel" and "video" - more may be added here later
|
||||
users = {
|
||||
users = {
|
||||
${userName} = {
|
||||
extraGroups = [ "wheel" "network" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFV9eSc9L+aJLoKoexq2f/jb5rpyZnhuGiyhS8YQAbaS wyatt@wyattjmiller.com"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4WKvKnnYpTbzZHFEslOKyfiiMqWxhW3AfX6E7ACmYU wyatt@wyattjmiller.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
package = pkgs.fail2ban;
|
||||
maxretry = 5;
|
||||
bantime = "3h";
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
rndtime = "10m";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/498ce176-f090-46d8-96bf-9e6141cffa19";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/09A6-B803";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/4a64a2ee-2b32-4e53-b00f-7b1f127162aa"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
nur,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../pwrMgmt
|
||||
../../networking/core.nix
|
||||
../../virtualization/podman.nix
|
||||
];
|
||||
|
||||
# Enable flakes for NixOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Custom kernel/boot stuff
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Set your timezone
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Enable keyring
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable GnuPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable SUID wrappers (some programs need them)
|
||||
programs.mtr.enable = true;
|
||||
|
||||
# Enable Polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Power management (see ../../pwrMgmt/default.nix)
|
||||
pwrMgmt = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "performance";
|
||||
powertop.enable = false;
|
||||
};
|
||||
|
||||
network = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
tcpPorts = {
|
||||
allowedPorts = [ 42420 ];
|
||||
};
|
||||
udpPorts = {
|
||||
allowedPorts = [ 42420 ];
|
||||
};
|
||||
};
|
||||
networkManager.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
nur.packages.${pkgs.system}.vintage-story
|
||||
];
|
||||
|
||||
systemd.services.vintagestory-server = {
|
||||
description = "Vintage Story Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = userName;
|
||||
WorkingDirectory = "/home/${userName}";
|
||||
ExecStart = "${nur.packages.${pkgs.system}.vintage-story}/bin/vintagestory-server";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
|
||||
# Add username to groups "wheel" and "video" - more may be added here later
|
||||
users = {
|
||||
users = {
|
||||
${userName} = {
|
||||
extraGroups = [ "wheel" "network" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFV9eSc9L+aJLoKoexq2f/jb5rpyZnhuGiyhS8YQAbaS wyatt@wyattjmiller.com"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4WKvKnnYpTbzZHFEslOKyfiiMqWxhW3AfX6E7ACmYU wyatt@wyattjmiller.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
package = pkgs.fail2ban;
|
||||
maxretry = 5;
|
||||
bantime = "3h";
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
rndtime = "10m";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ec4c43ec-efcc-40ea-a4c8-411e60ee7c4e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/140E-FE19";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/547bbd78-85be-4d17-a519-c4a2a923bdab"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -3,6 +3,11 @@
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
Reference in New Issue
Block a user