feat(hardware): enable usb automounting
This commit is contained in:
parent
83886e4fcf
commit
809ca31362
2 changed files with 18 additions and 0 deletions
|
@ -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 = {
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
};
|
};
|
||||||
platform = "amd";
|
platform = "amd";
|
||||||
gpu = "nvidia";
|
gpu = "nvidia";
|
||||||
|
usb.automount = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue