common: profiles: migrate devices
This commit is contained in:
parent
034cd3ac55
commit
ac03fb3b31
|
@ -3,5 +3,6 @@
|
|||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./devices
|
||||
];
|
||||
}
|
||||
|
|
22
modules/common/profiles/devices/default.nix
Normal file
22
modules/common/profiles/devices/default.nix
Normal 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;
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./devices
|
||||
./gtk
|
||||
./laptop
|
||||
./wm
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue