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 = [ imports = [
(import "${home-manager}/nixos") (import "${home-manager}/nixos")
./common.nix ./common.nix
./hardware/audio.nix
./hardware/bluetooth.nix
./locales/en_GB.nix ./locales/en_GB.nix
./desktop/plasma.nix
./desktop/hyprland.nix ./desktop/hyprland.nix
]; ];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,4 +10,6 @@
}; };
console.keyMap = "uk"; 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;
}