74 lines
1.4 KiB
Nix
74 lines
1.4 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.local.gui;
|
|
monitorType = {setName}: (
|
|
types.submodule ({name ? null, ...}: {
|
|
options = {
|
|
width = mkOption {
|
|
type = types.str;
|
|
default = "1920";
|
|
example = "1920";
|
|
};
|
|
height = mkOption {
|
|
type = types.str;
|
|
default = "1080";
|
|
example = "1080";
|
|
};
|
|
rate = mkOption {
|
|
type = types.str;
|
|
description = "refresh rate";
|
|
example = "143.85";
|
|
};
|
|
posX = mkOption {
|
|
type = types.str;
|
|
description = "x axis position";
|
|
default = "0";
|
|
example = "0";
|
|
};
|
|
posY = mkOption {
|
|
type = types.str;
|
|
description = "y axis position";
|
|
default = "0";
|
|
example = "0";
|
|
};
|
|
};
|
|
})
|
|
);
|
|
in {
|
|
options.local.gui = {
|
|
enable = mkEnableOption "GUI settings";
|
|
monitors = mkOption {
|
|
type = types.attrsOf (monitorType {setName = true;});
|
|
};
|
|
};
|
|
|
|
imports = [
|
|
./fonts.nix
|
|
./theme.nix
|
|
./sway.nix
|
|
./waybar.nix
|
|
];
|
|
|
|
config = mkIf cfg.enable {
|
|
services = {
|
|
mako.enable = true;
|
|
};
|
|
|
|
xdg = {
|
|
enable = true;
|
|
mimeApps = {
|
|
enable = true;
|
|
defaultApplications = {
|
|
"application/pdf" = with pkgs; ["qpdfview"];
|
|
"x-scheme-handler/file" = with pkgs; ["kitty"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|