Add hardware section to control bluetooth and audio setup for NixOS

This commit is contained in:
Evie Litherland-Smith 2023-04-29 12:36:57 +01:00
parent e3f6035b75
commit 80837514ca
10 changed files with 40 additions and 29 deletions

View file

@ -6,8 +6,9 @@ in
imports = [
(import "${home-manager}/nixos")
./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./locales/en_GB.nix
./desktop/plasma.nix
./desktop/hyprland.nix
];

View file

@ -6,8 +6,10 @@ in
imports = [
(import "${home-manager}/nixos")
./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./locales/en_GB.nix
./desktop/plasma.nix
./desktop/hyprland.nix
];
networking.hostName = "J0162"; # Define your hostname.

View file

@ -6,8 +6,9 @@ in
imports = [
(import "${home-manager}/nixos")
./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./locales/en_GB.nix
./desktop/plasma.nix
./desktop/hyprland.nix
];
@ -32,7 +33,6 @@ in
# Extra hardware configuration
# For Steam support
hardware.opengl.driSupport32Bit = true;
hardware.bluetooth.enable = true;
hardware.openrazer = {
enable = true;
users = [ "xenia" ];

View file

@ -20,7 +20,7 @@
glxinfo
];
fonts.fontconfig.enable = true;
programs.ssh.startAgent = true;
programs.fish.enable = true;
programs.zsh = {

View file

@ -1,25 +1,4 @@
{ pkgs, ... }:
{
# Enable CUPS to print documents.
services.printing.enable = true;
programs.dconf.enable = true;
# environment.systemPackages = [
# pkgs.pavucontrol
# pkgs.pamixer
# pkgs.pulseaudio
# ];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
}

View file

@ -1,8 +1,6 @@
{ ... }:
{
imports = [
./default.nix
];
imports = [ ./sddm.nix ];
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
@ -10,6 +8,7 @@
});
})
];
programs.dconf.enable = true;
security.pam.services.swaylock = { };
programs.hyprland = {
enable = true;

View file

@ -3,6 +3,7 @@ let
sddm-catppuccin-macchiato = pkgs.callPackage ./pkgs/sddm-catppuccin-macchiato.nix { };
in
{
services.xserver.enable = true;
services.xserver.displayManager.sddm = {
enable = true;
theme = "catppuccin-macchiato";

View file

@ -10,4 +10,6 @@
};
console.keyMap = "uk";
programs.dconf.enable = true;
}

19
nixos/hardware/audio.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
environment.systemPackages = [
pkgs.pavucontrol
pkgs.pamixer
pkgs.pulseaudio
];
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
}