beautify
This commit is contained in:
parent
83aa91b7e5
commit
0a29ba5480
@ -17,6 +17,11 @@ in {
|
|||||||
../../users.nix
|
../../users.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
variables.hostname = hostname;
|
||||||
|
time.timeZone = "Europe/Rome";
|
||||||
|
system.stateVersion = "21.05"; # Did you read the comment?
|
||||||
|
users.users.giulio.openssh.authorizedKeys.keys = pubkeys;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = ["ip=${lan_address}::10.0.0.1:255.255.255.0::enp5s0:off"];
|
kernelParams = ["ip=${lan_address}::10.0.0.1:255.255.255.0::enp5s0:off"];
|
||||||
|
|
||||||
@ -25,9 +30,9 @@ in {
|
|||||||
network = {
|
network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 2222;
|
port = 2222;
|
||||||
hostKeys = [/boot/host_ecdsa_key];
|
hostKeys = [/boot/host_ecdsa_key];
|
||||||
authorizedKeys = pubkeys;
|
authorizedKeys = pubkeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,81 +43,78 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
supportedFilesystems = ["zfs"];
|
supportedFilesystems = ["zfs"];
|
||||||
zfs.requestEncryptionCredentials = true;
|
zfs.requestEncryptionCredentials = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
variables.hostname = hostname;
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Rome";
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = hostname;
|
hostName = hostname;
|
||||||
hostId = "49350853";
|
hostId = "49350853";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
|
defaultGateway = "10.0.0.1";
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp5s0.ipv4.addresses = [{ address = lan_address; prefixLength = 24; }];
|
enp5s0.ipv4.addresses = [{ address = lan_address; prefixLength = 24; }];
|
||||||
enp6s0.useDHCP = false;
|
enp6s0.useDHCP = false;
|
||||||
wlp4s0.useDHCP = false;
|
wlp4s0.useDHCP = false;
|
||||||
};
|
};
|
||||||
defaultGateway = "10.0.0.1";
|
# extraHosts = ''
|
||||||
extraHosts = ''
|
# 127.0.0.1 ${hostname}.devs.giugl.io jf.giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io giupyter.giugl.io irc.giugl.io localhost
|
||||||
127.0.0.1 ${hostname}.devs.giugl.io jf.giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io giupyter.giugl.io irc.giugl.io localhost
|
#
|
||||||
|
## LAN
|
||||||
# LAN
|
#${lan_address} ${hostname}.devs.giugl.io giugl.io jf.giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io todo.giugl.io giupyter.giugl.io collabora.giugl.io htjak.giugl.io irc.giugl.io
|
||||||
${lan_address} ${hostname}.devs.giugl.io giugl.io jf.giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io todo.giugl.io giupyter.giugl.io collabora.giugl.io htjak.giugl.io irc.giugl.io
|
#
|
||||||
|
# 10.0.0.1 router.devs.giugl.io
|
||||||
10.0.0.1 router.devs.giugl.io
|
# 10.0.0.2 dvr.devs.giugl.io
|
||||||
10.0.0.2 dvr.devs.giugl.io
|
# 10.0.0.3 nas.devs.giugl.io
|
||||||
10.0.0.3 nas.devs.giugl.io
|
#
|
||||||
|
## Wireguard hosts
|
||||||
# Wireguard hosts
|
# 10.3.0.1 ${hostname}.devs.giugl.io jf.giugl.io giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io todo.giugl.io giupyter.giugl.io collabora.giugl.io htjak.giugl.io irc.giugl.io
|
||||||
10.3.0.1 ${hostname}.devs.giugl.io jf.giugl.io giugl.io yt.giugl.io s3.giugl.io synclounge.giugl.io htson.giugl.io htrad.giugl.io htnzb.giugl.io httra.giugl.io todo.giugl.io giupyter.giugl.io collabora.giugl.io htjak.giugl.io irc.giugl.io
|
# 10.3.0.2 galuminum.devs.giugl.io
|
||||||
10.3.0.2 galuminum.devs.giugl.io
|
# 10.3.0.3 oneplus.devs.giugl.io
|
||||||
10.3.0.3 oneplus.devs.giugl.io
|
# 10.3.0.4 ipad.devs.giugl.io
|
||||||
10.3.0.4 ipad.devs.giugl.io
|
# 10.3.0.5 manduria.devs.giugl.io
|
||||||
10.3.0.5 manduria.devs.giugl.io
|
# 10.3.0.6 antonio.devs.giugl.io
|
||||||
10.3.0.6 antonio.devs.giugl.io
|
# 10.3.0.7 gbeast.devs.giugl.io
|
||||||
10.3.0.7 gbeast.devs.giugl.io
|
# 10.3.0.8 parisa-phone.devs.giugl.io
|
||||||
10.3.0.8 parisa-phone.devs.giugl.io
|
# 10.3.0.9 parisa-pc.devs.giugl.io
|
||||||
10.3.0.9 parisa-pc.devs.giugl.io
|
# 10.3.0.10 peppiniell.devs.giugl.io
|
||||||
10.3.0.10 peppiniell.devs.giugl.io
|
# 10.3.0.11 padulino.devs.giugl.io
|
||||||
10.3.0.11 padulino.devs.giugl.io
|
# 10.3.0.12 shield.devs.giugl.io
|
||||||
10.3.0.12 shield.devs.giugl.io
|
# 10.3.0.13 angelino.devs.giugl.io
|
||||||
10.3.0.13 angelino.devs.giugl.io
|
# 10.3.0.14 peposone.devs.giugl.io
|
||||||
10.3.0.14 peposone.devs.giugl.io
|
# 10.3.0.15 pepostwo.devs.giugl.io
|
||||||
10.3.0.15 pepostwo.devs.giugl.io
|
# 10.3.0.100 eleonora.devs.giugl.io
|
||||||
10.3.0.100 eleonora.devs.giugl.io
|
# 10.3.0.200 broccolino.devs.giugl.io
|
||||||
10.3.0.200 broccolino.devs.giugl.io
|
# 10.3.0.201 hotpottino.devs.giugl.io
|
||||||
10.3.0.201 hotpottino.devs.giugl.io
|
#
|
||||||
|
## Blacklist
|
||||||
# Blacklist
|
# 0.0.0.0 metrics.plex.tv
|
||||||
0.0.0.0 metrics.plex.tv
|
# 0.0.0.0 analytics.plex.tv
|
||||||
0.0.0.0 analytics.plex.tv
|
# 0.0.0.0 cdn.luckyorange.com
|
||||||
0.0.0.0 cdn.luckyorange.com
|
# 0.0.0.0 w1.luckyorange.com
|
||||||
0.0.0.0 w1.luckyorange.com
|
# 0.0.0.0 browser.sentry-cdn.com
|
||||||
0.0.0.0 browser.sentry-cdn.com
|
# 0.0.0.0 analytics.facebook.com
|
||||||
0.0.0.0 analytics.facebook.com
|
# 0.0.0.0 ads.facebook.com
|
||||||
0.0.0.0 ads.facebook.com
|
# 0.0.0.0 extmaps-api.yandex.net
|
||||||
0.0.0.0 extmaps-api.yandex.net
|
# 0.0.0.0 logservice.hicloud.com
|
||||||
0.0.0.0 logservice.hicloud.com
|
# 0.0.0.0 logbak.hicloud.com
|
||||||
0.0.0.0 logbak.hicloud.com
|
# 0.0.0.0 logservice1.hicloud.com
|
||||||
0.0.0.0 logservice1.hicloud.com
|
# 0.0.0.0 samsung-com.112.2o7.net
|
||||||
0.0.0.0 samsung-com.112.2o7.net
|
# 0.0.0.0 supportmetrics.apple.com
|
||||||
0.0.0.0 supportmetrics.apple.com
|
# 0.0.0.0 analytics.oneplus.cn
|
||||||
0.0.0.0 analytics.oneplus.cn
|
# 0.0.0.0 click.oneplus.cn
|
||||||
0.0.0.0 click.oneplus.cn
|
# 0.0.0.0 analytics-api.samsunghealthcn.com
|
||||||
0.0.0.0 analytics-api.samsunghealthcn.com
|
#
|
||||||
|
## The following lines are desirable for IPv6 capable hosts
|
||||||
# The following lines are desirable for IPv6 capable hosts
|
# ::1 localhost ip6-localhost ip6-loopback
|
||||||
::1 localhost ip6-localhost ip6-loopback
|
# ff02::1 ip6-allnodes
|
||||||
ff02::1 ip6-allnodes
|
# ff02::2 ip6-allrouters
|
||||||
ff02::2 ip6-allrouters
|
# '';
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
@ -138,8 +140,8 @@ ${lan_address} ${hostname}.devs.giugl.io giugl.io jf.giugl.io yt.giugl.io s3.giu
|
|||||||
xserver.videoDrivers = [ "nvidia" ];
|
xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
dnsmasq = {
|
dnsmasq = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servers = ["127.0.0.1#5353"];
|
servers = ["127.0.0.1#5353"];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
localise-queries
|
localise-queries
|
||||||
'';
|
'';
|
||||||
@ -148,29 +150,26 @@ ${lan_address} ${hostname}.devs.giugl.io giugl.io jf.giugl.io yt.giugl.io s3.giu
|
|||||||
dnscrypt-proxy2 = {
|
dnscrypt-proxy2 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
listen_addresses = ["127.0.0.1:5353"];
|
listen_addresses = ["127.0.0.1:5353"];
|
||||||
ipv4_servers = true;
|
ipv4_servers = true;
|
||||||
ipv6_servers = false;
|
ipv6_servers = false;
|
||||||
dnscrypt_servers = true;
|
dnscrypt_servers = true;
|
||||||
doh_servers = true;
|
doh_servers = true;
|
||||||
require_nolog = true;
|
require_nolog = true;
|
||||||
require_nofilter = true;
|
require_nofilter = true;
|
||||||
timeout = 350;
|
timeout = 350;
|
||||||
lb_strategy = "p4";
|
lb_strategy = "p4";
|
||||||
lb_estimator = true;
|
lb_estimator = true;
|
||||||
ignore_system_dns = true;
|
ignore_system_dns = true;
|
||||||
fallback_resolvers = ["1.1.1.1:53" "9.9.9.9:53"];
|
fallback_resolvers = ["1.1.1.1:53" "9.9.9.9:53"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
passwordAuthentication = false;
|
passwordAuthentication = true;
|
||||||
|
permitRootLogin = "yes";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "21.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
users.users.giulio.openssh.authorizedKeys.keys = pubkeys;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user