nixos: modules: hardware: simplify
This commit is contained in:
parent
933a53f94a
commit
1ee4b0ca9a
6 changed files with 11 additions and 16 deletions
|
@ -9,7 +9,7 @@
|
|||
];
|
||||
|
||||
services.hdapsd.enable = false;
|
||||
myFlake.hardware.components.misc = {
|
||||
myFlake.hardware.components = {
|
||||
audio.enable = true;
|
||||
bluetooth.enable = true;
|
||||
tpm.enable = true;
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myFlake.hardware.components.misc.audio;
|
||||
cfg = config.myFlake.hardware.components.audio;
|
||||
in {
|
||||
options = {
|
||||
myFlake.hardware.components.misc.audio.enable = lib.mkEnableOption "Whether to enable audio.";
|
||||
myFlake.hardware.components.misc.audio.soundServer = lib.mkOption {
|
||||
myFlake.hardware.components.audio.enable = lib.mkEnableOption "Whether to enable audio.";
|
||||
myFlake.hardware.components.audio.soundServer = lib.mkOption {
|
||||
type = lib.types.enum ["pipewire" "pulseaudio"];
|
||||
default = "pipewire";
|
||||
example = "pulseaudio";
|
|
@ -4,10 +4,10 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myFlake.hardware.components.misc.bluetooth;
|
||||
cfg = config.myFlake.hardware.components.bluetooth;
|
||||
in {
|
||||
options = {
|
||||
myFlake.hardware.components.misc.bluetooth.enable = lib.mkEnableOption "Whether to enable bluetooth.";
|
||||
myFlake.hardware.components.bluetooth.enable = lib.mkEnableOption "Whether to enable bluetooth.";
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/Bluetooth
|
|
@ -1,5 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./misc
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./tpm.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./tpm.nix
|
||||
];
|
||||
}
|
|
@ -3,10 +3,10 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myFlake.hardware.components.misc.tpm;
|
||||
cfg = config.myFlake.hardware.components.tpm;
|
||||
in {
|
||||
options = {
|
||||
myFlake.hardware.components.misc.tpm.enable = lib.mkEnableOption "Whether to enable TPM.";
|
||||
myFlake.hardware.components.tpm.enable = lib.mkEnableOption "Whether to enable TPM.";
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/TPM
|
Loading…
Reference in a new issue