common: profiles: migrate devices
This commit is contained in:
parent
e01c8330d6
commit
9ee0cb3287
4 changed files with 23 additions and 21 deletions
|
|
@ -3,5 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./bluetooth
|
./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, _class, ... }:
|
||||||
|
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 (_class == "nixos") {
|
||||||
|
my.hardware = {
|
||||||
|
ergodox.enable = true;
|
||||||
|
|
||||||
|
trackball.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# MTP devices auto-mount via file explorers
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./devices
|
|
||||||
./gtk
|
./gtk
|
||||||
./laptop
|
./laptop
|
||||||
./wm
|
./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;
|
|
||||||
|
|
||||||
trackball.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# MTP devices auto-mount via file explorers
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue