1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

alacritty: add package option

PR #1372
This commit is contained in:
Leon Kowarschick 2020-07-03 19:09:35 +02:00 committed by Robert Helgesson
parent 89adfc9f01
commit 2e7935767f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 9 additions and 5 deletions

View file

@ -11,6 +11,13 @@ in {
programs.alacritty = {
enable = mkEnableOption "Alacritty";
package = mkOption {
type = types.package;
default = pkgs.alacritty;
defaultText = literalExample "pkgs.alacritty";
description = "The Alacritty package to install.";
};
settings = mkOption {
type = types.attrs;
default = { };
@ -41,7 +48,7 @@ in {
config = mkMerge [
(mkIf cfg.enable {
home.packages = [ pkgs.alacritty ];
home.packages = [ cfg.package ];
xdg.configFile."alacritty/alacritty.yml" = mkIf (cfg.settings != { }) {
text =

View file

@ -6,6 +6,7 @@ with lib;
config = {
programs.alacritty = {
enable = true;
package = pkgs.writeScriptBin "dummy-alacritty" "";
settings = {
window.dimensions = {
@ -21,10 +22,6 @@ with lib;
};
};
nixpkgs.overlays = [
(self: super: { alacritty = pkgs.writeScriptBin "dummy-alacritty" ""; })
];
nmt.script = ''
assertFileContent \
home-files/.config/alacritty/alacritty.yml \