feat: move nvidia to module option; re-org driver modules

This commit is contained in:
punkfairie 2025-05-25 18:36:34 -07:00
parent 99623ce473
commit ee90d3577f
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
8 changed files with 22 additions and 17 deletions

View file

@ -15,8 +15,11 @@ in {
marleyos = {
profiles = {
desktop = enabled;
hardware.nvidia = enabled;
desktop = true;
};
hardware = {
nvidia = enabled;
};
mounts.babeshare = enabled;

View file

@ -4,10 +4,6 @@ in {
marleyos = {
profiles = {
inherit (cfg.profiles) desktop server;
hardware = {
inherit (cfg.profiles.hardware) nvidia;
};
};
my = {

View file

@ -5,5 +5,6 @@
../base
./base
./hardware
];
}

View file

@ -1,11 +1,11 @@
{
pkgs,
config,
lib,
config,
pkgs,
...
}: {
config = lib.mkIf (!config.marleyos.profiles.server) {
security.rtkit.enable = true; # Used for pulseaudio.
security.rtkit.enable = true; # for pulseaudio
hardware.pulseaudio.enable = false;
@ -15,8 +15,6 @@
alsa.enable = true;
pulse.enable = true;
};
printing.enable = true;
};
environment.systemPackages = [pkgs.pwvucontrol];

View file

@ -0,0 +1,8 @@
{
imports = [
./audio.nix
./nvidia.nix
./misc.nix # try to use this as little as possible
];
}

View file

@ -0,0 +1,3 @@
{
services.printing.enable = true;
}

View file

@ -3,9 +3,9 @@
config,
...
}: let
cfg = config.marleyos.nvidia;
cfg = config.marleyos.hardware.nvidia;
in {
options.marleyos.nvidia.enable = lib.mkEnableOption "nvidia";
options.marleyos.hardware.nvidia.enable = lib.mkEnableOption "nvidia";
config = lib.mkIf cfg.enable {
# NVIDIA drivers are unfree.

View file

@ -2,9 +2,5 @@
options.marleyos.profiles = {
desktop = lib.mkEnableOption "graphical desktop profile";
server = lib.mkEnableOption "server profile";
hardware = {
nvidia = lib.mkEnableOption "Nvidia profile";
};
};
}