2024-08-02 22:32:29 -04:00
|
|
|
self: {
|
2024-06-27 00:56:27 -04:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
2024-08-02 22:32:29 -04:00
|
|
|
inherit (lib) elemAt mkOption types;
|
|
|
|
|
|
|
|
inherit (self.inputs) home-manager;
|
2024-06-27 00:56:27 -04:00
|
|
|
|
|
|
|
cfg = config.roles.desktop;
|
|
|
|
flakeDir = config.environment.variables.FLAKE;
|
|
|
|
in {
|
|
|
|
imports = [
|
2024-08-02 22:32:29 -04:00
|
|
|
(import ./manager self)
|
|
|
|
(import ./environment self)
|
2024-06-27 00:56:27 -04:00
|
|
|
|
|
|
|
self.nixosModules.nvidia
|
2024-08-02 22:32:29 -04:00
|
|
|
home-manager.nixosModules.home-manager
|
2024-06-27 00:56:27 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
config.assertions = [
|
|
|
|
{
|
|
|
|
assertion = lib.hasPrefix "/home/${cfg.user}/" flakeDir;
|
|
|
|
message = ''
|
|
|
|
Your $FLAKE environment variable needs to point to a directory in
|
|
|
|
the main users' home to use the desktop module.
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
options.roles.desktop = {
|
|
|
|
user = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = ''
|
|
|
|
The name of the user who is going to be using the "DE".
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-08-02 22:32:29 -04:00
|
|
|
ags.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether we want to enable AGS for the DE shell.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
mainMonitor = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = ''
|
|
|
|
The name of the main monitor used for Hyprland
|
|
|
|
and Greetd which also uses Hyprland.
|
|
|
|
'';
|
|
|
|
# This is to allow a bash script to know whether this value exists
|
|
|
|
default = "null";
|
|
|
|
};
|
|
|
|
|
2024-08-02 22:32:29 -04:00
|
|
|
fontName = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = elemAt config.fonts.fontconfig.defaultFonts.monospace 0;
|
|
|
|
};
|
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
fontSize = mkOption {
|
|
|
|
type = types.float;
|
|
|
|
default = 12.0;
|
|
|
|
description = ''
|
|
|
|
The size of the font in GUIs.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
isLaptop = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
If the computer is a laptop.
|
|
|
|
'';
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
isTouchscreen = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
If the computer has a touchscreen.
|
|
|
|
'';
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
displayManager = {
|
|
|
|
duplicateScreen = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
If we should duplicate the login prompt on all monitors.
|
|
|
|
'';
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-08-02 22:32:29 -04:00
|
|
|
|
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./default.nix;
|
2024-06-27 00:56:27 -04:00
|
|
|
}
|