refactor: use hm ghostty module

This commit is contained in:
Moritz Böhme 2025-05-20 18:17:18 +02:00
parent 39e066f53c
commit ca8c1124ca
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
2 changed files with 7 additions and 22 deletions

View file

@ -19,7 +19,6 @@ in {
chromium.enable = mkDefault true;
firefox.enable = mkDefault true;
gpg.enable = mkDefault true;
ghostty.settings.window-decoration = false;
niri.enable = mkDefault true;
nvim.enable = mkDefault true;
python.versions."311".enable = mkDefault true;
@ -78,17 +77,12 @@ in {
vlc
];
fonts = {
enableDefaultPackages = true;
packages = [
pkgs.nerd-fonts.fira-code
pkgs.nerd-fonts.intone-mono
];
};
fonts.enableDefaultPackages = true;
programs.nix-ld.enable = true;
home-manager.users.moritz = {
programs.ghostty.settings.window-decoration = false;
services.nextcloud-client = {
enable = true;
startInBackground = true;

View file

@ -6,25 +6,16 @@
}:
with lib; let
cfg = config.my.programs.ghostty;
format = pkgs.formats.keyValue {
listsAsDuplicateKeys = true;
};
in {
options.my.programs.ghostty.enable = mkEnableOption "Ghostty";
options.my.programs.ghostty.package = mkPackageOption pkgs "ghostty" {};
options.my.programs.ghostty.settings = mkOption {
inherit (format) type;
description = ''
Configuration written to {file}`$XDG_CONFIG_HOME/ghostty/config`.
'';
default = {};
options.my.programs.ghostty = {
enable = mkEnableOption "Ghostty";
package = mkPackageOption pkgs "ghostty" {};
};
config = mkIf cfg.enable {
my.terminal.package = cfg.package;
home-manager.users.moritz = {
home.packages = [cfg.package];
xdg.configFile."ghostty/config".source = format.generate "ghostty-config" cfg.settings;
home-manager.users.moritz.programs.ghostty = {
inherit (cfg) enable package;
};
};
}