Upgraded snowfall lib
This commit is contained in:
parent
7e87dbc55b
commit
a1709f033f
58 changed files with 22 additions and 19 deletions
25
modules/nixos/hardware/audio/default.nix
Normal file
25
modules/nixos/hardware/audio/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.hardware.audio;
|
||||
in {
|
||||
options.aa.hardware.audio = with types; {
|
||||
enable = mkEnableOption "audio";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [pamixer];
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
20
modules/nixos/hardware/bluetooth/default.nix
Normal file
20
modules/nixos/hardware/bluetooth/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.hardware.bluetooth;
|
||||
in {
|
||||
options.aa.hardware.bluetooth = with types; {
|
||||
enable = mkEnableOption "bluetooth";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
};
|
||||
}
|
||||
|
32
modules/nixos/hardware/logitech/default.nix
Normal file
32
modules/nixos/hardware/logitech/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.hardware.logitech;
|
||||
in {
|
||||
options.aa.hardware.logitech = with types; {
|
||||
enable = mkEnableOption "logitech devices";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
|
||||
systemd.user.services.solaar = {
|
||||
description = "Linux device manager for Logitech devices";
|
||||
documentation = ["https://pwr-solaar.github.io/Solaar/"];
|
||||
partOf = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.solaar}/bin/solaar -w hide";
|
||||
};
|
||||
};
|
||||
systemd.user.services.solaar.wantedBy = mkIf config.aa.desktop.sway.enable ["sway-session.target"];
|
||||
};
|
||||
}
|
28
modules/nixos/hardware/tlp/default.nix
Normal file
28
modules/nixos/hardware/tlp/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.aa.hardware.tlp;
|
||||
in {
|
||||
options.aa.hardware.tlp = with types; {
|
||||
enable = mkEnableOption "tlp";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 75;
|
||||
# Run `tlp setcharge` to temporarily allow charging to 100%
|
||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
||||
RESTORE_THRESHOLDS_ON_BAT = 1;
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue