nix/nixos/modules/laptop.nix
2024-01-06 21:03:51 +00:00

42 lines
769 B
Nix

{
lib,
config,
...
}:
with lib; let
cfg = config.roles.laptop;
user = config.user;
in {
options.roles = {
laptop = {
enable = mkEnableOption "is a laptop";
displays = mkEnableOption "laptop display defaults";
};
};
config = mkIf cfg.enable {
displays = mkIf cfg.displays {
enable = true;
displays.internal = {
name = "eDP-1";
scaling = 1.2;
};
};
home-manager.users.${user}.imports = [
{
wayland.windowManager.hyprland = {
settings = {
general = {
gaps_out = 10;
border_size = 3;
};
bind = [
"SUPER_SHIFT, Q, killactive,"
];
};
};
}
];
};
}