Overhaul luna complete

This commit is contained in:
KoenDR06 2025-02-25 15:56:58 +01:00
parent 06f5971965
commit 6f9fdca876
110 changed files with 2408 additions and 2129 deletions

View file

@ -0,0 +1,27 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.hardware.audio;
in {
options = {
horseman.hardware.audio = {
enable = mkEnableOption "";
};
};
config = {
hardware.pulseaudio.enable = false;
services.jack = {
jackd.enable = false;
alsa.enable = true;
loopback.enable = false;
};
users.extraUsers.horseman.extraGroups = ["jackaudio"];
};
}

View file

@ -0,0 +1,21 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.hardware.bluetooth;
in {
options = {
horseman.hardware.bluetooth = {
enable = mkEnableOption "Bluetooth";
};
};
config = {
hardware.bluetooth.enable = true;
};
}

View file

@ -0,0 +1,8 @@
{inputs, ...}: {
imports = [
./audio.nix
./bluetooth.nix
./gpu/nvidia.nix
./wifi.nix
];
}

View file

@ -0,0 +1,31 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.hardware.gpu.nvidia;
in {
options = {
horseman.hardware.gpu.nvidia = {
enable = mkEnableOption "Enable support for NVIDIA GPUs";
};
};
config = {
hardware.graphics.enable32Bit = true;
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
}

22
modules/hardware/wifi.nix Normal file
View file

@ -0,0 +1,22 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.hardware.wifi;
in {
options = {
horseman.hardware.wifi = {
enable = mkEnableOption "";
};
};
config = {
networking.networkmanager.enable = true;
users.users.horseman.extraGroups = ["networkmanager"];
};
}