diff --git a/config.nix b/config.nix index d273c8a..588e5f8 100644 --- a/config.nix +++ b/config.nix @@ -1,10 +1,5 @@ lib: { omarchyOptions = { - hostname = lib.mkOption { - type = lib.types.str; - default = "omarchy"; - description = "Hostname for the system"; - }; full_name = lib.mkOption { type = lib.types.str; description = "Main user's full name"; @@ -34,6 +29,10 @@ lib: { type = lib.types.attrs; default = {}; }; + monitors = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + }; quick_app_bindings = lib.mkOption { type = lib.types.listOf lib.types.str; description = "A list of single keystroke key bindings to launch common apps."; diff --git a/modules/home-manager/hyprland/configuration.nix b/modules/home-manager/hyprland/configuration.nix index 66933fa..3b06eb7 100644 --- a/modules/home-manager/hyprland/configuration.nix +++ b/modules/home-manager/hyprland/configuration.nix @@ -33,5 +33,7 @@ in { # "LIBVA_DRIVER_NAME,nvidia" # "__GLX_VENDOR_LIBRARY_NAME,nvidia" ]; + + monitor = cfg.monitors; }; } diff --git a/modules/home-manager/hyprland/envs.nix b/modules/home-manager/hyprland/envs.nix index 4acb714..93b3009 100644 --- a/modules/home-manager/hyprland/envs.nix +++ b/modules/home-manager/hyprland/envs.nix @@ -1,11 +1,23 @@ { config, + lib, pkgs, + osConfig ? {}, ... -}: { +}: +let +hasNvidiaDrivers = builtins.elem "nvidia" osConfig.services.xserver.videoDrivers; + + nvidiaEnv = [ + "NVD_BACKEND,direct" + "LIBVA_DRIVER_NAME,nvidia" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + ]; +in +{ wayland.windowManager.hyprland.settings = { # Environment variables - env = [ + env = (lib.optionals hasNvidiaDrivers nvidiaEnv) ++ [ "GDK_SCALE,2" # Change to 1 if on a 1x display # Uncomment if running NVIDIA GPU: # "NVD_BACKEND,direct" diff --git a/modules/home-manager/hyprpaper.nix b/modules/home-manager/hyprpaper.nix index ad84a80..8b46c7f 100644 --- a/modules/home-manager/hyprpaper.nix +++ b/modules/home-manager/hyprpaper.nix @@ -41,7 +41,7 @@ in { selected_wallpaper_path ]; wallpaper = [ - "eDP-1,${selected_wallpaper_path}" + ",${selected_wallpaper_path}" ]; }; }; diff --git a/modules/nixos/system.nix b/modules/nixos/system.nix index 20dcb26..a0069ae 100644 --- a/modules/nixos/system.nix +++ b/modules/nixos/system.nix @@ -29,7 +29,6 @@ in { hardware.bluetooth.enable = true; services.blueman.enable = true; networking = { - hostName = cfg.hostname; networkmanager.enable = true; };