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, pkgs,
... ...
}: }:
let
inherit (lib) mkIf mkEnableOption singleton;
cfg = config.hardware;
in
{ {
imports = [ imports = [
./btrfs.nix ./btrfs.nix
@ -20,9 +24,22 @@
}; };
gpu = lib.pantheon.mkStrOption; gpu = lib.pantheon.mkStrOption;
platform = lib.pantheon.mkStrOption; platform = lib.pantheon.mkStrOption;
usb = {
automount = mkEnableOption "";
};
}; };
config = lib.mkMerge [ 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; hardware.keyboard.qmk.enable = true;
services.udev = { services.udev = {

View file

@ -17,6 +17,7 @@
}; };
platform = "amd"; platform = "amd";
gpu = "nvidia"; gpu = "nvidia";
usb.automount = true;
}; };
services = { services = {