diff --git a/home-manager/modules/gitu/default.nix b/home-manager/modules/gitu/default.nix new file mode 100644 index 0000000..6732f3d --- /dev/null +++ b/home-manager/modules/gitu/default.nix @@ -0,0 +1,35 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +let + cfg = config.eboskma.programs.gitu; + + settingsFormat = pkgs.formats.toml { }; + + gituConfig = types.submodule { + freeformType = settingsFormat.type; + }; +in +{ + options.eboskma.programs.gitu = { + enable = mkEnableOption "gitu"; + settings = mkOption { + description = "Gitu config according to https://github.com/altsem/gitu/blob/master/src/default_config.toml"; + default = { }; + type = gituConfig; + }; + }; + + config = mkIf cfg.enable { + xdg.configFile.gitu = { + target = "gitu/config.toml"; + source = settingsFormat.generate "config.toml" cfg.settings; + }; + + home.packages = [ pkgs.gitu ]; + }; +} diff --git a/users/erwin/home.nix b/users/erwin/home.nix index e65cc8d..2d96d87 100644 --- a/users/erwin/home.nix +++ b/users/erwin/home.nix @@ -61,6 +61,26 @@ in signingKey = "~/.ssh/id_ed25519_sk_personal.pub"; signingKeyFormat = "ssh"; }; + gitu = { + enable = true; + settings = { + bindings = { + root = { + move_down = [ + "n" + "" + ]; + move_up = [ + "p" + "" + ]; + half_page_down = [ "" ]; + half_page_up = [ "" ]; + discard = [ "k" ]; + }; + }; + }; + }; gpg.enable = true; mpd.enable = true; neovim.enable = true;