refactor: move Hyprland to its own module
This commit is contained in:
parent
96c7b856a7
commit
e35bc17aa7
2 changed files with 37 additions and 56 deletions
32
modules/wm-hyprland.nix
Normal file
32
modules/wm-hyprland.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ 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;
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ inputs, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -11,11 +11,10 @@
|
||||||
../../scripts/hyprland-tty-launch.nix
|
../../scripts/hyprland-tty-launch.nix
|
||||||
../../modules/nvidia.nix # Graphics settings for Nvidia GPUs
|
../../modules/nvidia.nix # Graphics settings for Nvidia GPUs
|
||||||
../../modules/networking.nix # Common networking config
|
../../modules/networking.nix # Common networking config
|
||||||
|
../../modules/wm-hyprland.nix # Enable the hyprland wm
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloahttps://jira.xtremax.com/browse/GCCFMALRT-15450der.
|
networking.hostName = "nemesis";
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# Allow nemesis to access files on the windows drive.
|
# Allow nemesis to access files on the windows drive.
|
||||||
fileSystems."/mnt/windows" =
|
fileSystems."/mnt/windows" =
|
||||||
|
@ -24,20 +23,8 @@
|
||||||
options = [ "rw" "uid=rafiq" ];
|
options = [ "rw" "uid=rafiq" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
# Add hyprland.cachix.org as a binary cache for Hyprland
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Scripts
|
|
||||||
services.hyprland-tty-launch.enable = true;
|
|
||||||
|
|
||||||
networking.hostName = "nemesis"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Asia/Singapore";
|
time.timeZone = "Asia/Singapore";
|
||||||
|
@ -80,44 +67,6 @@
|
||||||
koboldcpp
|
koboldcpp
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
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;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue