nixos-config/hosts/poseidon/default.nix

191 lines
4.1 KiB
Nix
Raw Normal View History

2021-01-27 18:22:02 +01:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
2021-01-30 18:11:02 +01:00
{ config, lib, pkgs, ... }:
2021-02-14 13:42:43 +01:00
let
secrets = config.my.secrets;
in
2021-01-27 18:22:02 +01:00
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
2021-04-22 20:59:54 +02:00
./home.nix
2021-01-27 18:22:02 +01:00
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
2021-03-24 22:04:33 +01:00
boot.supportedFilesystems = [ "btrfs" ];
2021-03-25 00:40:22 +01:00
services.btrfs = {
autoScrub = {
enable = true;
fileSystems = [ "/" ];
};
};
virtualisation.docker = {
enable = true;
};
2021-01-27 18:22:02 +01:00
networking.hostName = "poseidon"; # Define your hostname.
networking.domain = "alarsyo.net";
2021-01-27 18:22:02 +01:00
# Set your time zone.
time.timeZone = "Europe/Paris";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eno1.ipv4.addresses = [
{
address = "163.172.11.110";
prefixLength = 24;
}
];
networking.defaultGateway = {
address = "163.172.11.1";
interface = "eno1";
};
networking.nameservers = [
"62.210.16.6"
"62.210.16.7"
];
2021-02-22 18:59:37 +01:00
my.networking.externalInterface = "eno1";
2021-01-27 18:22:02 +01:00
# List services that you want to enable:
my.services = {
vaultwarden = {
2021-01-31 00:31:43 +01:00
enable = true;
privatePort = 8081;
websocketPort = 3012;
};
2021-08-09 19:34:23 +02:00
restic-backup = {
2021-01-30 18:11:02 +01:00
enable = true;
2021-08-09 19:34:23 +02:00
repo = secrets.restic-backup.poseidon-repo;
2021-01-30 18:11:02 +01:00
};
2021-01-30 21:14:27 +01:00
2021-02-22 15:07:29 +01:00
fail2ban = {
enable = true;
};
2021-08-07 15:19:45 +02:00
fava = {
enable = true;
port = 8084;
filePath = "accounts/current.beancount";
};
2021-02-02 16:55:19 +01:00
gitea = {
enable = true;
privatePort = 8082;
};
2021-02-19 21:21:35 +01:00
jellyfin = {
enable = true;
};
2021-03-28 22:08:19 +02:00
lohr = {
enable = true;
2021-04-08 02:19:54 +02:00
port = 8083;
2021-03-28 22:08:19 +02:00
};
2021-01-30 21:14:27 +01:00
miniflux = {
enable = true;
2021-02-14 13:42:43 +01:00
adminCredentialsFile = "${../../secrets/miniflux-admin-credentials.secret}";
2021-01-30 21:14:27 +01:00
privatePort = 8080;
};
2021-02-02 01:20:31 +01:00
matrix = {
enable = true;
2021-02-14 13:42:43 +01:00
registration_shared_secret = secrets.matrix-registration-shared-secret;
2021-06-09 14:53:11 +02:00
emailConfig = secrets.matrixEmailConfig;
2021-02-02 01:20:31 +01:00
};
2021-01-30 21:14:27 +01:00
monitoring = {
2021-01-27 20:55:16 +01:00
enable = true;
domain = "monitoring.${config.networking.domain}";
2021-01-27 20:55:16 +01:00
};
2021-08-22 16:41:25 +02:00
navidrome = {
enable = true;
musicFolder.path = "${config.services.nextcloud.home}/data/alarsyo/files/Musique/Songs";
2021-08-22 16:41:25 +02:00
};
2021-03-23 19:31:59 +01:00
nextcloud = {
enable = true;
};
2021-07-06 18:21:47 +02:00
nuage = {
enable = true;
};
paperless = {
enable = true;
port = 8085;
};
postgresql-backup = {
enable = true;
};
2021-02-19 22:29:04 +01:00
2021-09-12 20:43:54 +02:00
prololo = {
enable = true;
port = 8089;
settings = {
matrix_username = "prololo";
matrix_password = config.my.secrets.prololo_password;
matrix_homeserver = "https://matrix.alarsyo.net";
matrix_state_dir = "./prololo_state_dir";
github_secret = config.my.secrets.prololo_github_secret;
2021-09-16 16:23:52 +02:00
matrix_rooms = {
test-room = { id = config.my.secrets.prololo_room; default = true; };
test-room2 = { id = config.my.secrets.prololo_room2; };
};
destinations = [
{
regex = "^prologin/.*-playground$";
room = "test-room2";
}
{
regex = "^prologin/.*-\\dplayground$";
room = "test-room2";
}
];
2021-09-12 20:43:54 +02:00
};
};
tailscale = {
enable = true;
exitNode = true;
};
2021-07-13 23:48:41 +02:00
2021-03-16 17:46:25 +01:00
tgv = {
enable = true;
};
2021-02-19 22:29:04 +01:00
transmission = {
enable = true;
username = "alarsyo";
password = secrets.transmission-password;
};
2021-01-27 20:55:16 +01:00
};
2021-01-27 18:22:02 +01:00
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = "no";
services.openssh.passwordAuthentication = false;
# Takes a long while to build
documentation.nixos.enable = false;
environment.systemPackages = with pkgs; [
docker-compose
];
2021-01-27 18:22:02 +01:00
}