Merge remote-tracking branch 'origin' into hm-standalone-config
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
{
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
aagl,
|
||||
vintage-story,
|
||||
...
|
||||
}: let
|
||||
cfg = config.gaming;
|
||||
in {
|
||||
imports = [
|
||||
aagl.nixosModules.default
|
||||
];
|
||||
|
||||
options.gaming = {
|
||||
steam = {
|
||||
enable = lib.mkEnableOption "Steam gaming platform";
|
||||
@@ -62,6 +68,14 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
vkbasalt = {
|
||||
enable = lib.mkEnableOption "vkBasalt/ReShade/GShade post processing shaders";
|
||||
};
|
||||
|
||||
mangohud = {
|
||||
enable = lib.mkEnableOption "OpenGL/Vulkan overlay tool shown in games presenting FPS, CPU/GPU/memory utilization, load, etc.";
|
||||
};
|
||||
|
||||
lutris = {
|
||||
enable = lib.mkEnableOption "Lutris game manager and launcher";
|
||||
package = lib.mkOption {
|
||||
@@ -108,9 +122,38 @@ in {
|
||||
ffxiv = {
|
||||
enable = lib.mkEnableOption "Final Fantasy XIV and it's accompanied (unofficial) launcher";
|
||||
};
|
||||
|
||||
# TODO: when aagl gets it's unified launcher all finished/in a stable state, transition to that launcher
|
||||
aagl = {
|
||||
anime-game-launcher = {
|
||||
enable = lib.mkEnableOption "Genshin Impact launcher (legacy)";
|
||||
};
|
||||
|
||||
honkers-railway-launcher = {
|
||||
enable = lib.mkEnableOption "Honkai: Star Rail launcher";
|
||||
};
|
||||
|
||||
honkers-launcher = {
|
||||
enable = lib.mkEnableOption "Honkai: Impact 3rd launcher";
|
||||
};
|
||||
|
||||
wavey-launcher = {
|
||||
enable = lib.mkEnableOption "Wuthering Waves launcher";
|
||||
};
|
||||
|
||||
sleepy-launcher = {
|
||||
enable = lib.mkEnableOption "Zenless Zone Zero (ZZZ) launcher";
|
||||
};
|
||||
};
|
||||
|
||||
vintage-story = {
|
||||
enable = lib.mkEnableOption "Vintage Story client and server";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
config = let
|
||||
agl = cfg.aagl;
|
||||
in {
|
||||
programs.steam = lib.mkIf cfg.steam.enable {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
||||
@@ -139,6 +182,26 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.honkers-railway-launcher = lib.mkIf agl.honkers-railway-launcher.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.honkers-launcher = lib.mkIf agl.honkers-launcher.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.wavey-launcher = lib.mkIf agl.wavey-launcher.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.sleepy-launcher = lib.mkIf agl.sleepy-launcher.enable {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
(lib.optionals cfg.lutris.enable (
|
||||
[cfg.lutris.package] ++
|
||||
@@ -154,6 +217,20 @@ in {
|
||||
cfg.lutris.extraPackages
|
||||
)) ++
|
||||
(lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++
|
||||
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher]);
|
||||
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++
|
||||
(lib.optionals cfg.vintage-story.enable [vintage-story.packages.${pkgs.system}.default]) ++
|
||||
(lib.optionals cfg.vkbasalt.enable [pkgs.vkbasalt pkgs.vkbasalt-cli]) ++
|
||||
(lib.optionals cfg.mangohud.enable [pkgs.mangohud]) ++
|
||||
(lib.optionals (cfg.vkbasalt.enable || cfg.mangohud.enable) [pkgs.goverlay pkgs.mesa-demos pkgs.vulkan-tools]);
|
||||
|
||||
nix.settings = let
|
||||
inherit agl;
|
||||
in (lib.mkIf
|
||||
(agl.anime-game-launcher.enable || agl.honkers-railway-laucher.enable || agl.honkers-launcher.enable || agl.wavey-launcher.enable || agl.sleepy-launcher.enable)
|
||||
{
|
||||
substituters = [ "https://ezkea.cachix.org" ];
|
||||
trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ];
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,3 +7,11 @@ Licensed by the Mozilla Public License v2
|
||||
## Synopsis
|
||||
|
||||
This is the directory that holds shared configuration files amongst computers that I own. They are called by the root `flake.nix` file.
|
||||
|
||||
Here's a quick synopsis of each file:
|
||||
|
||||
- core: Sane Nix options that I set for myself
|
||||
- environment: Core packages and environment variables to be set and installed
|
||||
- fonts: Fonts and icons that are to be installed
|
||||
- overlays: Customized packages tailored to my needs
|
||||
- users: Users to be set on my system
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
systemd
|
||||
lshw
|
||||
dmidecode
|
||||
nix-ld
|
||||
]) ++
|
||||
lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
|
||||
# nothing here, yet ;)
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
fonts.packages = with pkgs;
|
||||
[
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-color-emoji
|
||||
liberation_ttf
|
||||
noto-fonts-cjk-sans
|
||||
monaspace
|
||||
]
|
||||
++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
adwaita-icon-theme
|
||||
];
|
||||
}
|
||||
|
||||
62
modules/common/linker.nix
Normal file
62
modules/common/linker.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs;
|
||||
[
|
||||
acl
|
||||
attr
|
||||
bzip2
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
fuse3
|
||||
icu
|
||||
libnotify
|
||||
libsodium
|
||||
libssh
|
||||
libunwind
|
||||
libusb1
|
||||
libuuid
|
||||
nspr
|
||||
nss
|
||||
stdenv.cc.cc
|
||||
util-linux
|
||||
zlib
|
||||
zstd
|
||||
pipewire
|
||||
cups
|
||||
libxkbcommon
|
||||
pango
|
||||
mesa
|
||||
libdrm
|
||||
libglvnd
|
||||
libpulseaudio
|
||||
atk
|
||||
cairo
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libGL
|
||||
libappindicator-gtk3
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcomposite
|
||||
xorg.libXcursor
|
||||
xorg.libXdamage
|
||||
xorg.libXext
|
||||
xorg.libXfixes
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
xorg.libXrender
|
||||
xorg.libXtst
|
||||
xorg.libxcb
|
||||
xorg.libxkbfile
|
||||
xorg.libxshmfence
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -40,7 +40,6 @@ in {
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
glxinfo
|
||||
vulkan-tools
|
||||
mesa-demos
|
||||
];
|
||||
@@ -62,9 +61,9 @@ in {
|
||||
|
||||
(mkIf (cfg.gpuVendor == "amd") {
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
# hardware.graphics.extraPackages = with pkgs; [
|
||||
# amdvlk
|
||||
# ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
|
||||
@@ -12,4 +12,4 @@ These are named after Final Fantasy VII characters.
|
||||
|
||||
### Servers/Network Infrastructure
|
||||
|
||||
These are named after Final Fantasy summons.
|
||||
These are named after Final Fantasy summons. There is some infrastructure missing here like my routers and switches that I also name after summons.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
userName,
|
||||
aagl,
|
||||
...
|
||||
}: let
|
||||
flatpakPackages = [
|
||||
@@ -18,7 +18,7 @@
|
||||
in {
|
||||
imports = [
|
||||
(import ../../apps/flatpak.nix {
|
||||
inherit lib pkgs flatpakPackages userName;
|
||||
inherit lib pkgs flatpakPackages userName aagl;
|
||||
})
|
||||
../../apps/gaming.nix
|
||||
../../apps/appimage.nix
|
||||
@@ -89,8 +89,10 @@ in {
|
||||
localNetworkGameTransfers = true;
|
||||
};
|
||||
};
|
||||
vkbasalt.enable = true;
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
mangohud.enable = true;
|
||||
lutris = {
|
||||
enable = true;
|
||||
wine = {
|
||||
@@ -100,14 +102,12 @@ in {
|
||||
compatibility = {
|
||||
protonSupport = true;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
gamemode
|
||||
mangohud
|
||||
];
|
||||
};
|
||||
|
||||
ffxiv.enable = true;
|
||||
minecraft.enable = true;
|
||||
aagl.anime-game-launcher.enable = true;
|
||||
vintage-story.enable = true;
|
||||
};
|
||||
|
||||
# Power management (see ../../pwrMgmt/default.nix)
|
||||
@@ -151,7 +151,7 @@ in {
|
||||
};
|
||||
|
||||
# Add username to groups "wheel" and "video" - more may be added here later
|
||||
users.users.${userName}.extraGroups = ["wheel" "video" "gamemode" "podman" "network"];
|
||||
users.users.${userName}.extraGroups = ["wheel" "video" "gamemode" "podman" "network" "libvirtd"];
|
||||
|
||||
services = {
|
||||
# Enable OpenSSH
|
||||
@@ -191,5 +191,23 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# sched_ext userspace CPU scheduling stuff - idk
|
||||
services.scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_bpfland";
|
||||
};
|
||||
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
obs-vaapi #optional AMD hardware acceleration
|
||||
obs-gstreamer
|
||||
obs-vkcapture
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
../../common/linker.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{...}: {
|
||||
# TODO: refactor into module
|
||||
{ pkgs, ...}: {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
helvum
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{...}: {
|
||||
{ pkgs, ... }: {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
quickemu
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user