From 4226885c9f4b1739e37f738f3cb81c3613b56c7c Mon Sep 17 00:00:00 2001 From: Mirza Arnaut Date: Wed, 11 Dec 2024 00:06:42 +0100 Subject: [PATCH] Add wezterm flake and move experimental features under extra --- flake.lock | 167 ++++++++++++++++++- flake.nix | 15 +- modules/home-manager/pc/terminal/wezterm.nix | 3 + modules/home-manager/server/nix-utils.nix | 14 +- modules/nixos/system/nix-utils.nix | 18 +- 5 files changed, 200 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 433de69..d9955e2 100644 --- a/flake.lock +++ b/flake.lock @@ -232,6 +232,41 @@ "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": { @@ -287,6 +322,23 @@ "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", @@ -377,6 +429,23 @@ "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": [ @@ -491,6 +560,22 @@ "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": [ @@ -533,7 +618,8 @@ "sops-nix": "sops-nix", "stylix": "stylix", "ucodenix": "ucodenix", - "wallpapers": "wallpapers" + "wallpapers": "wallpapers", + "wezterm": "wezterm" } }, "rust-overlay": { @@ -582,6 +668,27 @@ "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": { @@ -698,6 +805,21 @@ "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": { @@ -780,6 +902,49 @@ "type": "git", "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" + } + }, + "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 d2e5a9f..df14dfa 100644 --- a/flake.nix +++ b/flake.nix @@ -45,10 +45,8 @@ # home-manager.follows = "home-manager"; # }; # }; - helix = { - url = "github:helix-editor/helix"; - # inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; + helix.url = "github:helix-editor/helix"; + wezterm.url = "github:wez/wezterm?dir=nix"; # nixvim-flake.url = "github:arunoruto/nvim.nix"; # Styling stylix = { @@ -201,4 +199,13 @@ # devShells.${system} = import ./shells nixpkgs.legacyPackages.${system}; # packages.${system} = import ./pkgs nixpkgs.legacyPackages.${system}; }; + + # nixConfig = { + # extra-substituters = [ + # "https://wezterm.cachix.org" + # ]; + # extra-trusted-public-keys = [ + # "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" + # ]; + # }; } diff --git a/modules/home-manager/pc/terminal/wezterm.nix b/modules/home-manager/pc/terminal/wezterm.nix index 12d0b0a..4e6c430 100644 --- a/modules/home-manager/pc/terminal/wezterm.nix +++ b/modules/home-manager/pc/terminal/wezterm.nix @@ -1,6 +1,8 @@ { config, lib, + pkgs, + inputs, ... }: { @@ -9,6 +11,7 @@ config = lib.mkIf config.terminals.wezterm.enable { programs.wezterm = { enable = true; + package = inputs.wezterm.packages.${pkgs.system}.default; enableZshIntegration = config.programs.zsh.enable; extraConfig = '' local wezterm = require 'wezterm' diff --git a/modules/home-manager/server/nix-utils.nix b/modules/home-manager/server/nix-utils.nix index f36360c..3c7d59b 100644 --- a/modules/home-manager/server/nix-utils.nix +++ b/modules/home-manager/server/nix-utils.nix @@ -54,15 +54,19 @@ in nix = { package = lib.mkForce pkgs.unstable.nix; settings = { - experimental-features = [ + extra-experimental-features = [ "nix-command" "flakes" - ]; - extra-experimental-features = [ "pipe-operators" ]; - extra-substituters = [ "https://helix.cachix.org" ]; - extra-trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; + extra-substituters = [ + "https://helix.cachix.org" + "https://wezterm.cachix.org" + ]; + extra-trusted-public-keys = [ + "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" + ]; }; extraOptions = '' trusted-users = root ${user} diff --git a/modules/nixos/system/nix-utils.nix b/modules/nixos/system/nix-utils.nix index ed6dfbb..9026956 100644 --- a/modules/nixos/system/nix-utils.nix +++ b/modules/nixos/system/nix-utils.nix @@ -22,19 +22,23 @@ nix = { # package = pkgs.unstable.nix; settings = { - # build in a sandbox sandbox = true; # auto-optimise-store = true; - experimental-features = [ + warn-dirty = false; + accept-flake-config = true; + extra-experimental-features = [ "nix-command" "flakes" - ]; - extra-experimental-features = [ "pipe-operators" ]; - warn-dirty = false; - extra-substituters = [ "https://helix.cachix.org" ]; - extra-trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; + extra-substituters = [ + "https://helix.cachix.org" + "https://wezterm.cachix.org" + ]; + extra-trusted-public-keys = [ + "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" + ]; }; extraOptions = '' trusted-users = root ${username}