Skip to content

Commit

Permalink
Remove wezterm cache from config
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Dec 15, 2024
1 parent aa61790 commit 16afced
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 203 deletions.
6 changes: 3 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ If it deviates from this, set the env-variable `FLAKE` to the new path.
When first time trying to install the flake, you need to run:

```sh
sudo nixos-rebuild switch --flake ./#<device-name>
sudo nixos-rebuild switch --flake ./#<device-name> --accept-flake-config
```

### Home Manager

Like NixOS, home-manager can be also updated from the flake file like follows:

```sh
home-manager switch --flake ./#<username>
home-manager switch --flake ./#<username> --accept-flake-config
```

The flake specifications are surrounded by quotes, since some shells (e.g. zsh) are complaining due to the # symbol.
Expand All @@ -37,7 +37,7 @@ The flake specifications are surrounded by quotes, since some shells (e.g. zsh)
If nix is used as a package manager on a system, home manager can be installed using `nix run`:

```sh
nix run nixpkgs#home-manager -- switch --flake .#<username>
nix run nixpkgs#home-manager -- switch --flake .#<username> --accept-flake-config
```

## Nix Helper
Expand Down
165 changes: 0 additions & 165 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# };
# };
helix.url = "github:helix-editor/helix";
wezterm.url = "github:wez/wezterm?dir=nix";
# wezterm.url = "github:wez/wezterm?dir=nix";
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -209,14 +209,14 @@
extra-substituters = [
"https://nix-community.cachix.org"
"https://helix.cachix.org"
"https://wezterm.cachix.org"
"https://cuda-maintainers.cachix.org"
# "https://wezterm.cachix.org"
# "https://cuda-maintainers.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
# "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
# "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
}
59 changes: 29 additions & 30 deletions modules/home-manager/pc/terminal/wezterm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,34 @@
options.terminals.wezterm.enable = lib.mkEnableOption "Enable wezterm terminal";

config = lib.mkIf config.terminals.wezterm.enable {
programs.wezterm =
{
enable = true;
enableZshIntegration = config.programs.zsh.enable;
extraConfig = ''
local wezterm = require 'wezterm'
local config = {}
config.audible_bell = "Disabled"
config.enable_wayland = false
-- config.front_end = "WebGpu"
-- config.enable_wayland = true
config.front_end = "${
if ((args ? nixosConfig) && (osConfig.hosts.nvidia.enable)) then "OpenGL" else "WebGpu"
}"
config.hide_tab_bar_if_only_one_tab = true
-- config.window_decorations = 'TITLE | RESIZE'
config.window_decorations = 'RESIZE'
config.initial_rows = ${builtins.toString config.terminals.height}
config.initial_cols = ${builtins.toString config.terminals.width}
config.warn_about_missing_glyphs = false
return config
'';
}
// lib.optionalAttrs (args ? nixosConfig) {
package =
if osConfig.hosts.nvidia.enable then
inputs.wezterm.packages.${pkgs.system}.default
else
pkgs.wezterm;
};
programs.wezterm = {
enable = true;
enableZshIntegration = config.programs.zsh.enable;
extraConfig = ''
local wezterm = require 'wezterm'
local config = {}
config.audible_bell = "Disabled"
config.enable_wayland = false
-- config.front_end = "WebGpu"
-- config.enable_wayland = true
config.front_end = "${
if ((args ? nixosConfig) && (osConfig.hosts.nvidia.enable)) then "OpenGL" else "WebGpu"
}"
config.hide_tab_bar_if_only_one_tab = true
-- config.window_decorations = 'TITLE | RESIZE'
config.window_decorations = 'RESIZE'
config.initial_rows = ${builtins.toString config.terminals.height}
config.initial_cols = ${builtins.toString config.terminals.width}
config.warn_about_missing_glyphs = false
return config
'';
};
# // lib.optionalAttrs (args ? nixosConfig) {
# package =
# if osConfig.hosts.nvidia.enable then
# inputs.wezterm.packages.${pkgs.system}.default
# else
# pkgs.wezterm;
# };
};
}

0 comments on commit 16afced

Please sign in to comment.