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>
21 enable = lib.mkEnableOption "friot";
22 networking.baseName = lib.mkOption {
24 description = "Base network name.";
27 networking.zones = lib.mkOption {
28 type = types.attrsOf (types.submodule ({zone, ...}: {
30 iface = lib.mkOption {
32 description = "Interface name.";
37 description = "Static IPv4 address of the machine.";
42 description = "Static IPv6 address of the machine.";
51 baseName = "commonsoft";
52 domain = "${config.networking.baseName}.coop";
54 users.mutableUsers = false;
56 root.initialPassword = userPass "root";
57 root.password = config.users.users.root.initialPassword;
60 extraGroups = [ "sudo" ];
61 description = "Julien Moutinho";
63 shell = lib.mkDefault config.users.defaultUserShell;
64 group = "julm"; # FIXME: unknown group
65 initialPassword = userPass "julm";
66 password = config.users.users.julm.initialPassword;
71 gid = config.users.users.julm.uid;
77 enable = false; # NOTE: useless on this machine, and CPU intensive.
101 [ "www.${config.networking.domain}" ] ++
102 [ "git.${config.networking.domain}" ] ++
103 [ "mail.${config.networking.domain}" ] ++
104 builtins.attrNames dovecot2.domains;
107 "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
108 "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
109 "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
112 "${config.networking.domain}" = {
115 password = pass "${config.networking.domain}/mail/julm";
116 # "${config.networking.domain}/dovecot2/julm";
117 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
118 aliases = ["julien.moutinho@${config.networking.domain}"];
122 password = pass "${config.networking.domain}/mail/test";
123 # "${config.networking.domain}/dovecot2/test";
124 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
125 aliases = ["test-alias@${config.networking.domain}"];
133 systemPackages = with pkgs; [