summaryrefslogtreecommitdiff
path: root/modules/common/subversion.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
committerAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
commit91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 (patch)
treee07291fcb1cf62a561ffe58d1fd8e2968ff6fcb3 /modules/common/subversion.nix
parentf1e8dc736a904703eaa97ccf3d5cde3f69101c38 (diff)
2023-02-19
Diffstat (limited to 'modules/common/subversion.nix')
-rw-r--r--modules/common/subversion.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/modules/common/subversion.nix b/modules/common/subversion.nix
new file mode 100644
index 0000000..077f449
--- /dev/null
+++ b/modules/common/subversion.nix
@@ -0,0 +1,52 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.nixfiles.modules.subversion;
+in {
+ options.nixfiles.modules.subversion.enable = mkEnableOption "Subversion";
+
+ config = mkIf cfg.enable {
+ nixfiles.modules.gnupg.enable = true;
+
+ hm.home = {
+ file = {
+ ".subversion/config".text = generators.toINI {} {
+ auth = {
+ password-stores = "gpg-agent";
+ ssl-client-cert-file-prompt = "no";
+ store-passwords = "yes";
+ store-auth-creds = "yes";
+ };
+ helpers = {
+ editor-cmd = "${config.programs.vim.package}/bin/vim";
+ diff-cmd = "${pkgs.colordiff}/bin/colordiff";
+ };
+ miscellany = {
+ global-ignores = with config.hm.programs.git;
+ optionalString (ignores != []) (concatStringsSep " " ignores);
+ diff-ignore-content-type = "no";
+ };
+ working-copy = {
+ exclusive-locking-clients = "svn";
+ exclusive-locking = true;
+ busy-timeout = 10000;
+ };
+ };
+
+ ".subversion/servers".text = generators.toINI {} {
+ global = {
+ store-auth-creds = "yes";
+ store-passwords = "yes";
+ store-plaintext-passwords = "yes";
+ };
+ };
+ };
+
+ packages = with pkgs; [(subversionClient.override {saslSupport = true;})];
+ };
+ };
+}