Add wezterm binds

This commit is contained in:
muon 2026-03-08 11:39:06 +00:00
parent 86c3dbfa88
commit 3a4353b990
3 changed files with 310 additions and 153 deletions

View file

@ -1,4 +1,7 @@
{ inputs, system, sources, ... }: {
{ inputs, system, sources, ... }:
let
pkgs = import inputs.nixpkgs { inherit system; };
in {
mkHost = host:
inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system sources; };
@ -11,4 +14,41 @@
inputs.impermanence.nixosModules.impermanence
];
};
# Build a standalone HM configuration for a given host NixOS config and
# home.nix file. osConfig is injected as a specialArg so all modules that
# reference it continue to work.
mkHome = { hostConfig, homeFile, username ? "muon" }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs system sources;
osConfig = hostConfig.config;
};
modules = [
homeFile
inputs.self.outputs.homeManagerModules.default
inputs.stylix.homeManagerModules.stylix
({ osConfig, ... }: {
home.username = username;
home.homeDirectory = "/home/${username}";
# Mirror the stylix settings from the NixOS config so the standalone
# HM build has the same theme without re-declaring it.
stylix = {
enable = osConfig.stylix.enable;
autoEnable = osConfig.stylix.autoEnable;
base16Scheme = osConfig.stylix.base16Scheme;
image = osConfig.stylix.image;
cursor = osConfig.stylix.cursor;
# Forward individual font options; stylix derives fonts.packages
# internally as read-only so we must not forward that attr.
fonts.monospace = osConfig.stylix.fonts.monospace;
fonts.sansSerif = osConfig.stylix.fonts.sansSerif;
fonts.serif = osConfig.stylix.fonts.serif;
fonts.emoji = osConfig.stylix.fonts.emoji;
fonts.sizes = osConfig.stylix.fonts.sizes;
};
})
];
};
}