post: update nixos config syntax to 20.03

- 'loaOf' type has been deprecated, in favour of 'attrsOf'
- https://nixos.org/nixos/manual/release-notes.html#sec-release-20.03
This commit is contained in:
MDLeom 2020-04-22 03:02:19 +01:00
parent bd2391427b
commit 6a4a361b67
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
4 changed files with 12 additions and 17 deletions

View File

@ -2,6 +2,7 @@
title: "Setup Caddy as a reverse proxy on NixOS (Part 1: Installation)" title: "Setup Caddy as a reverse proxy on NixOS (Part 1: Installation)"
excerpt: "Part 1: Installing NixOS" excerpt: "Part 1: Installing NixOS"
date: 2020-02-23 date: 2020-02-23
lastUpdated: 2020-04-22
tags: tags:
- web - web
- linux - linux

View File

@ -2,7 +2,7 @@
title: "Setup Caddy as a reverse proxy on NixOS (Part 2: Hardening)" title: "Setup Caddy as a reverse proxy on NixOS (Part 2: Hardening)"
excerpt: "Part 2: Securing NixOS" excerpt: "Part 2: Securing NixOS"
date: 2020-03-04 date: 2020-03-04
lastUpdated: 2020-03-23 lastUpdated: 2020-04-22
tags: tags:
- web - web
- linux - linux
@ -148,16 +148,10 @@ Once the secret is generated, TOTP can be enabled using the following config. I
``` js ``` js
## Requires OTP to login & sudo ## Requires OTP to login & sudo
security.pam.services = [ security.pam = {
{ services.login.googleAuthenticator.enable = true;
name = "login"; services.sudo.googleAuthenticator.enable = true;
googleAuthenticator.enable = true; };
}
{
name = "sudo";
googleAuthenticator.enable = true;
}
];
``` ```
## DNS-over-TLS ## DNS-over-TLS

View File

@ -2,6 +2,7 @@
title: "How to make your website available over I2P Eepsite on NixOS" title: "How to make your website available over I2P Eepsite on NixOS"
excerpt: "A guide on I2P Eepsite on NixOS" excerpt: "A guide on I2P Eepsite on NixOS"
date: 2020-03-21 date: 2020-03-21
lastUpdated: 2020-04-22
tags: tags:
- web - web
- linux - linux
@ -39,8 +40,7 @@ To join the I2P network, I'm using [i2pd](https://i2pd.website/), an (unofficial
enable = true; enable = true;
ifname = "ens3"; ifname = "ens3";
address = "xxxx"; address = "xxxx";
inTunnels = [{ inTunnels.myEep = {
name = "myEep";
enable = true; enable = true;
keys = "myEep-keys.dat"; keys = "myEep-keys.dat";
inPort = 80; inPort = 80;
@ -49,7 +49,7 @@ To join the I2P network, I'm using [i2pd](https://i2pd.website/), an (unofficial
port = 8081; port = 8081;
# inbound.length = 1; # inbound.length = 1;
# outbound.length = 1; # outbound.length = 1;
}]; };
enableIPv4 = false; enableIPv4 = false;
enableIPv6 = true; enableIPv6 = true;
}; };

View File

@ -2,6 +2,7 @@
title: "How to make your website available over Tor hidden service on NixOS" title: "How to make your website available over Tor hidden service on NixOS"
excerpt: "A guide on Tor hidden service on NixOS" excerpt: "A guide on Tor hidden service on NixOS"
date: 2020-03-16 date: 2020-03-16
lastUpdated: 2020-04-22
tags: tags:
- web - web
- linux - linux
@ -36,8 +37,7 @@ The first step is to bring up a Tor hidden service to get an onion address. Add
services.tor = { services.tor = {
enable = true; enable = true;
enableGeoIP = false; enableGeoIP = false;
hiddenServices = [{ hiddenServices.myOnion = {
name = "myOnion";
version = 3; version = 3;
map = [ map = [
{ {
@ -46,7 +46,7 @@ The first step is to bring up a Tor hidden service to get an onion address. Add
toPort = "8080"; toPort = "8080";
} }
]; ];
}]; };
extraConfig = extraConfig =
'' ''
ClientUseIPv4 0 ClientUseIPv4 0