From 389f2b20371b7c0c7e52ceb817d7c8bbc63435a4 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 6 Aug 2022 20:11:57 -0300 Subject: [PATCH] bashmount: add module --- .github/CODEOWNERS | 2 ++ modules/misc/news.nix | 7 +++++++ modules/modules.nix | 1 + modules/programs/bashmount.nix | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 modules/programs/bashmount.nix diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 92cc0991e..ad278c19d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -68,6 +68,8 @@ Makefile @thiagokokada /modules/programs/bash.nix @rycee +/modules/programs/bashmount.nix @AndersonTorres + /modules/programs/bat.nix @marsam /modules/programs/beets.nix @rycee diff --git a/modules/misc/news.nix b/modules/misc/news.nix index e54b2dccc..188206cf9 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -646,6 +646,13 @@ in A new module is available: 'programs.wezterm'. ''; } + + { + time = "2022-08-08T16:11:22+00:00"; + message = '' + A new module is available: 'programs.bashmount'. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index ac2f048e0..fa8c9ebe6 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -52,6 +52,7 @@ let ./programs/autojump.nix ./programs/autorandr.nix ./programs/bash.nix + ./programs/bashmount.nix ./programs/bat.nix ./programs/beets.nix ./programs/bottom.nix diff --git a/modules/programs/bashmount.nix b/modules/programs/bashmount.nix new file mode 100644 index 000000000..38d57456e --- /dev/null +++ b/modules/programs/bashmount.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.bashmount; + +in { + meta.maintainers = [ maintainers.AndersonTorres ]; + + options.programs.bashmount = { + enable = mkEnableOption "bashmount"; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Configuration written to + $XDG_CONFIG_HOME/bashmount/config. Look at + + for explanation about possible values. + ''; + }; + + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.bashmount ]; + + xdg.configFile."bashmount/config" = + mkIf (cfg.extraConfig != "") { text = cfg.extraConfig; }; + }; +}