Working on reshuffling
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
# ./generated/modules/apps/zenbrowser.nix
|
||||
{ pkgs, lib, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
# Import the Zen Browser flake directly
|
||||
zenBrowserFlake = import (builtins.fetchTarball {
|
||||
url = "https://github.com/youwen5/zen-browser-flake/archive/refs/heads/main.tar.gz";
|
||||
}) {};
|
||||
in
|
||||
{
|
||||
# Declare the option to enable Zen Browser
|
||||
# Module option to enable Zen Browser
|
||||
options.mySystem.apps.zenBrowser.enable =
|
||||
lib.mkEnableOption "Enable Zen Browser";
|
||||
|
||||
# Top-level config, fully self-contained
|
||||
config = { config, ... }: lib.mkIf (config.mySystem.apps.zenBrowser.enable) {
|
||||
environment.systemPackages = [ pkgs.zen-browser ];
|
||||
# Top-level config using dendritic pattern
|
||||
config = { config, pkgs, ... }: lib.mkIf (config.mySystem.apps.zenBrowser.enable) {
|
||||
# Add Zen Browser to system packages
|
||||
environment.systemPackages = [
|
||||
zenBrowserFlake.packages.x86_64-linux.zen-browser
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user