From 32abc8de2a56103a89e83dac8e808ddded5daca2 Mon Sep 17 00:00:00 2001 From: Spectre Date: Fri, 7 Jun 2024 14:35:33 +0200 Subject: [PATCH] wayland --- system/default.nix | 1 + system/hyprland.nix | 34 ++++++++++++++++++++++++++++++++++ system/nix.nix | 3 +-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 system/hyprland.nix diff --git a/system/default.nix b/system/default.nix index 4b47308d..29b1fbbe 100644 --- a/system/default.nix +++ b/system/default.nix @@ -12,6 +12,7 @@ ./users.nix ./ssh.nix ./steam.nix + ./wayland.nix ]; system.stateVersion = "24.11"; diff --git a/system/hyprland.nix b/system/hyprland.nix new file mode 100644 index 00000000..390d11fe --- /dev/null +++ b/system/hyprland.nix @@ -0,0 +1,34 @@ +{ + pkgs, + config, + conf, + ... +}: { + security.polkit.enable = true; + security.pam.services.hyprlock = {}; + + services.dbus.enable = true; + + environment.systemPackages = with pkgs; [ + xdg-dektop-portal-hyprland + ]; + + xdg.portal = { + enable = true; + wlr.enable = true; + config.common.default = "hyprland"; + }; + + hardware.opengl.enable = true; + + services.greetd = { + enable = true; + settings = rec { + default_session = initial_session; + initial_session = { + user = conf.user; + command = "Hyprland; hyprlock"; + }; + }; + }; +} diff --git a/system/nix.nix b/system/nix.nix index 7b1ee48b..870b737e 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,6 +1,5 @@ -{nixpkgs, ...}: { +{...}: { nix = { - nixPath = ["nixpkgs=${nixpkgs}"]; gc = { automatic = true; dates = "05:30";