Compare commits
3 Commits
67fda15ca9
...
c452ebff3c
| Author | SHA1 | Date | |
|---|---|---|---|
| c452ebff3c | |||
| a1e71488d8 | |||
| 45c8f7ec27 |
@@ -2,12 +2,15 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
vintage-story ? null,
|
aagl,
|
||||||
|
vintage-story,
|
||||||
...
|
...
|
||||||
} @ args: let
|
}: let
|
||||||
cfg = config.gaming;
|
cfg = config.gaming;
|
||||||
aagl = args.aagl or null;
|
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
aagl.nixosModules.default
|
||||||
|
];
|
||||||
|
|
||||||
options.gaming = {
|
options.gaming = {
|
||||||
steam = {
|
steam = {
|
||||||
@@ -150,9 +153,7 @@ in {
|
|||||||
|
|
||||||
config = let
|
config = let
|
||||||
agl = cfg.aagl;
|
agl = cfg.aagl;
|
||||||
hasAagl = aagl != null;
|
in {
|
||||||
in lib.mkMerge [
|
|
||||||
{
|
|
||||||
programs.steam = lib.mkIf cfg.steam.enable {
|
programs.steam = lib.mkIf cfg.steam.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
||||||
@@ -181,28 +182,6 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages =
|
|
||||||
(lib.optionals cfg.lutris.enable (
|
|
||||||
[cfg.lutris.package] ++
|
|
||||||
(lib.optionals cfg.lutris.wine.enable [
|
|
||||||
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.minecraft.enable [pkgs.prismlauncher]) ++
|
|
||||||
(lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++
|
|
||||||
(lib.optionals (cfg.vintage-story.enable && vintage-story != null) [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]);
|
|
||||||
}
|
|
||||||
(lib.optionalAttrs hasAagl {
|
|
||||||
programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable {
|
programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
@@ -223,12 +202,35 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings = lib.mkIf
|
environment.systemPackages =
|
||||||
(agl.anime-game-launcher.enable || agl.honkers-railway-launcher.enable || agl.honkers-launcher.enable || agl.wavey-launcher.enable || agl.sleepy-launcher.enable)
|
(lib.optionals cfg.lutris.enable (
|
||||||
|
[cfg.lutris.package] ++
|
||||||
|
(lib.optionals cfg.lutris.wine.enable [
|
||||||
|
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.minecraft.enable [pkgs.prismlauncher]) ++
|
||||||
|
(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" ];
|
substituters = [ "https://ezkea.cachix.org" ];
|
||||||
trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ];
|
trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ];
|
||||||
};
|
}
|
||||||
})
|
);
|
||||||
];
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ in {
|
|||||||
(import ../../apps/flatpak.nix {
|
(import ../../apps/flatpak.nix {
|
||||||
inherit lib pkgs flatpakPackages userName aagl;
|
inherit lib pkgs flatpakPackages userName aagl;
|
||||||
})
|
})
|
||||||
aagl.nixosModules.default
|
|
||||||
../../apps/gaming.nix
|
../../apps/gaming.nix
|
||||||
../../apps/appimage.nix
|
../../apps/appimage.nix
|
||||||
../../graphics
|
../../graphics
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
userName,
|
userName,
|
||||||
|
vintage-story,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
../../apps/gaming.nix
|
|
||||||
../../pwrMgmt
|
../../pwrMgmt
|
||||||
../../networking/core.nix
|
../../networking/core.nix
|
||||||
../../virtualization/podman.nix
|
../../virtualization/podman.nix
|
||||||
@@ -46,10 +46,6 @@
|
|||||||
powertop.enable = false;
|
powertop.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
gaming = {
|
|
||||||
vintage-story.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
network = {
|
network = {
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -63,6 +59,10 @@
|
|||||||
networkManager.enable = true;
|
networkManager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
vintage-story.packages.${pkgs.system}.default
|
||||||
|
];
|
||||||
|
|
||||||
# Podman module (see ../../virtualization/podman.nix)
|
# Podman module (see ../../virtualization/podman.nix)
|
||||||
# podman = {
|
# podman = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
|
|||||||
@@ -1,32 +1,3 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
{ ... }: {
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# TODO: needs to filled out later
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/0a885c0e-cf31-43b7-9a91-6f9624758102";
|
|
||||||
fsType = "xfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/C7B5-89D4";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/860c75ce-3afe-47cf-90d8-7612ab543a1e"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user