From 996d48221cd455b99a08633194cc06287179c10a Mon Sep 17 00:00:00 2001 From: cnst Date: Mon, 6 Jan 2025 13:19:13 +0100 Subject: [PATCH] moving ghostty to hm --- flake.lock | 74 +++++++++++------------ hosts/cnix/modules.nix | 2 +- modules/default.nix | 1 + modules/home/programs/ghostty/default.nix | 48 +++++++++++++++ users/cnst/modules/home.nix | 3 + 5 files changed, 90 insertions(+), 38 deletions(-) create mode 100644 modules/home/programs/ghostty/default.nix diff --git a/flake.lock b/flake.lock index c3c3c2b9..95a3a0a0 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1735943654, - "narHash": "sha256-rXmcRRQfXXYAKOa5IXlrMISTwgScA2Dx04JpONXRA+Q=", + "lastModified": 1736112920, + "narHash": "sha256-MME0HoMWJtk67vW4lop1eTK4//EXJB/hefo6+JbdHZs=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "5edcf7fb24c73ff9665f299461af33fa6171836f", + "rev": "aa7b9944e164d9284939b78d05b8cf8df319a5d5", "type": "github" }, "original": { @@ -156,11 +156,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1735972386, - "narHash": "sha256-5bqhkfe/dAxUGFSHz+4zpXSZONaB+KziQiWSnLPC1Ao=", + "lastModified": 1736058609, + "narHash": "sha256-IAE2l4uRHm9EfV/3o4Uz639FMKG4p4aFhsm7pVmPxxI=", "owner": "nix-community", "repo": "fenix", - "rev": "16a543b819f511df865fb515f19fb84f4066c3f4", + "rev": "2496106635e313223d42750681211f19fa8883b8", "type": "github" }, "original": { @@ -429,11 +429,11 @@ "zig": "zig" }, "locked": { - "lastModified": 1736005074, - "narHash": "sha256-6W7Cg4Lf0/gT4r/Bloj9lwxKw+Txti3Bw1ybrEpn0CA=", + "lastModified": 1736115260, + "narHash": "sha256-9VrUz+JNq90Z1QOBojSxKDdUHr0I5XsK/OHjZSyvXwU=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "8f5f432ab61fa73b77cb61239c0cff34250f77bb", + "rev": "2485482aecc02c6c377a30c36a34c647cc521ddf", "type": "github" }, "original": { @@ -526,11 +526,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1736007070, - "narHash": "sha256-/sIqNrVaExdXrfvbbTO39CQ34e68Hq85zhF1x0yDEE4=", + "lastModified": 1736116509, + "narHash": "sha256-ZcUDcqSSLmSLgNVFZ9r3wQ2Dp7MK94kZ1gSOABJ2+Wo=", "owner": "helix-editor", "repo": "helix", - "rev": "353176082e05696b292ccf65955333bd18deef97", + "rev": "6c9619d0944570727ce1f9e8212c4081456fc361", "type": "github" }, "original": { @@ -546,11 +546,11 @@ ] }, "locked": { - "lastModified": 1736013363, - "narHash": "sha256-P4lsS2Y5GzBfC8OfXtD/xWEucX6oHGTjOzjEjEJbXfc=", + "lastModified": 1736089250, + "narHash": "sha256-/LPWMiiJGPHGd7ZYEgmbE2da4zvBW0acmshUjYC3WG4=", "owner": "nix-community", "repo": "home-manager", - "rev": "0d7908bd09165db6699908b7e3970f137327cbf0", + "rev": "172b91bfb2b7f5c4a8c6ceac29fd53a01ef07196", "type": "github" }, "original": { @@ -588,11 +588,11 @@ ] }, "locked": { - "lastModified": 1735774425, - "narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=", + "lastModified": 1736066484, + "narHash": "sha256-uTstP36WaFrw+TEHb8nLF14hFPzQBOhmIxzioHCDaL8=", "owner": "nix-community", "repo": "home-manager", - "rev": "5f6aa268e419d053c3d5025da740e390b12ac936", + "rev": "5ad12b6ea06b84e48f6b677957c74f32d47bdee0", "type": "github" }, "original": { @@ -766,11 +766,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1736008833, - "narHash": "sha256-1Fej194tgc7Cqb1A07d9HLQ++l/+nxO+FAb536mwOSk=", + "lastModified": 1736115553, + "narHash": "sha256-nFagWe+VST+UL+Y/sp4P007PoMpsm6iW+PrWw1VH/Xk=", "owner": "hyprwm", "repo": "hyprland", - "rev": "b0bae15499ad57bbfeae8be958df8c022201e583", + "rev": "f390f48a07d117e24acec59dcf6791bcb3a81110", "type": "github" }, "original": { @@ -1062,11 +1062,11 @@ ] }, "locked": { - "lastModified": 1735330405, - "narHash": "sha256-MhXgu1oymyjhhZGY9yewNonJknNAjilzMGPY1FfMR7s=", + "lastModified": 1735931035, + "narHash": "sha256-f3WRxasPYVKzrvAlLq+/3FRHQVfxVf5xxf0WWwnO99k=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "a86d9cf841eff8b33a05d2bf25788abd8e018dbd", + "rev": "7e530766a5fd9b7577296fedd655f3255f7495d8", "type": "github" }, "original": { @@ -1207,11 +1207,11 @@ "umu": "umu" }, "locked": { - "lastModified": 1735868406, - "narHash": "sha256-/CGzY7MUnhmw+I9j8ApwDt7qOKixWif2khwXEIR97Bc=", + "lastModified": 1736041337, + "narHash": "sha256-ImIZdS70uEHLC1NxRfc0bTVhUSBZjDNyaLlUAiloL8g=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "afc74611082ecc4a961e4317fa2763c8812e217f", + "rev": "118be90db8e4b06e3829b7b6ea901b610e870040", "type": "github" }, "original": { @@ -1625,11 +1625,11 @@ "systems": "systems_7" }, "locked": { - "lastModified": 1735994155, - "narHash": "sha256-ewuykkTMO2+W594knAAMcPrzxg32iq40Q1zVgxJnY4c=", + "lastModified": 1736066242, + "narHash": "sha256-oSKBFoZ/J1A/KrAEiCLZu3vddaBDuMGK5TsIlOx+814=", "owner": "notashelf", "repo": "nvf", - "rev": "eb6e8b17b7beffd3792d898e30b0e9cd80de06ae", + "rev": "b7bea89d9ab669c8ead928c5e087dedcfbb32202", "type": "github" }, "original": { @@ -3645,11 +3645,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1735927297, - "narHash": "sha256-Rn2MXhAXzttYaXhiyogqFbeLi+GuJq9u6cheqEBxfAo=", + "lastModified": 1736009406, + "narHash": "sha256-5P+kK7S64/Mg8NrGQ3ScqoRW7vJAKzoeGJCFhEbldN0=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "d1d4319f9b8ff37fa8630ba8588553f8e0a49945", + "rev": "6725e046df7493c1047e115ebc7180fb06416038", "type": "github" }, "original": { @@ -3925,11 +3925,11 @@ }, "locked": { "dir": "packaging/nix", - "lastModified": 1735507919, - "narHash": "sha256-4cR4mk1660p3y8wnX0XbHSQh4KX0mbMn6/2YnALNt8o=", + "lastModified": 1736112197, + "narHash": "sha256-JPMRlGr9hbJsE7pfa8Vygg98jgcRYPats1PKv6AvwMo=", "ref": "refs/heads/main", - "rev": "59a82ea8cd284c7535bc06b8f6156abb7da96f6a", - "revCount": 874, + "rev": "313c82a50bc04bf7668524f539e5017278c5717c", + "revCount": 875, "submodules": true, "type": "git", "url": "https://github.com/Open-Wine-Components/umu-launcher/" diff --git a/hosts/cnix/modules.nix b/hosts/cnix/modules.nix index 88fb52a7..c8417496 100644 --- a/hosts/cnix/modules.nix +++ b/hosts/cnix/modules.nix @@ -73,7 +73,7 @@ enable = true; }; ghostty = { - enable = true; + enable = false; }; gimp = { enable = false; diff --git a/modules/default.nix b/modules/default.nix index 4ad0df7f..908e1b0f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -14,6 +14,7 @@ ./home/programs/fish ./home/programs/foot ./home/programs/fuzzel + ./home/programs/ghostty ./home/programs/helix ./home/programs/hyprland ./home/programs/hyprlock diff --git a/modules/home/programs/ghostty/default.nix b/modules/home/programs/ghostty/default.nix new file mode 100644 index 00000000..88b7739d --- /dev/null +++ b/modules/home/programs/ghostty/default.nix @@ -0,0 +1,48 @@ +{ + config, + lib, + osConfig, + ... +}: let + inherit (lib) mkIf mkEnableOption mkMerge getExe; + cfg = config.home.programs.ghostty; + host = osConfig.networking.hostName; +in { + options = { + home.programs.ghostty.enable = mkEnableOption "Enables ghostty"; + }; + config = mkIf cfg.enable (mkMerge [ + { + programs.ghostty = { + enable = true; + enableBashIntegration = config.programs.bash.enable; + enableFishIntegration = config.programs.fish.enable; + enableZshIntegration = config.programs.zsh.enable; + settings = { + theme = "GruvboxDark"; + focus-follows-mouse = true; + resize-overlay = "never"; + background-opacity = 0.95; + gtk-single-instance = true; + window-decoration = false; + window-padding-x = "4,4"; + font-family = "InputMonoNarrow Light"; + + # cursor-color = "#C2C2B0"; + # cursor-style = "block"; + # cursor-style-blink = false; + # shell-integration-features = "no-cursor"; + }; + }; + } + (mkIf (host == "cnix") { + programs.ghostty.settings.command = "${getExe config.programs.fish.package}"; + }) + (mkIf (host == "cnixpad") { + programs.ghostty.settings.command = "${getExe config.programs.fish.package}"; + }) + (mkIf (host == "toothpc") { + programs.ghostty.settings.command = "${getExe config.programs.zsh.package}"; + }) + ]); +} diff --git a/users/cnst/modules/home.nix b/users/cnst/modules/home.nix index a0095bcf..7758ef5a 100644 --- a/users/cnst/modules/home.nix +++ b/users/cnst/modules/home.nix @@ -38,6 +38,9 @@ fuzzel = { enable = true; }; + ghostty = { + enable = true; + }; helix = { enable = true; };