server-config/configuration.nix

68 lines
1.6 KiB
Nix
Raw Normal View History

2021-10-23 01:00:32 -07:00
{ pkgs, system, builders, ... }: {
2021-10-22 23:41:12 -07:00
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
2021-11-23 16:56:07 -08:00
./goaccess.nix
2021-10-22 23:41:12 -07:00
];
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
environment.systemPackages = with pkgs; [
git
];
boot.cleanTmpDir = true;
networking.hostName = "nixos-droplet-v2";
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXYJZfEOgccfCa3uQV9z2rHvGn4AuVnXbIDXv27HgEk vanilla@arch-xps"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOzk0SnRBJhpfNpPBgkReQoDpul2Egl2yJhRw7ldYEzF NixOS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAoyFSuik6XRU2b+O4v9C1bc7rKJyjKgzUeaBaVNQKN6 vanilla-pinebook"
];
2021-11-23 16:56:07 -08:00
users.groups.www = {};
services.nginx.group = "www";
services.goaccess = {
2021-12-03 19:05:19 -08:00
enable = false;
2021-11-23 16:56:07 -08:00
user = "goaccess";
group = "www";
dir = "/var/www/goaccess";
host = "dash.danilafe.com";
};
2021-10-22 23:41:12 -07:00
services.danilafe-blog = {
enable = true;
challengePath = "/var/www/challenges";
2021-10-23 01:00:32 -07:00
sites = [
(builders.english {
ssl = true;
host = "danilafe.com";
})
(builders.english {
drafts = true;
host = "drafts.danilafe.com";
})
(builders.russian {
drafts = true;
host = "drafts.ru.danilafe.com";
})
];
2021-10-22 23:41:12 -07:00
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
}