From 40d1bb4119a8a8f4d447577954458b44f75b567c Mon Sep 17 00:00:00 2001 From: Serenity-F Date: Fri, 5 Apr 2024 19:10:38 +1000 Subject: [PATCH] added the most minimal of hyprland displays to get this flake to evaluate --- modules/core/default.nix | 3 +-- modules/core/display.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 modules/core/display.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index 256c2f2..dfbb069 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -3,6 +3,7 @@ imports = [ ./services.nix + ./display.nix ./user.nix ./packages ]; @@ -18,8 +19,6 @@ sudo.execWheelOnly = true; }; - xdg.portal.enable = true; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/modules/core/display.nix b/modules/core/display.nix new file mode 100644 index 0000000..6683344 --- /dev/null +++ b/modules/core/display.nix @@ -0,0 +1,45 @@ +{ inputs, pkgs, username, ... }: + +{ + + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + + xdg.portal = { + enable = true; + wlr.enable = true; + xdgOpenUsePortal = true; + extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-gtk + ]; + }; + + services.xserver = { + enable = true; + layout = "us"; # what is the difference # + xkbVariant = ""; # between + xkb.layout = "us"; # these 2 lolwut # + displayManager.autoLogin = { + enable = true; + user = "serenity"; + }; + libinput = { + enable = true; + mouse = { + accelProfile = "flat"; + }; + }; + }; + + # apparently prevents getting stuck at shutdown + systemd.extraConfig = "DefaultTimeoutStopSec=10s"; + + # set up hardware video acceleration + # https://nixos.wiki/wiki/Accelerated_Video_Playback + + system.stateVersion = "23.11"; + +}