diff --git a/scripts/hyprland-tty-launch.nix b/scripts/hyprland-tty-launch.nix deleted file mode 100644 index 3448580..0000000 --- a/scripts/hyprland-tty-launch.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: - -{ - options.services.hyprland-tty-launch.enable = lib.mkEnableOption "Enable launching Hyprland from TTY with UWSM"; - - config = lib.mkIf config.services.hyprland-tty-launch.enable { - environment.etc."profile.d/hyprland-tty-launch.sh".text = '' - #!/bin/$SHELL - - if uwsm check may-start; then - exec uwsm start hyprland.desktop - fi - ''; - }; -} diff --git a/systems/modules/common.nix b/systems/modules/common.nix deleted file mode 100644 index 4e50b5b..0000000 --- a/systems/modules/common.nix +++ /dev/null @@ -1,40 +0,0 @@ -# Contains common configration for all machines - -{ - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Set your time zone. - time.timeZone = "Asia/Singapore"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_SG.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_SG.UTF-8"; - LC_IDENTIFICATION = "en_SG.UTF-8"; - LC_MEASUREMENT = "en_SG.UTF-8"; - LC_MONETARY = "en_SG.UTF-8"; - LC_NAME = "en_SG.UTF-8"; - LC_NUMERIC = "en_SG.UTF-8"; - LC_PAPER = "en_SG.UTF-8"; - LC_TELEPHONE = "en_SG.UTF-8"; - LC_TIME = "en_SG.UTF-8"; - }; - - # Configure keymap in X11 - services.xserver.xkb = { - layout = "us"; - variant = ""; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.rafiq = { - isNormalUser = true; - description = "rafiq"; - extraGroups = [ "networkmanager" "wheel" ]; - }; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; -} diff --git a/systems/modules/nvidia.nix b/systems/modules/nvidia.nix deleted file mode 100644 index cc8e619..0000000 --- a/systems/modules/nvidia.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, config, inputs, ... }: -let - hyprland-pkgs = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; -in -{ - hardware = { - graphics = { - enable = true; - package = hyprland-pkgs.mesa.drivers; - extraPackages = with pkgs; [ - nvidia-vaapi-driver - ocl-icd - cudaPackages.cudatoolkit - ]; - }; - nvidia = { - open = true; - package = config.boot.kernelPackages.nvidiaPackages.latest; - }; - }; - - services.xserver = { - enable = true; - videoDrivers = [ "nvidia" ]; - }; - - environment.variables = { - NIXOS_OZONE_WL = "1"; # Hint to electron apps to use Wayland - LIBVA_DRIVER_NAME = "nvidia"; - __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - NVD_BACKEND = "direct"; # Set VAAPI driver backend - }; - - environment.systemPackages = with pkgs; [ - clinfo - pciutils - ]; -} diff --git a/systems/modules/wm-hyprland.nix b/systems/modules/wm-hyprland.nix deleted file mode 100644 index a6f864b..0000000 --- a/systems/modules/wm-hyprland.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - # Define the Universal Wayland Session Manager. - # This will start our compositor. - # TODO: Eventually move this to a common desktop module. - programs.uwsm = { - enable = true; - waylandCompositors.hyprland = { - prettyName = "Hyprland"; - comment = "Hyprland compositor managed by UWSM"; - binPath = "/run/current-system/sw/bin/Hyprland"; - }; - }; - - programs.hyprland = { - enable = true; - # Use the packages that we have defined as inputs in our flake. - package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; - portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; - # Enable sustemd integration - systemd.setPath.enable = true; - withUWSM = true; - # Enable compatibility with X11 apps - xwayland.enable = true; - }; - - services.hypridle.enable = true; - - # Run a script that launches Hyprland through UWSM on login. - services.hyprland-tty-launch.enable = true; -}