git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/sks: Add a dataDir option
commita0d7b889110893c2a27178dd5d7ef327dd834d74 authorMichael Weiss <dev.primeos@gmail.com> dateSat 8 Sep 2018, 13:04 (8 years ago) parenta02002d
1 file changed+15−1
nixos/modules/services/security/sks.nix+15−1
nixos/modules/services/security/sks.nix+15−1
@@ -27,6 +27,20 @@ in
2727 ";
2828 };
2929
30+ dataDir = mkOption {
31+ type = types.path;
32+ default = "/var/db/sks";
33+ example = "/var/lib/sks";
34+ # TODO: The default might change to "/var/lib/sks" as this is more
35+ # common. There's also https://github.com/NixOS/nixpkgs/issues/26256
36+ # and "/var/db" is not FHS compliant (seems to come from BSD).
37+ description = ''
38+ Data directory (-basedir) for SKS, where the database and all
39+ configuration files are located (e.g. KDB, PTree, membership and
40+ sksconf).
41+ '';
42+ };
43+
3044 hkpAddress = mkOption {
3145 default = [ "127.0.0.1" "::1" ];
3246 type = types.listOf types.str;
@@ -51,7 +65,7 @@ in
5165
5266 users.users.sks = {
5367 createHome = true;
54− home = "/var/db/sks";
68+ home = cfg.dataDir;
5569 isSystemUser = true;
5670 shell = "${pkgs.coreutils}/bin/true";
5771 };