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 = "commonsoft.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;
63 gid = config.users.users.julm.uid;
69 enable = false; # NOTE: useless on this machine, and CPU intensive.
79 #declarativeContents = ''
80 # dn: dc=example,dc=org
84 # dn: ou=users,dc=example,dc=org
85 # objectClass = organizationalUnit
104 [ "www.${config.networking.domain}" ] ++
105 [ "git.${config.networking.domain}" ] ++
106 [ "mail.${config.networking.domain}" ] ++
107 builtins.attrNames dovecot2.domains;
110 "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
111 "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
112 "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
115 "${config.networking.domain}" = {
118 password = pass "${config.networking.domain}/mail/julm";
119 # "${config.networking.domain}/dovecot2/julm";
120 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
121 aliases = ["julien.moutinho@${config.networking.domain}"];
125 password = pass "${config.networking.domain}/mail/test";
126 # "${config.networking.domain}/dovecot2/test";
127 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
128 aliases = ["test-alias@${config.networking.domain}"];
136 systemPackages = with pkgs; [