Working on reshuffling

This commit is contained in:
2026-03-19 07:29:42 +00:00
parent e3e5c855d6
commit 5146328d65
2 changed files with 34 additions and 28 deletions
+17 -14
View File
@@ -1,24 +1,27 @@
# ./generated/modules/apps/zenbrowser.nix
{ config, pkgs, lib, ... }:
let
username = "henrov"; # optional, if you want user-specific stuff
in
{
options.mySystem = {
apps = {
zenBrowser = {
enable = lib.mkEnableOption "Enable Zen Browser";
packageRef = lib.mkOption {
type = lib.types.str;
default = "zen-browser";
description = "Package reference for Zen Browser";
};
};
};
};
# Declare a module option for enabling Zen Browser
options.mySystem.apps.zenBrowser.enable =
lib.mkEnableOption "Enable Zen Browser";
# This is now evaluated with config in scope
# Declare a module option for the package reference
options.mySystem.apps.zenBrowser.packageRef =
lib.mkOption {
type = lib.types.str;
default = "zen-browser";
description = "Package reference for Zen Browser";
};
# Apply the configuration if the module is enabled
config = lib.mkIf (config.mySystem.apps.zenBrowser.enable) {
environment.systemPackages = [ pkgs.zen-browser ];
# Add the package to systemPackages
environment.systemPackages = [
pkgs.${config.mySystem.apps.zenBrowser.packageRef}
];
};
}