diff --git a/modules/common/profiles/default.nix b/modules/common/profiles/default.nix index a71f3be..447e906 100644 --- a/modules/common/profiles/default.nix +++ b/modules/common/profiles/default.nix @@ -3,5 +3,6 @@ { imports = [ ./bluetooth + ./devices ]; } diff --git a/modules/common/profiles/devices/default.nix b/modules/common/profiles/devices/default.nix new file mode 100644 index 0000000..bd16d70 --- /dev/null +++ b/modules/common/profiles/devices/default.nix @@ -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; + }) + ]); +} diff --git a/modules/nixos/profiles/default.nix b/modules/nixos/profiles/default.nix index c442eec..2bcbba2 100644 --- a/modules/nixos/profiles/default.nix +++ b/modules/nixos/profiles/default.nix @@ -2,7 +2,6 @@ { ... }: { imports = [ - ./devices ./gtk ./laptop ./wm diff --git a/modules/nixos/profiles/devices/default.nix b/modules/nixos/profiles/devices/default.nix deleted file mode 100644 index 7dbd299..0000000 --- a/modules/nixos/profiles/devices/default.nix +++ /dev/null @@ -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; - }; -}