Simplify more options

This commit is contained in:
Jimbo 2025-02-02 13:42:37 -05:00
parent fbfedfd761
commit 8c2bf296ca
8 changed files with 33 additions and 58 deletions

View file

@ -1,9 +1,6 @@
{ lib, config, ... }: { config, lib, ... }:
{ {
options.system.wireguard.client.enable = lib.mkOption { options.system.wireguard.client.enable = lib.mkEnableOption "Enable the Wireguard client";
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.system.wireguard.client.enable { config = lib.mkIf config.system.wireguard.client.enable {
networking = { networking = {

View file

@ -1,9 +1,6 @@
{ lib, config, ... }: { config, lib, ... }:
{ {
options.system.wireguard.server.enable = lib.mkOption { options.system.wireguard.server.enable = lib.mkEnableOption "Enable the Wireguard server";
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.system.wireguard.server.enable { config = lib.mkIf config.system.wireguard.server.enable {
networking = { networking = {

View file

@ -1,9 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
options.system.wireless.enable = lib.mkOption { options.system.wireless.enable = lib.mkEnableOption "Enable wireless stack";
type = lib.types.bool;
default = true;
};
config = lib.mkIf config.system.wireless.enable { config = lib.mkIf config.system.wireless.enable {
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.udev = { services.udev.packages = [
packages = [
(pkgs.writeTextFile { (pkgs.writeTextFile {
name = "10-oculus.rules"; name = "10-oculus.rules";
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"''; text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
@ -13,5 +12,4 @@
destination = "/etc/udev/rules.d/10-pdp.rules"; destination = "/etc/udev/rules.d/10-pdp.rules";
}) })
]; ];
};
} }

View file

@ -1,9 +1,6 @@
{ lib, pkgs, config, ... }: { config, lib, pkgs, ... }:
{ {
options.system.video.nouveau.enable = lib.mkOption { options.system.video.nouveau.enable = lib.mkEnableOption "Enable the Nouveau graphics stack";
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.system.video.nouveau.enable { config = lib.mkIf config.system.video.nouveau.enable {
services.xserver.videoDrivers = [ "nouveau" ]; services.xserver.videoDrivers = [ "nouveau" ];

View file

@ -1,9 +1,6 @@
{ lib, pkgs, config, ... }: { config, lib, pkgs, ... }:
{ {
options.system.video.nvidia.enable = lib.mkOption { options.system.video.nvidia.enable = lib.mkEnableOption "Enable the Nvidia graphics stack";
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.system.video.nvidia.enable { config = lib.mkIf config.system.video.nvidia.enable {
hardware = { hardware = {

View file

@ -1,12 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
options.system.libvirtd = { options.system.libvirtd.enable = lib.mkEnableOption "Enable libvirtd services";
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable libvirtd and such";
};
};
config = lib.mkIf config.system.libvirtd.enable { config = lib.mkIf config.system.libvirtd.enable {
virtualisation = { virtualisation = {

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }: { config, lib, pkgs, ... }:
{ {
config = lib.mkIf config.system.desktop.enable { xdg.portal = lib.mkIf config.system.desktop.enable {
xdg.portal = {
wlr = { wlr = {
enable = lib.mkForce true; enable = lib.mkForce true;
settings.screencast = { settings.screencast = {
@ -14,5 +13,4 @@
xdg-desktop-portal-gnome xdg-desktop-portal-gnome
]; ];
}; };
};
} }