Migrated from import based to config based
This commit is contained in:
@@ -1,15 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.hardware.bluetooth;
|
||||
in {
|
||||
options = {
|
||||
settings.hardware.bluetooth.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable bluetooth
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
config = mkIf cfg.enable {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user