various things because i am lazy

This commit is contained in:
Ranomier 2024-12-13 19:06:00 +01:00
parent 1b9a5a264e
commit cc0b878532
9 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,6 @@
{...}: {
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = false; # powers up the default Bluetooth controller on boot
services.blueman.enable = true; # provides blueman-applet and blueman-manager
}

View file

@ -0,0 +1,9 @@
{...}: {
imports = [
./bluetooth.nix
./fwupd.nix
./scan_and_print.nix
./trackpoint.nix
./gpu.nix
];
}

View file

@ -0,0 +1,4 @@
{...}: {
# A system daemon to allow session software to update firmware
services.fwupd.enable = true;
}

6
modules/hardware/gpu.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }:{
hardware.graphics.enable = true;
hardware.graphics.extraPackages = with pkgs; [
libvdpau-va-gl
];
}

View file

@ -0,0 +1,27 @@
{pkgs, ...}: {
hardware.sane.enable = true; # enables support for SANE scanners
services.ipp-usb.enable = true; # enable usb support
hardware.sane.backends-package = pkgs.sane-backends.overrideAttrs (old: {
configureFlags =
(old.configureFlags or [])
++ [
# "--localstatedir=/var" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store
# "--with-lockdir=/var/lock/sane" # `sane-backends` puts e.g. lock files in here, must not be in /nix/store
# Ugly workaround for https://github.com/NixOS/nixpkgs/issues/273280#issuecomment-1848873028
# Really we should make `sane-backends` be able to provide a real lock dir (e.g. `/var/lock/sane`).
"--disable-locking"
];
});
users.users.ranomier.extraGroups = ["scanner" "lp"];
# only for the scan and maybe print clients
environment.systemPackages = with pkgs; [
simple-scan
];
# Enable CUPS to print documents.
services.printing.enable = true;
}

View file

@ -0,0 +1,4 @@
{ ... }:{
# probably does nothing on my amd laptop. need to check
hardware.trackpoint.speed = 200;
}