nixos/*: convert multiline inline code to listings

presumably it was not intended to have these blocks rendered inline, and
markdown conversion would be messy as well.

pennae 7d102d11 0cfcb590

Changed files
+24 -24
nixos
modules
services
databases
hardware
logging
networking
security
virtualisation
+2 -2
nixos/modules/services/databases/cockroachdb.nix
···
like datacenter. The tiers and order must be the same on all nodes.
Including more tiers is better than including fewer. For example:
-
<literal>
country=us,region=us-west,datacenter=us-west-1b,rack=12
country=ca,region=ca-east,datacenter=ca-east-2,rack=4
planet=earth,province=manitoba,colo=secondary,power=3
-
</literal>
'';
};
···
like datacenter. The tiers and order must be the same on all nodes.
Including more tiers is better than including fewer. For example:
+
<programlisting>
country=us,region=us-west,datacenter=us-west-1b,rack=12
country=ca,region=ca-east,datacenter=ca-east-2,rack=4
planet=earth,province=manitoba,colo=secondary,power=3
+
</programlisting>
'';
};
+2 -2
nixos/modules/services/hardware/lcd.nix
···
values, you can run the <command>lsusb</command> command. Example
output:
-
<literal>
Bus 005 Device 002: ID 0403:c630 Future Technology Devices International, Ltd lcd2usb interface
-
</literal>
In this case the vendor id is 0403 and the product id is c630.
'';
···
values, you can run the <command>lsusb</command> command. Example
output:
+
<programlisting>
Bus 005 Device 002: ID 0403:c630 Future Technology Devices International, Ltd lcd2usb interface
+
</programlisting>
In this case the vendor id is 0403 and the product id is c630.
'';
+4 -4
nixos/modules/services/logging/awstats.nix
···
The log file to be scanned.
For mail, set this to
-
<literal>
journalctl $OLD_CURSOR -u postfix.service | ''${pkgs.perl}/bin/perl ''${pkgs.awstats.out}/share/awstats/tools/maillogconvert.pl standard |
-
</literal>
'';
};
···
The log format being used.
For mail, set this to
-
<literal>
%time2 %email %email_r %host %host_r %method %url %code %bytesd
-
</literal>
'';
};
···
The log file to be scanned.
For mail, set this to
+
<programlisting>
journalctl $OLD_CURSOR -u postfix.service | ''${pkgs.perl}/bin/perl ''${pkgs.awstats.out}/share/awstats/tools/maillogconvert.pl standard |
+
</programlisting>
'';
};
···
The log format being used.
For mail, set this to
+
<programlisting>
%time2 %email %email_r %host %host_r %method %url %code %bytesd
+
</programlisting>
'';
};
+6 -6
nixos/modules/services/networking/3proxy.nix
···
Example users file with plain-text passwords:
-
<literal>
test1:CL:password1
test2:CL:password2
-
</literal>
Example users file with md5-crypted passwords:
-
<literal>
test1:CR:$1$tFkisVd2$1GA8JXkRmTXdLDytM/i3a1
test2:CR:$1$rkpibm5J$Aq1.9VtYAn0JrqZ8M.1ME.
-
</literal>
You can generate md5-crypted passwords via https://unix4lyfe.org/crypt/
Note that htpasswd tool generates incompatible md5-crypted passwords.
···
Double authentication is possible, e.g.
-
<literal>
{
auth = [ "iponly" "strong" ];
acl = [
···
}
];
}
-
</literal>
In this example strong username authentication is not required to access 192.168.0.0/16.
'';
};
···
Example users file with plain-text passwords:
+
<programlisting>
test1:CL:password1
test2:CL:password2
+
</programlisting>
Example users file with md5-crypted passwords:
+
<programlisting>
test1:CR:$1$tFkisVd2$1GA8JXkRmTXdLDytM/i3a1
test2:CR:$1$rkpibm5J$Aq1.9VtYAn0JrqZ8M.1ME.
+
</programlisting>
You can generate md5-crypted passwords via https://unix4lyfe.org/crypt/
Note that htpasswd tool generates incompatible md5-crypted passwords.
···
Double authentication is possible, e.g.
+
<programlisting>
{
auth = [ "iponly" "strong" ];
acl = [
···
}
];
}
+
</programlisting>
In this example strong username authentication is not required to access 192.168.0.0/16.
'';
};
+2 -2
nixos/modules/services/networking/hylafax/options.nix
···
readable only by the <literal>uucp</literal> user.
See hosts.hfaxd(5) for details.
This configuration permits access for all users:
-
<literal>
environment.etc."hosts.hfaxd" = {
mode = "0600";
user = "uucp";
text = ".*";
};
-
</literal>
Note that host-based access can be controlled with
<option>config.systemd.sockets.hylafax-hfaxd.listenStreams</option>;
by default, only 127.0.0.1 is permitted to connect.
···
readable only by the <literal>uucp</literal> user.
See hosts.hfaxd(5) for details.
This configuration permits access for all users:
+
<programlisting>
environment.etc."hosts.hfaxd" = {
mode = "0600";
user = "uucp";
text = ".*";
};
+
</programlisting>
Note that host-based access can be controlled with
<option>config.systemd.sockets.hylafax-hfaxd.listenStreams</option>;
by default, only 127.0.0.1 is permitted to connect.
+2 -2
nixos/modules/services/security/hockeypuck.nix
···
the database yourself.
Example:
-
<literal>
services.postgresql = {
enable = true;
ensureDatabases = [ "hockeypuck" ];
···
ensurePermissions."DATABASE hockeypuck" = "ALL PRIVILEGES";
}];
};
-
</literal>
'';
};
};
···
the database yourself.
Example:
+
<programlisting>
services.postgresql = {
enable = true;
ensureDatabases = [ "hockeypuck" ];
···
ensurePermissions."DATABASE hockeypuck" = "ALL PRIVILEGES";
}];
};
+
</programlisting>
'';
};
};
+3 -3
nixos/modules/virtualisation/lxcfs.nix
···
This enables LXCFS, a FUSE filesystem for LXC.
To use lxcfs in include the following configuration in your
container configuration:
-
<code>
-
virtualisation.lxc.defaultConfig = "lxc.include = ''${pkgs.lxcfs}/share/lxc/config/common.conf.d/00-lxcfs.conf";
-
</code>
'';
};
};
···
This enables LXCFS, a FUSE filesystem for LXC.
To use lxcfs in include the following configuration in your
container configuration:
+
<programlisting>
+
virtualisation.lxc.defaultConfig = "lxc.include = ''${pkgs.lxcfs}/share/lxc/config/common.conf.d/00-lxcfs.conf";
+
</programlisting>
'';
};
};
+3 -3
nixos/modules/virtualisation/lxd.nix
···
Most of the time, you'll also want to start lxcfs, so
that containers can "see" the limits:
-
<code>
-
virtualisation.lxc.lxcfs.enable = true;
-
</code>
'';
};
···
Most of the time, you'll also want to start lxcfs, so
that containers can "see" the limits:
+
<programlisting>
+
virtualisation.lxc.lxcfs.enable = true;
+
</programlisting>
'';
};