1 {pkgs, lib, config, system, ...}:
2 let inherit (builtins.extraBuiltins) pass;
4 inherit (config.services) dovecot2;
5 userPass = name: pass ("${config.networking.domain}/${config.networking.hostName}/"+name);
8 <nixsys/install/modules.nix>
18 enable = lib.mkEnableOption "friot";
19 networking.zones = lib.mkOption {
20 type = types.attrsOf (types.submodule ({zone, ...}: {
22 iface = lib.mkOption {
24 description = "Interface name.";
29 description = "Static IPv4 address of the machine.";
34 description = "Static IPv6 address of the machine.";
43 domain = "commonade.coop";
45 #fqdn = "machine1.logic.coop";
46 users.mutableUsers = false;
48 root.initialPassword = userPass "root";
49 root.password = config.users.users.root.initialPassword;
52 extraGroups = [ "sudo" ];
53 description = "Julien Moutinho";
55 shell = lib.mkDefault config.users.defaultUserShell;
56 group = "julm"; # FIXME: unknown group
57 initialPassword = userPass "julm";
58 password = config.users.users.julm.initialPassword;
64 enable = false; # NOTE: useless on this machine, and CPU intensive.
74 #declarativeContents = ''
75 # dn: dc=example,dc=org
79 # dn: ou=users,dc=example,dc=org
80 # objectClass = organizationalUnit
89 group = config.services.gitolite.user;
90 adminPubkey = pass "${config.networking.domain}/ssh/julm";
93 $RC{LOG_DEST} = 'repo-log,syslog';
94 $RC{LOG_FACILITY} = 'local0';
95 $RC{GIT_CONFIG_KEYS} = 'hooks.* gitweb.*';
96 $RC{LOCAL_CODE} = "$rc{GL_ADMIN_BASE}/local"
97 if -d "$rc{GL_ADMIN_BASE}/local";
98 push(@{$RC{ENABLE}}, ( 'Alias'
103 , 'keysubdirs-as-groups'
105 , 'expand-deny-messages'
106 , 'repo-specific-hooks'
108 , 'ssh-authkeys-split'
125 builtins.attrNames dovecot2.domains;
128 "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
129 "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
130 "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
133 "${config.networking.domain}" = {
136 password = builtins.extraBuiltins.pass "${config.networking.domain}/dovecot2/test";
137 # "${config.networking.domain}/dovecot2/test";
138 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
139 aliases = ["test-alias@${config.networking.domain}"];
147 systemPackages = with pkgs; [