feat: add hyprland WIP

This commit is contained in:
Jacob Bachmann 2024-03-19 19:10:27 +01:00
parent 971f3a44de
commit 7c5af81e75
Signed by: bchmnn
GPG key ID: 732A612DAD28067D
8 changed files with 170 additions and 9 deletions

View file

@ -8,7 +8,7 @@
flavour = mkOption {
type = types.listOf types.str;
default = [ "sway" ];
example = [ "sway" "i3" ];
example = [ "sway" "i3" "hyprland" ];
description = ''
The flavour (WM) for your system to use
'';

View file

@ -3,6 +3,7 @@
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
programs.sway.enable = builtins.elem "sway" gui.flavour;
programs.hyprland.enable = builtins.elem "hyprland" gui.flavour;
services.xserver.windowManager.i3.enable = builtins.elem "i3" gui.flavour;
services.xserver = {
@ -16,6 +17,7 @@
etc = {
"greetd/environments".text = ''
sway
Hyprland
'';
"greetd/kanshi-config".text = ''
profile nomad {

View file

@ -18,6 +18,7 @@
nvd # Nix/NixOS package version diff tool
inotify-tools # a C library and a set of command-line programs providing a simple interface to inotify
ghostscript # postscript interpreter (mainline version)
ventoy-full # bootable usb solution
] ++ lib.optionals (devenv.enable) [
# languages
gcc13

View file

@ -1,13 +1,14 @@
{ lib, config, ... }: lib.mkIf config.bchmnn.gui.enable {
{ lib, config, pkgs, ... }: lib.mkIf config.bchmnn.gui.enable {
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
# extraPortals = [
# pkgs.xdg-desktop-portal-wlr
# pkgs.xdg-desktop-portal-gtk
# ];
# upper has been replaced by following
config.common.default = "*";
extraPortals = with lib; with config.bchmnn; optionals (elem "sway" gui.flavour) [
pkgs.xdg-desktop-portal-wlr
] ++ optionals (elem "hyprland" gui.flavour) [
pkgs.xdg-desktop-portal-hyprland
];
};
}