From 50e8b1b448f44f271327d052798c2eb4533f1e47 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 19 Feb 2026 16:00:11 +0100 Subject: [PATCH] feat: add zen-browser support to home-manager and Nix configuration :sparkles: --- nixos/flake.lock | 45 ++++++++++++++++++++++++++++++++++++++- nixos/flake.nix | 9 +++++++- nixos/home/danny/home.nix | 2 +- 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 9fe5de3..d0ddfdd 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -54,6 +54,27 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "zen-browser", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771102945, + "narHash": "sha256-e5NfW8NhC3qChR8bHVni/asrig/ZFzd1wzpq+cEE/tg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "ff5e5d882c51f9a032479595cbab40fd04f56399", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -147,7 +168,8 @@ "nix-darwin": "nix-darwin", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_2", - "vscode-server": "vscode-server" + "vscode-server": "vscode-server", + "zen-browser": "zen-browser" } }, "systems": { @@ -183,6 +205,27 @@ "repo": "nixos-vscode-server", "type": "github" } + }, + "zen-browser": { + "inputs": { + "home-manager": "home-manager_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771503632, + "narHash": "sha256-qvI2afshgl062MRRpal5s76PWFev0Vm1xv4hl2+wT/8=", + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "rev": "48e35b2df995cf65603f447d5d2e30c34e63cd3f", + "type": "github" + }, + "original": { + "owner": "0xc000022070", + "repo": "zen-browser-flake", + "type": "github" + } } }, "root": "root", diff --git a/nixos/flake.nix b/nixos/flake.nix index 0636d2b..09d0f31 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -12,6 +12,9 @@ home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + zen-browser.url = "github:0xc000022070/zen-browser-flake"; + zen-browser.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { @@ -21,6 +24,7 @@ nix-darwin, self, home-manager, + zen-browser, ... }: { nixosConfigurations = { @@ -57,17 +61,20 @@ # macOS (nix-darwin) configuration darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { + specialArgs = { inherit zen-browser; }; modules = [ ./hosts/macos.nix ./fish.nix # Home Manager on macOS home-manager.darwinModules.home-manager - ({ lib, ... }: { + ({ lib, zen-browser, ... }: { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; # Automatically backup files before home-manager overwrites them home-manager.backupFileExtension = "backup"; + # Pass flake inputs to home-manager modules (e.g. home.nix) + home-manager.extraSpecialArgs = { inherit zen-browser; }; home-manager.users.danny = { ... }: { # Force an absolute path even if another module sets a bad value. diff --git a/nixos/home/danny/home.nix b/nixos/home/danny/home.nix index 30874fb..3bf1d87 100644 --- a/nixos/home/danny/home.nix +++ b/nixos/home/danny/home.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, zen-browser ? null, ... }: { # TODO: remove next two lines from here or from flake.nix # home.username = "danny";