Add a bluetooth role.
This commit is contained in:
parent
a739728d41
commit
37aa0e6732
@ -58,6 +58,7 @@
|
|||||||
./roles/memtest86
|
./roles/memtest86
|
||||||
./roles/kodi
|
./roles/kodi
|
||||||
./roles/ansible
|
./roles/ansible
|
||||||
|
./roles/bluetooth
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
|
@ -29,4 +29,5 @@
|
|||||||
me.graphicsCardType = "intel";
|
me.graphicsCardType = "intel";
|
||||||
|
|
||||||
me.kodi.enable = true;
|
me.kodi.enable = true;
|
||||||
|
me.bluetooth.enable = true;
|
||||||
}
|
}
|
||||||
|
46
nix/configuration/roles/bluetooth/default.nix
Normal file
46
nix/configuration/roles/bluetooth/default.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
bluetooth.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install bluetooth.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.bluetooth.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
# Enable support for showing battery charge level.
|
||||||
|
Experimental = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
directories = [
|
||||||
|
"/var/lib/bluetooth" # Bluetooth pairing information.
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
@ -28,16 +28,16 @@
|
|||||||
services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
|
services.cage.program = "${pkgs.kodi-wayland}/bin/kodi-standalone";
|
||||||
services.cage.enable = true;
|
services.cage.enable = true;
|
||||||
|
|
||||||
# nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
# (final: prev: {
|
(final: prev: {
|
||||||
# kodi-wayland = prev.kodi-wayland.withPackages (
|
kodi-wayland = prev.kodi-wayland.withPackages (
|
||||||
# kodiPkgs: with kodiPkgs; [
|
kodiPkgs: with kodiPkgs; [
|
||||||
# joystick
|
joystick
|
||||||
# vfs-sftp
|
vfs-sftp
|
||||||
# ]
|
]
|
||||||
# );
|
);
|
||||||
# })
|
})
|
||||||
# ];
|
];
|
||||||
|
|
||||||
users.users.kodi = {
|
users.users.kodi = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user