nix-da/options/system/roles/desktop.nix

56 lines
1.2 KiB
Nix

{
pkgs,
lib,
config,
...
}:
let
inherit (lib) mkEnableOption mkOption mkIf;
inherit (lib.types) package str;
inherit (lib.my) getExe;
cfg = config.modules.system.roles.desktop;
in
{
options.modules.system.roles.desktop = {
enable = mkEnableOption "desktop usage features";
terminal = mkOption {
type = package;
default = pkgs.foot;
description = ''
The default terminal emulator used on the system.
To be used by other options and configurations.
'';
};
filemanager = mkOption {
type = package;
default = pkgs.nautilus;
description = '''';
};
runner = {
package = mkOption {
type = package;
default = pkgs.fuzzel;
description = ''
The runner to use.
'';
};
dmenu = mkOption {
type = str;
default = "--dmenu";
apply = val: "${getExe cfg.runner.package} ${val}";
description = ''
Flags necessary to execute the runner in its dmenu compatibility mode.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [
cfg.terminal
cfg.filemanager
pkgs.zotero
];
};
}