Compare commits

...

2 Commits

Author SHA1 Message Date
henrov c3b2799155 Working on reshuffling 2026-03-19 11:55:02 +00:00
henrov b848963be6 deleted generated files 2026-03-19 11:55:02 +00:00
2 changed files with 98 additions and 44 deletions
+49 -22
View File
@@ -1071,39 +1071,66 @@ settings = {
** =generated/modules/desktop/wayland.nix= ** =generated/modules/desktop/wayland.nix=
This file sets up wayland This file sets up wayland
#+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/desktop/wayland.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, ... }: { lib, config, ... }:
let
# --- Program definition ---
programName = "wayland";
# Assets (optional, kept for consistency with template)
programAssets = ../../../assets/system/conf/${programName};
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option name)
enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
in
{ {
flake.nixosModules.wayland = { config, pkgs, lib, ... }: # --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals";
let # --- Config ---
username = "henrov"; # <-- simpel en stabiel config = lib.mkIf enableProgram {
in
{
options.mySystem.desktop.wayland.enable =
lib.mkEnableOption "Enable Wayland + portals";
config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { # --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
home-manager.users.${username} = { # Wayland-specific metadata
portals = [ "hyprland" ];
};
xdg.portal = { # --- Actual system wiring ---
enable = true; home-manager.users.${user} = {
extraPortals = with pkgs; [ xdg.portal = {
xdg-desktop-portal-hyprland enable = true;
];
config.hyprland = { # pkgs is unavoidable here (real package dependency)
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; extraPortals = [
}; config.pkgs.xdg-desktop-portal-hyprland
};
home.packages = with pkgs; [
uwsm
]; ];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
}; };
home.packages = [
config.pkgs.uwsm
];
}; };
}; };
} }
+49 -22
View File
@@ -1,36 +1,63 @@
{ lib, ... }: { lib, config, ... }:
let
# --- Program definition ---
programName = "wayland";
# Assets (optional, kept for consistency with template)
programAssets = ../../../assets/system/conf/${programName};
programFiles =
if builtins.pathExists programAssets
then builtins.readDir programAssets
else {};
files = lib.genAttrs (builtins.attrNames programFiles) (name: {
src = "${programAssets}/${name}";
});
# Enable toggle (must match option name)
enableProgram = config.enableWayland or true;
# Resolve user safely (outside mkIf)
user = config.defaultUser or "henrov";
in
{ {
flake.nixosModules.wayland = { config, pkgs, lib, ... }: # --- Option ---
options.enableWayland =
lib.mkEnableOption "Enable Wayland + portals";
let # --- Config ---
username = "henrov"; # <-- simpel en stabiel config = lib.mkIf enableProgram {
in
{
options.mySystem.desktop.wayland.enable =
lib.mkEnableOption "Enable Wayland + portals";
config = lib.mkIf (config.mySystem.desktop.wayland.enable or false) { # --- Dendritic app definition ---
myApps.${programName} = {
enable = true;
assetsDir = programAssets;
files = files;
inherit user;
home-manager.users.${username} = { # Wayland-specific metadata
portals = [ "hyprland" ];
};
xdg.portal = { # --- Actual system wiring ---
enable = true; home-manager.users.${user} = {
extraPortals = with pkgs; [ xdg.portal = {
xdg-desktop-portal-hyprland enable = true;
];
config.hyprland = { # pkgs is unavoidable here (real package dependency)
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; extraPortals = [
}; config.pkgs.xdg-desktop-portal-hyprland
};
home.packages = with pkgs; [
uwsm
]; ];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
}; };
home.packages = [
config.pkgs.uwsm
];
}; };
}; };
} }