From 16afcedf535d67a1d8a911850177b0e7a5770924 Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Sun, 15 Dec 2024 18:22:45 +0100 Subject: [PATCH] Remove wezterm cache from config --- .github/README.md | 6 +- flake.lock | 165 ------------------- flake.nix | 10 +- modules/home-manager/pc/terminal/wezterm.nix | 59 ++++--- 4 files changed, 37 insertions(+), 203 deletions(-) diff --git a/.github/README.md b/.github/README.md index 674097f..4218931 100644 --- a/.github/README.md +++ b/.github/README.md @@ -19,7 +19,7 @@ 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 ./# +sudo nixos-rebuild switch --flake ./# --accept-flake-config ``` ### Home Manager @@ -27,7 +27,7 @@ sudo nixos-rebuild switch --flake ./# Like NixOS, home-manager can be also updated from the flake file like follows: ```sh -home-manager switch --flake ./# +home-manager switch --flake ./# --accept-flake-config ``` The flake specifications are surrounded by quotes, since some shells (e.g. zsh) are complaining due to the # symbol. @@ -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 .# +nix run nixpkgs#home-manager -- switch --flake .# --accept-flake-config ``` ## Nix Helper diff --git a/flake.lock b/flake.lock index 8a27e56..0926448 100644 --- a/flake.lock +++ b/flake.lock @@ -249,41 +249,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "freetype2": { - "flake": false, - "locked": { - "lastModified": 1687587065, - "narHash": "sha256-+Fh+/k+NWL5Ow9sDLtp8Cv/8rLNA1oByQQCIQS/bysY=", - "owner": "wez", - "repo": "freetype2", - "rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d", - "type": "github" - }, - "original": { - "owner": "wez", - "repo": "freetype2", - "rev": "e4586d960f339cf75e2e0b34aee30a0ed8353c0d", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -339,23 +304,6 @@ "type": "github" } }, - "harfbuzz": { - "flake": false, - "locked": { - "lastModified": 1711722720, - "narHash": "sha256-GdxcAPx5QyniSHPAN1ih28AD9JLUPR0ItqW9JEsl3pU=", - "owner": "harfbuzz", - "repo": "harfbuzz", - "rev": "63973005bc07aba599b47fdd4cf788647b601ccd", - "type": "github" - }, - "original": { - "owner": "harfbuzz", - "ref": "8.4.0", - "repo": "harfbuzz", - "type": "github" - } - }, "helix": { "inputs": { "crane": "crane", @@ -447,23 +395,6 @@ "type": "github" } }, - "libpng": { - "flake": false, - "locked": { - "lastModified": 1549245649, - "narHash": "sha256-1+cRp0Ungme/OGfc9kGJbklYIWAFxk8Il1M+NV4KSgw=", - "owner": "glennrp", - "repo": "libpng", - "rev": "8439534daa1d3a5705ba92e653eda9251246dd61", - "type": "github" - }, - "original": { - "owner": "glennrp", - "repo": "libpng", - "rev": "8439534daa1d3a5705ba92e653eda9251246dd61", - "type": "github" - } - }, "nix-ld": { "inputs": { "nixpkgs": [ @@ -578,22 +509,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1729265718, - "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -637,7 +552,6 @@ "stylix": "stylix", "ucodenix": "ucodenix", "wallpapers": "wallpapers", - "wezterm": "wezterm", "zen-browser": "zen-browser" } }, @@ -687,27 +601,6 @@ "type": "github" } }, - "rust-overlay_3": { - "inputs": { - "nixpkgs": [ - "wezterm", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729477859, - "narHash": "sha256-r0VyeJxy4O4CgTB/PNtfQft9fPfN1VuGvnZiCxDArvg=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "ada8266712449c4c0e6ee6fcbc442b3c217c79e1", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "secrets": { "flake": false, "locked": { @@ -824,21 +717,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -925,32 +803,6 @@ "url": "https://github.com/arunoruto/wallpapers.git" } }, - "wezterm": { - "inputs": { - "flake-utils": "flake-utils_4", - "freetype2": "freetype2", - "harfbuzz": "harfbuzz", - "libpng": "libpng", - "nixpkgs": "nixpkgs_3", - "rust-overlay": "rust-overlay_3", - "zlib": "zlib" - }, - "locked": { - "dir": "nix", - "lastModified": 1733412933, - "narHash": "sha256-2OPDEgUEh0B6OIcSWtBbkw/zFi8r2VfluLj7FebTaVA=", - "owner": "wez", - "repo": "wezterm", - "rev": "6f375e29a2c4d70b8b51956edd494693196c6692", - "type": "github" - }, - "original": { - "dir": "nix", - "owner": "wez", - "repo": "wezterm", - "type": "github" - } - }, "zen-browser": { "inputs": { "nixpkgs": [ @@ -1012,23 +864,6 @@ "type": "tarball", "url": "https://github.com/zen-browser/desktop/releases/download/1.0.2-b.2/zen.linux-specific.tar.bz2" } - }, - "zlib": { - "flake": false, - "locked": { - "lastModified": 1484501380, - "narHash": "sha256-j5b6aki1ztrzfCqu8y729sPar8GpyQWIrajdzpJC+ww=", - "owner": "madler", - "repo": "zlib", - "rev": "cacf7f1d4e3d44d871b605da3b647f07d718623f", - "type": "github" - }, - "original": { - "owner": "madler", - "ref": "v1.2.11", - "repo": "zlib", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index afd46e3..6fbf09d 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; @@ -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=" ]; }; } diff --git a/modules/home-manager/pc/terminal/wezterm.nix b/modules/home-manager/pc/terminal/wezterm.nix index 43f284f..d0a3e5a 100644 --- a/modules/home-manager/pc/terminal/wezterm.nix +++ b/modules/home-manager/pc/terminal/wezterm.nix @@ -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; + # }; }; }