feat(hardware): enable usb automounting

This commit is contained in:
Mohammad Rafiq 2025-06-14 11:03:43 +08:00
parent 83886e4fcf
commit 809ca31362
No known key found for this signature in database
2 changed files with 18 additions and 0 deletions

View file

@ -4,6 +4,10 @@
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption singleton;
cfg = config.hardware;
in
{
imports = [
./btrfs.nix
@ -20,9 +24,22 @@
};
gpu = lib.pantheon.mkStrOption;
platform = lib.pantheon.mkStrOption;
usb = {
automount = mkEnableOption "";
};
};
config = lib.mkMerge [
(mkIf cfg.usb.automount {
services.udisks2.enable = true;
home-manager.sharedModules = singleton {
services.udiskie = {
enable = true;
automount = true;
notify = true;
};
};
})
{
hardware.keyboard.qmk.enable = true;
services.udev = {