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.";
50 nixpkgs.overlays = import ../overlays.nix;
52 baseName = "commonsoft";
53 domain = "${config.networking.baseName}.coop";
55 users.mutableUsers = false;
57 root.initialPassword = userPass "root";
58 root.password = config.users.users.root.initialPassword;
61 extraGroups = [ "sudo" ];
62 description = "Julien Moutinho";
64 shell = lib.mkDefault config.users.defaultUserShell;
65 group = "julm"; # FIXME: unknown group
66 initialPassword = userPass "julm";
67 password = config.users.users.julm.initialPassword;
72 gid = config.users.users.julm.uid;
78 enable = false; # NOTE: useless on this machine, and CPU intensive.
102 [ "www.${config.networking.domain}" ] ++
103 [ "git.${config.networking.domain}" ] ++
104 [ "mail.${config.networking.domain}" ] ++
105 builtins.attrNames dovecot2.domains;
108 "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
109 "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
110 "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ];
113 "${config.networking.domain}" = {
116 password = pass "${config.networking.domain}/mail/julm";
117 # "${config.networking.domain}/dovecot2/julm";
118 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
119 aliases = ["julien.moutinho@${config.networking.domain}"];
123 password = pass "${config.networking.domain}/mail/test";
124 # "${config.networking.domain}/dovecot2/test";
125 # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0=";
126 aliases = ["test-alias@${config.networking.domain}"];
134 systemPackages = with pkgs; [