formatting
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.share.hardware.amd;
|
||||
in {
|
||||
let
|
||||
cfg = config.share.hardware.amd;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot.kernelParams = [
|
||||
(if cfg.enable then "amdgpu.ppfeaturemask=0xffffffff" else null)
|
||||
];
|
||||
boot.kernelParams = [ (if cfg.enable then "amdgpu.ppfeaturemask=0xffffffff" else null) ];
|
||||
|
||||
# Configure programs
|
||||
programs.corectrl.enable = cfg.corectrl.enable;
|
||||
@@ -47,7 +52,10 @@ in {
|
||||
# nixpkg is broken so need to manually define
|
||||
systemd.services.lactd = mkIf cfg.lact.enable {
|
||||
description = "AMDGPU Control Daemon";
|
||||
path = [ pkgs.bash pkgs.lact ];
|
||||
path = [
|
||||
pkgs.bash
|
||||
pkgs.lact
|
||||
];
|
||||
script = ''
|
||||
lact daemon
|
||||
'';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options.share.hardware.amd = {
|
||||
enable = mkEnableOption "amd hardware config";
|
||||
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
{ ... }: { imports = [ ./amd ./nvidia ./gaming ]; }
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./amd
|
||||
./nvidia
|
||||
./gaming
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.share.gaming;
|
||||
in {
|
||||
let
|
||||
cfg = config.share.gaming;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Network option required using sysctl to let Ubisoft Connect work as of 7-12-2023
|
||||
boot.kernel.sysctl."net.ipv4.tcp_mtu_probing" = 1;
|
||||
|
||||
|
||||
# Configure programs
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
# Open ports in the firewall for Steam Remote Play
|
||||
remotePlay.openFirewall = true;
|
||||
# Open ports in the firewall for Source Dedicated Server
|
||||
# Open ports in the firewall for Source Dedicated Server
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
@@ -29,18 +36,18 @@ in {
|
||||
# Configure nixpkgs
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
steam = pkgs.steam.override {
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options.share.gaming = {
|
||||
enable = mkEnableOption "enable gaming stuffs";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{ pkgs, lib, LT, config, utils, inputs, ... }@args: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
LT,
|
||||
config,
|
||||
utils,
|
||||
inputs,
|
||||
...
|
||||
}@args:
|
||||
{
|
||||
# Set up impernance configuration for things like bluetooth
|
||||
# In this configuration with /etc and /var/log being persistent, only directories outside of that need to be done here. See hardware configuration for all mountpoints.
|
||||
|
||||
@@ -17,9 +26,13 @@
|
||||
mode = "u=rwx,g=rx,o=";
|
||||
}
|
||||
];
|
||||
files = [{
|
||||
file = "/etc/nix/id_rsa";
|
||||
parentDirectory = { mode = "u=rwx,g=,o="; };
|
||||
}];
|
||||
files = [
|
||||
{
|
||||
file = "/etc/nix/id_rsa";
|
||||
parentDirectory = {
|
||||
mode = "u=rwx,g=,o=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.share.hardware.nvidia;
|
||||
in {
|
||||
let
|
||||
cfg = config.share.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
# Nvidia
|
||||
nvidia = {
|
||||
package = if cfg.enableBeta then
|
||||
config.boot.kernelPackages.nvidiaPackages.beta
|
||||
else
|
||||
config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
package =
|
||||
if cfg.enableBeta then
|
||||
config.boot.kernelPackages.nvidiaPackages.beta
|
||||
else
|
||||
config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options.share.hardware.nvidia = {
|
||||
enable = mkEnableOption "nvidia hardware config";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user