2020-12-06 16:40:47 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2020-12-09 22:49:42 +01:00
|
|
|
imports = [
|
|
|
|
../../modules
|
|
|
|
];
|
|
|
|
|
2020-12-06 16:40:47 +01:00
|
|
|
networking.domain = "net.clerie.de";
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
console = {
|
|
|
|
keyMap = "de-latin1";
|
|
|
|
};
|
|
|
|
|
2020-12-06 18:23:51 +01:00
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
2022-02-25 10:58:42 +01:00
|
|
|
nix.settings.trusted-users = [ "@wheel" ];
|
2020-12-06 18:23:51 +01:00
|
|
|
|
2020-12-06 16:40:47 +01:00
|
|
|
users.users.clerie = {
|
|
|
|
isNormalUser = true;
|
2020-12-06 17:46:47 +01:00
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCnUBblmmVoMMBftn4EnwnzqR12m9zill51LpO124hHb10K2rqxNoq8tYSc2pMkV/3briZovffpe5SzB+m2MnXbtOBstIEXkrPZQ78vaZ/nLh7+eWg30lCmMPwjf2wIjlTXkcbxbsi7FbPW7FsolGkU/0mqGhqK1Xft/g7SnCXIoGPSSrHMXEv5dPPofCa1Z0Un+98wQTVfOSKek6TnIsfLbG01UFQVkN7afE4dqSmMiWwEm2PK9l+OiBA2/QzDpbtu9wsfTol4c192vFEWR9crB2YZ1JlMbjVWHjYmB7NFsS0A6lUOikss0Y+LUWS2/QuM/kqybSo4rasZMAIazM6D clerie"
|
|
|
|
];
|
2020-12-06 16:40:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2022-05-26 01:05:17 +02:00
|
|
|
gptfdisk
|
2020-12-06 16:40:47 +01:00
|
|
|
htop
|
2022-05-26 01:05:17 +02:00
|
|
|
parted
|
2020-12-06 16:40:47 +01:00
|
|
|
tmux
|
|
|
|
];
|
|
|
|
|
2020-12-08 19:26:02 +01:00
|
|
|
programs.mtr.enable = true;
|
|
|
|
|
2020-12-06 16:40:47 +01:00
|
|
|
services.openssh.enable = true;
|
|
|
|
services.openssh.passwordAuthentication = false;
|
2022-02-25 10:58:42 +01:00
|
|
|
services.openssh.kbdInteractiveAuthentication = false;
|
2020-12-06 16:40:47 +01:00
|
|
|
services.openssh.permitRootLogin = lib.mkDefault "no";
|
2020-12-09 22:42:39 +01:00
|
|
|
|
2022-09-29 17:44:05 +02:00
|
|
|
nix.gc = lib.mkDefault {
|
2021-06-18 12:45:26 +02:00
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
|
2021-02-21 21:40:05 +01:00
|
|
|
services.nginx = {
|
|
|
|
enableReload = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
2022-09-28 21:09:32 +02:00
|
|
|
|
2022-09-28 22:09:16 +02:00
|
|
|
appendHttpConfig = ''
|
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
'';
|
|
|
|
|
2022-09-28 21:09:32 +02:00
|
|
|
virtualHosts = {
|
|
|
|
"default" = {
|
|
|
|
default = true;
|
2022-09-28 22:09:16 +02:00
|
|
|
rejectSSL = true;
|
2022-09-28 21:09:32 +02:00
|
|
|
locations."/" = {
|
|
|
|
return = ''200 "Some piece of infrastructure\n"'';
|
|
|
|
extraConfig = ''
|
|
|
|
types { } default_type "text/plain; charset=utf-8";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-02-21 21:40:05 +01:00
|
|
|
};
|
|
|
|
|
2021-01-02 18:19:11 +01:00
|
|
|
security.acme = {
|
2022-02-25 10:58:42 +01:00
|
|
|
defaults.email = "letsencrypt@clerie.de";
|
2021-01-02 18:19:11 +01:00
|
|
|
acceptTerms = true;
|
|
|
|
};
|
|
|
|
|
2022-09-29 17:49:25 +02:00
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
2020-12-09 22:42:39 +01:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
(import ../../pkgs/overlay.nix)
|
|
|
|
];
|
2020-12-06 16:40:47 +01:00
|
|
|
}
|