Files
nix-flake/modules/capabilities/graphics.nix
T

85 lines
2.2 KiB
Nix

{ inputs, self, ... }: let
wm-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers");
shell-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells");
in {
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
options.components = {
displayManager = lib.mkOption {
# enum that dynamically populates itself with the contents of the display-managers directory
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers";
default = "lightdm";
};
windowManagers = lib.mkOption {
type = wm-option-type;
default = [];
};
shells = lib.mkOption {
type = shell-option-type;
default = [];
};
};
config = {
environment.systemPackages = with pkgs; [
wayland-utils
mesa-demos
vulkan-tools
];
fonts.packages = with pkgs; [
iosevka-comfy.comfy
nerd-fonts.jetbrains-mono
];
};
};
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
options.components = {
windowManagers = lib.mkOption {
type = wm-option-type;
default = [];
};
shells = lib.mkOption {
type = shell-option-type;
default = [];
};
};
config = {
home.packages = with pkgs; [
bibata-cursors
x264
gparted
vlc
iosevka-comfy.comfy
nerd-fonts.jetbrains-mono
];
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
home.pointerCursor = {
enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 22;
gtk.enable = true;
x11.enable = true;
};
gtk = {
enable = true;
colorScheme = "dark";
gtk2.configLocation = "${config.xdg.configHome}/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config
gtk2.force = true;
};
};
};
}