nix/lib/modules/laptop.nix
2023-05-08 17:02:57 +01:00

38 lines
742 B
Nix

{ user }: { lib, pkgs, config, ... }:
with lib;
let
cfg = config.roles.laptop;
in
{
options.roles = {
laptop = {
enable = mkEnableOption "is a laptop";
};
};
config = mkIf cfg.enable {
displays = {
enable = true;
displays = [{
name = "eDP-1";
scaling = 1.2;
}];
};
keyboard.dvorak.enable = true;
home-manager.users.${user}.imports = [{
wayland.windowManager.hyprland = {
extraConfig = ''
# === LAPTOP MODULE ===
general {
gaps_out = 10
border_size = 3
}
# so hard to reach X on a laptop
bind = SUPER_SHIFT, Q, killactive,
'';
};
}];
};
}