refactor(treewide): format with alejandra
This commit is contained in:
parent
7fefb94400
commit
61cef505da
216 changed files with 5995 additions and 3969 deletions
|
|
@ -1,25 +1,24 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.generators) toLua;
|
||||
inherit (lib.lists) elem optionals;
|
||||
# inherit (builtins) elem;
|
||||
features = config.ooknet.host.hardware.features;
|
||||
hasBT = (elem "bluetooth" features);
|
||||
in
|
||||
|
||||
{
|
||||
hasBT = elem "bluetooth" features;
|
||||
in {
|
||||
config = mkIf (elem "audio" features) {
|
||||
hardware.pulseaudio.enable = !config.services.pipewire.enable;
|
||||
security.rtkit.enable = config.services.pipewire.enable;
|
||||
services.pipewire =
|
||||
let
|
||||
services.pipewire = let
|
||||
quantum = 64;
|
||||
rate = 48000;
|
||||
qr = "${toString quantum}/${toString rate}";
|
||||
in
|
||||
{
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
alsa.enable = true;
|
||||
|
|
@ -89,14 +88,18 @@ in
|
|||
'')
|
||||
]
|
||||
++ optionals hasBT [
|
||||
(pkgs.writeTextDir "share/bluetooth.lua.d/51-bluez-config.lua" /* lua */ ''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
["bluez5.enable-msbc"] = true,
|
||||
["bluez5.enable-hw-volume"] = true,
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
'')
|
||||
(pkgs.writeTextDir "share/bluetooth.lua.d/51-bluez-config.lua"
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
["bluez5.enable-msbc"] = true,
|
||||
["bluez5.enable-hw-volume"] = true,
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
'')
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -106,6 +109,4 @@ in
|
|||
pipewire-pulse.wantedBy = ["default.target"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
features = config.ooknet.host.hardware.features;
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
config = mkIf (elem "backlight" features) {
|
||||
hardware.brillo.enable = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
features = config.ooknet.host.hardware.features;
|
||||
cfg = config.ooknet.host.hardware.battery;
|
||||
inherit (lib) mkIf mkDefault;
|
||||
inherit (builtins) elem;
|
||||
MHz = x: x * 1000;
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
config = mkIf (elem "battery" features) {
|
||||
boot = {
|
||||
kernelModules = ["acpi_call"];
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
features = config.ooknet.host.hardware.features;
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
config = mkIf (elem "bluetooth" features) {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluez5-experimental;
|
||||
};
|
||||
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
self.packages.${pkgs.system}.live-buds-cli
|
||||
bluetuith
|
||||
];
|
||||
bluetuith
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/114222
|
||||
systemd.user.services.telephony_client.enable = false;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
features = config.ooknet.host.hardware.features;
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
config = mkIf (elem "ssd" features) {
|
||||
services.fstrim = {
|
||||
enable = true;
|
||||
|
|
@ -18,6 +18,6 @@ in
|
|||
Nice = 19;
|
||||
IOSchedulingClass = "idle";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
{ lib, inputs, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
isx86Linux = pkgs: with pkgs.stdenv; hostPlatform.isLinux && hostPlatform.isx86;
|
||||
features = config.ooknet.host.hardware.features;
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
config = mkIf (elem "video" features) {
|
||||
hardware = {
|
||||
opengl = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue