2022-06-10 16:56:15 +02: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’).
|
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
|
|
|
|
secrets = config.my.secrets;
|
|
|
|
|
in {
|
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
|
|
|
|
|
./home.nix
|
|
|
|
|
./secrets.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot.loader.systemd-boot.enable = false;
|
|
|
|
|
boot.loader.grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
efiSupport = false;
|
|
|
|
|
devices = ["/dev/sda" "/dev/sdb"];
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-01 19:24:08 +02:00
|
|
|
|
boot.tmp.useTmpfs = true;
|
2022-06-10 16:56:15 +02:00
|
|
|
|
|
|
|
|
|
networking.hostName = "hades"; # Define your hostname.
|
|
|
|
|
networking.domain = "alarsyo.net";
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
networking.useDHCP = false;
|
|
|
|
|
networking.interfaces.enp35s0.ipv4.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "95.217.121.60";
|
|
|
|
|
prefixLength = 26;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
networking.interfaces.enp35s0.ipv6.addresses = [
|
|
|
|
|
{
|
|
|
|
|
address = "2a01:4f9:4a:3649::2";
|
|
|
|
|
prefixLength = 64;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
networking.defaultGateway = "95.217.121.1";
|
|
|
|
|
networking.defaultGateway6 = {
|
|
|
|
|
address = "fe80::1";
|
|
|
|
|
interface = "enp35s0";
|
|
|
|
|
};
|
|
|
|
|
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
|
|
|
|
|
my.networking.externalInterface = "enp35s0";
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
my.services = {
|
2022-06-12 15:33:59 +02:00
|
|
|
|
fail2ban.enable = true;
|
|
|
|
|
|
2022-06-14 17:51:04 +02:00
|
|
|
|
gitea = {
|
|
|
|
|
enable = true;
|
|
|
|
|
privatePort = 8082;
|
|
|
|
|
};
|
|
|
|
|
|
2023-12-14 22:40:47 +01:00
|
|
|
|
immich = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 8089;
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-27 15:54:27 +02:00
|
|
|
|
jellyfin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2023-11-15 11:23:36 +01:00
|
|
|
|
lohr = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 8083;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-12 20:17:08 +02:00
|
|
|
|
matrix = {
|
|
|
|
|
enable = true;
|
|
|
|
|
secretConfigFile = config.age.secrets."matrix-synapse/secret-config".path;
|
|
|
|
|
};
|
|
|
|
|
|
2023-12-05 13:59:21 +01:00
|
|
|
|
microbin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
privatePort = 8088;
|
|
|
|
|
passwordFile = config.age.secrets."microbin/secret-config".path;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-12 17:59:41 +02:00
|
|
|
|
miniflux = {
|
|
|
|
|
enable = true;
|
|
|
|
|
adminCredentialsFile = config.age.secrets."miniflux/admin-credentials".path;
|
|
|
|
|
privatePort = 8080;
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-27 15:40:12 +02:00
|
|
|
|
navidrome = {
|
|
|
|
|
enable = true;
|
|
|
|
|
musicFolder.path = "${config.services.nextcloud.home}/data/alarsyo/files/Musique/Songs";
|
|
|
|
|
};
|
|
|
|
|
|
2022-10-27 12:25:33 +02:00
|
|
|
|
nextcloud = {
|
|
|
|
|
enable = true;
|
|
|
|
|
adminpassFile = config.age.secrets."nextcloud/admin-pass".path;
|
|
|
|
|
};
|
|
|
|
|
|
2023-12-05 09:20:44 +01:00
|
|
|
|
nginx.enable = true;
|
|
|
|
|
|
2022-11-05 16:15:33 +01:00
|
|
|
|
paperless = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 8085;
|
|
|
|
|
passwordFile = config.age.secrets."paperless/admin-password".path;
|
|
|
|
|
secretKeyFile = config.age.secrets."paperless/secret-key".path;
|
|
|
|
|
};
|
|
|
|
|
|
2022-11-07 22:37:52 +01:00
|
|
|
|
pleroma = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 8086;
|
|
|
|
|
secretConfigFile = config.age.secrets."pleroma/pleroma-config".path;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-12 15:33:59 +02:00
|
|
|
|
restic-backup = {
|
|
|
|
|
enable = true;
|
|
|
|
|
repo = "b2:hades-backup-alarsyo";
|
|
|
|
|
passwordFile = config.age.secrets."restic-backup/hades-password".path;
|
|
|
|
|
environmentFile = config.age.secrets."restic-backup/hades-credentials".path;
|
|
|
|
|
paths = ["/home/alarsyo"];
|
|
|
|
|
};
|
|
|
|
|
|
2023-01-29 01:35:51 +01:00
|
|
|
|
scribe = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 8087;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-10 16:56:15 +02:00
|
|
|
|
tailscale = {
|
|
|
|
|
enable = true;
|
2023-12-13 17:43:53 +01:00
|
|
|
|
useRoutingFeatures = "server";
|
2022-06-10 16:56:15 +02:00
|
|
|
|
};
|
2022-10-27 17:29:13 +02:00
|
|
|
|
|
|
|
|
|
transmission = {
|
|
|
|
|
enable = true;
|
|
|
|
|
username = "alarsyo";
|
|
|
|
|
};
|
2023-11-15 10:39:28 +01:00
|
|
|
|
|
|
|
|
|
vaultwarden = {
|
|
|
|
|
enable = true;
|
|
|
|
|
privatePort = 8081;
|
|
|
|
|
websocketPort = 3012;
|
|
|
|
|
};
|
2022-06-10 16:56:15 +02:00
|
|
|
|
};
|
|
|
|
|
|
2022-11-27 15:42:06 +01:00
|
|
|
|
services = {
|
|
|
|
|
openssh.enable = true;
|
|
|
|
|
vnstat.enable = true;
|
|
|
|
|
};
|
2022-06-10 16:56:15 +02:00
|
|
|
|
|
2022-10-11 21:18:59 +02:00
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
docker-compose
|
|
|
|
|
];
|
|
|
|
|
|
2022-06-10 16:56:15 +02:00
|
|
|
|
# Takes a long while to build
|
|
|
|
|
documentation.nixos.enable = false;
|
|
|
|
|
}
|