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>
19 enable = lib.mkEnableOption "friot";
20 networking.zones = lib.mkOption {
21 type = types.attrsOf (types.submodule ({zone, ...}: {
23 iface = lib.mkOption {
25 description = "Interface name.";
30 description = "Static IPv4 address of the machine.";
35 description = "Static IPv6 address of the machine.";
44 domain = "commonade.coop";
46 #fqdn = "machine1.logic.coop";
47 users.mutableUsers = false;
49 root.initialPassword = userPass "root";
50 root.password = config.users.users.root.initialPassword;
53 extraGroups = [ "sudo" ];
54 description = "Julien Moutinho";
56 shell = lib.mkDefault config.users.defaultUserShell;
57 group = "julm"; # FIXME: unknown group
58 initialPassword = userPass "julm";
59 password = config.users.users.julm.initialPassword;
65 enable = false; # NOTE: useless on this machine, and CPU intensive.
75 #declarativeContents = ''
76 # dn: dc=example,dc=org
80 # dn: ou=users,dc=example,dc=org
81 # objectClass = organizationalUnit
100 [ "www.${config.networking.domain}" ] ++
101 [ "git.${config.networking.domain}" ] ++
102 [ "mail.${config.networking.domain}" ] ++
103 builtins.attrNames dovecot2.domains;
106 "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
107 "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
108 "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
111 "${config.networking.domain}" = {
114 password = pass "${config.networking.domain}/mail/julm";
115 # "${config.networking.domain}/dovecot2/julm";
116 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
117 aliases = ["julien.moutinho@${config.networking.domain}"];
121 password = pass "${config.networking.domain}/mail/test";
122 # "${config.networking.domain}/dovecot2/test";
123 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
124 aliases = ["test-alias@${config.networking.domain}"];
132 systemPackages = with pkgs; [