From 07c1988be85741c36af5c877ebd938e6a638bafe Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Thu, 19 Mar 2026 06:57:05 +0000 Subject: [PATCH] Working on reshuffling --- Droidnix/README.org | 43 ++++++++++++++----- .../generated/modules/desktop/wayland.nix | 43 ++++++++++++++----- 2 files changed, 64 insertions(+), 22 deletions(-) diff --git a/Droidnix/README.org b/Droidnix/README.org index 4d0e32464..79923258c 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1119,22 +1119,43 @@ settings = { ** =generated/modules/desktop/wayland.nix= This file sets up wayland #+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html -{ config, pkgs, lib, user, ... }: +{ lib, ... }: + { - home-manager.users.${user.username} = { - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; - config.hyprland = { - "org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; + flake.nixosModules.wayland = { config, pkgs, lib, ... }: + + let + username = "henrov"; # <-- simpel en stabiel + in + { + options.mySystem.desktop.wayland.enable = + lib.mkEnableOption "Enable Wayland + portals"; + + config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { + + home-manager.users.${username} = { + + xdg.portal = { + enable = true; + + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + ]; + + config.hyprland = { + "org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; + }; + }; + + home.packages = with pkgs; [ + uwsm + ]; + }; }; - - home.packages = with pkgs; [ - uwsm - ]; }; } +} #+END_SRC ** =generated/modules/apps/thunar.nix= diff --git a/Droidnix/generated/modules/desktop/wayland.nix b/Droidnix/generated/modules/desktop/wayland.nix index ef08a62f4..a79ad73b4 100644 --- a/Droidnix/generated/modules/desktop/wayland.nix +++ b/Droidnix/generated/modules/desktop/wayland.nix @@ -1,16 +1,37 @@ -{ config, pkgs, lib, user, ... }: +{ lib, ... }: + { - home-manager.users.${user.username} = { - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; - config.hyprland = { - "org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; + flake.nixosModules.wayland = { config, pkgs, lib, ... }: + + let + username = "henrov"; # <-- simpel en stabiel + in + { + options.mySystem.desktop.wayland.enable = + lib.mkEnableOption "Enable Wayland + portals"; + + config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { + + home-manager.users.${username} = { + + xdg.portal = { + enable = true; + + extraPortals = with pkgs; [ + xdg-desktop-portal-hyprland + ]; + + config.hyprland = { + "org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; + }; + }; + + home.packages = with pkgs; [ + uwsm + ]; + }; }; - - home.packages = with pkgs; [ - uwsm - ]; }; } +}