Add radicale user script
This commit is contained in:
parent
f6887fa1b5
commit
3ed2998378
|
@ -10,6 +10,8 @@ let
|
|||
});
|
||||
};
|
||||
|
||||
htpasswd_filename = "/etc/radicale/users";
|
||||
|
||||
in {
|
||||
|
||||
nixpkgs.overlays = [ radicaleOverlay ];
|
||||
|
@ -25,8 +27,8 @@ in {
|
|||
timeout = 30;
|
||||
};
|
||||
auth = {
|
||||
inherit htpasswd_filename;
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = "/etc/radicale/users";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
delay = 1;
|
||||
};
|
||||
|
@ -53,4 +55,13 @@ in {
|
|||
#"proxy_pass_header Authorization;";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
# Add a script to easily add users
|
||||
(pkgs.writeScriptBin "radicale-set-user" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
mkdir -p $(dirname "${htpasswd_filename}")
|
||||
${pkgs.apacheHttpd}/bin/htpasswd -Bc "${htpasswd_filename}" $1
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue