diff --git a/flake.lock b/flake.lock index 5080c1b..4082d0f 100644 --- a/flake.lock +++ b/flake.lock @@ -631,11 +631,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1748217776, - "narHash": "sha256-H5yi/nBlTL8TZ3GKvjJhJReEMc3z1xLBocVvewaJ5SY=", + "lastModified": 1748279748, + "narHash": "sha256-0rJJVtQH0dkrmxHWpVl0MZboG7prkc8r3GgM18ltEkY=", "owner": "Gerg-L", "repo": "nvim-flake", - "rev": "19ee0aebca7d0d675539efde545dc49cee7e3d20", + "rev": "f21def6b0cdaa84a43fd6981f5c97d4713665bf6", "type": "github" }, "original": { @@ -810,11 +810,11 @@ ] }, "locked": { - "lastModified": 1747956973, - "narHash": "sha256-L2El+D70h0vZhHmaERqAw8fZaNvwPZZIIKxamDQfMU4=", + "lastModified": 1748284985, + "narHash": "sha256-5ebKhRtcCWG6LTO9F0IjtNmNc/VUBmiFLqRrfsn3MLU=", "owner": "Gerg-L", "repo": "suckless", - "rev": "f144825dd53f99203b05d3af31475e7431e55b1c", + "rev": "ebedaf1b454ef1da343a96f63dc95f1cd7aa57f3", "type": "github" }, "original": { diff --git a/nixosConfigurations/gerg-desktop/main.nix b/nixosConfigurations/gerg-desktop/main.nix index fda29c5..fa5c6d8 100644 --- a/nixosConfigurations/gerg-desktop/main.nix +++ b/nixosConfigurations/gerg-desktop/main.nix @@ -56,6 +56,11 @@ librewolf = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; }; nixpkgs-review = pkgs.nixpkgs-review.override { nix = config.nix.package; }; }; + + ghostty = { + enable = true; + defaultSettings = true; + }; }; boot = { binfmt.emulatedSystems = [ "aarch64-linux" ]; diff --git a/nixosModules/DE/dwm.nix b/nixosModules/DE/dwm.nix index ce19a16..9f0c9b6 100644 --- a/nixosModules/DE/dwm.nix +++ b/nixosModules/DE/dwm.nix @@ -10,7 +10,7 @@ config = lib.mkIf config.local.DE.dwm.enable { local.packages = { - inherit (suckless.packages) dmenu dwm st; + inherit (suckless.packages) dmenu dwm; inherit (pkgs) maim playerctl diff --git a/nixosModules/ghostty.nix b/nixosModules/ghostty.nix new file mode 100644 index 0000000..4e5e5ec --- /dev/null +++ b/nixosModules/ghostty.nix @@ -0,0 +1,89 @@ +{ + lib, + pkgs, + config, +}: +let + cfg = config.local.ghostty; + format = pkgs.formats.keyValue { + listsAsDuplicateKeys = true; + mkKeyValue = + k: v: + if builtins.isString v then + ''${k} = "${toString v}"'' + else + ''${k} = ${ + if builtins.isBool v then if v then "true" else "false" else toString v + }''; + }; + configFile = format.generate "ghostty-config" cfg.settings; +in +{ + options.local.ghostty = { + enable = lib.mkEnableOption "ghostty"; + settings = lib.mkOption { + inherit (format) type; + default = { }; + }; + defaultSettings = lib.mkEnableOption "ghostty default settings"; + }; + config = lib.mkIf cfg.enable { + local.ghostty.settings = lib.mkIf cfg.defaultSettings ( + builtins.mapAttrs (_: lib.mkDefault) { + window-decoration = false; + font-size = 10; + font-family = "Overpass Mono"; + + adjust-cursor-thickness = 2; + + bold-is-bright = false; + + background = "#080808"; + foreground = "#bdbdbd"; + selection-background = "#b2ceee"; + selection-foreground = "#080808"; + cursor-color = "#8e8e8e"; + + palette = [ + "0=#323437" + "1=#ff5454" + "2=#8cc85f" + "3=#e3c78a" + "4=#80a0ff" + "5=#d183e8" + "6=#79dac8" + "7=#a1aab8" + "8=#7c8f8f" + "9=#ff5189" + "10=#36c692" + "11=#bfbf97" + "12=#74b2ff" + "13=#ae81ff" + "14=#85dc85" + "15=#e2637f" + ]; + copy-on-select = false; + clipboard-read = "allow"; + clipboard-write = "allow"; + clipboard-trim-trailing-spaces = true; + keybind = [ + "clear" + "ctrl+shift+v=paste_from_clipboard" + ]; + + auto-update = "off"; + } + ); + + local.packages.ghostty = pkgs.symlinkJoin { + name = "ghostty"; + paths = [ pkgs.ghostty ]; + nativeBuildInputs = [ pkgs.makeBinaryWrapper ]; + postBuild = '' + wrapProgram "$out/bin/ghostty" \ + --add-flag '--config-default-files=false' \ + --add-flag '--config-file="${configFile}"' + ''; + }; + }; +} diff --git a/nixosModules/theming.nix b/nixosModules/theming.nix index 00ff435..171570f 100644 --- a/nixosModules/theming.nix +++ b/nixosModules/theming.nix @@ -77,7 +77,10 @@ in sansSerif = [ "Overpass" ]; monospace = [ "Overpass Mono" ]; }; - hinting.enable = true; + hinting = { + enable = true; + style = "medium"; + }; antialias = true; }; };