common: profiles: migrate devices

This commit is contained in:
Bruno BELANYI 2024-01-03 17:03:09 +00:00
parent 034cd3ac55
commit ac03fb3b31
4 changed files with 23 additions and 21 deletions

View file

@ -3,5 +3,6 @@
{ {
imports = [ imports = [
./bluetooth ./bluetooth
./devices
]; ];
} }

View file

@ -0,0 +1,22 @@
{ config, lib, type, ... }:
let
cfg = config.my.profiles.devices;
in
{
options.my.profiles.devices = with lib; {
enable = mkEnableOption "devices profile";
};
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.optionalAttrs (type == "nixos") {
my.hardware = {
ergodox.enable = true;
mx-ergo.enable = true;
};
# MTP devices auto-mount via file explorers
services.gvfs.enable = true;
})
]);
}

View file

@ -2,7 +2,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./devices
./gtk ./gtk
./laptop ./laptop
./wm ./wm

View file

@ -1,20 +0,0 @@
{ config, lib, ... }:
let
cfg = config.my.profiles.devices;
in
{
options.my.profiles.devices = with lib; {
enable = mkEnableOption "devices profile";
};
config = lib.mkIf cfg.enable {
my.hardware = {
ergodox.enable = true;
mx-ergo.enable = true;
};
# MTP devices auto-mount via file explorers
services.gvfs.enable = true;
};
}