summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-06-02 14:15:56 +0200
committerSilas Schöffel <sils@sils.li>2024-06-02 14:15:56 +0200
commit8110cae57e1e82a38bda2b6bfb1c3db4b2d1674b (patch)
tree678522f7f00ee8524ab8f9bdfe0e6a1e4c0ad73a /modules
parentgit: init module (diff)
downloadnix-config-8110cae57e1e82a38bda2b6bfb1c3db4b2d1674b.tar.gz
nix-config-8110cae57e1e82a38bda2b6bfb1c3db4b2d1674b.zip
bluetooth: init module
Diffstat (limited to '')
-rw-r--r--modules/nixos/sils/bluetooth.nix12
-rw-r--r--modules/nixos/sils/default.nix3
-rw-r--r--modules/nixos/sils/roles.nix1
3 files changed, 15 insertions, 1 deletions
diff --git a/modules/nixos/sils/bluetooth.nix b/modules/nixos/sils/bluetooth.nix
new file mode 100644
index 0000000..2d67717
--- /dev/null
+++ b/modules/nixos/sils/bluetooth.nix
@@ -0,0 +1,12 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.sils.bluetooth;
+in {
+  options.sils.bluetooth.enable = lib.mkEnableOption "bluetooth";
+  config = lib.mkIf cfg.enable {
+    hardware.bluetooth.enable = true;
+  };
+}
diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix
index 926814f..9a0c533 100644
--- a/modules/nixos/sils/default.nix
+++ b/modules/nixos/sils/default.nix
@@ -1,11 +1,12 @@
 {...}: {
   imports = [
-    ./roles.nix
     ./basesystem.nix
+    ./bluetooth.nix
     ./meta.nix
     ./networking.nix
     ./nix.nix
     ./plymouth.nix
+    ./roles.nix
     ./sudo.nix
     ./theming.nix
   ];
diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix
index 811c0ea..3b88e99 100644
--- a/modules/nixos/sils/roles.nix
+++ b/modules/nixos/sils/roles.nix
@@ -4,6 +4,7 @@ in {
   config.sils =
     if roleCmp "laptop"
     then {
+      bluetooth.enable = true;
       basesystem.enable = true;
       networking.enable = true;
       nix-config.enable = true;