2023-11-19 23:12:21 +01:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-01-19 01:53:05 +01:00
|
|
|
nixpkgs-stable,
|
2023-11-19 23:12:21 +01:00
|
|
|
...
|
|
|
|
}: {
|
2023-11-20 11:51:01 +01:00
|
|
|
imports = [
|
|
|
|
# If you want to use modules your own flake exports (from modules/home-manager):
|
|
|
|
# outputs.homeManagerModules.example
|
2024-03-04 18:20:58 +01:00
|
|
|
# outputs.nixosModules.contabo.wan
|
2023-11-20 11:53:42 +01:00
|
|
|
inputs.home-manager.nixosModules.home-manager
|
2023-11-20 11:51:01 +01:00
|
|
|
# Or modules exported from other flakes (such as nix-colors):
|
|
|
|
# inputs.nix-colors.homeManagerModules.default
|
|
|
|
|
|
|
|
# You can also split up your configuration and import pieces of it here:
|
|
|
|
# ./nvim.nix
|
2023-11-20 11:52:32 +01:00
|
|
|
./hardware-configuration.nix
|
2024-01-09 13:19:42 +01:00
|
|
|
|
2024-02-07 13:50:03 +01:00
|
|
|
# Import shared settings
|
|
|
|
../../shared
|
2024-01-30 12:03:29 +01:00
|
|
|
|
2024-02-22 14:35:08 +01:00
|
|
|
# Import server settings
|
2024-02-07 13:50:03 +01:00
|
|
|
../../server
|
2024-05-06 15:55:51 +02:00
|
|
|
|
|
|
|
# Import disko
|
|
|
|
# ../../../disko/queen
|
2023-11-20 11:51:01 +01:00
|
|
|
];
|
2023-11-20 12:01:14 +01:00
|
|
|
|
2023-11-21 18:35:54 +01:00
|
|
|
boot.tmp.cleanOnBoot = true;
|
2023-11-21 14:55:19 +01:00
|
|
|
zramSwap.enable = false;
|
|
|
|
networking.domain = "";
|
2024-03-02 22:01:05 +01:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
# require public key authentication for better security
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
settings.KbdInteractiveAuthentication = false;
|
|
|
|
settings.PermitRootLogin = "no";
|
|
|
|
};
|
2023-11-21 14:55:19 +01:00
|
|
|
|
2023-11-20 12:01:14 +01:00
|
|
|
nixpkgs = {
|
|
|
|
# You can add overlays here
|
|
|
|
overlays = [
|
|
|
|
];
|
|
|
|
# Configure your nixpkgs instance
|
|
|
|
config = {
|
2024-05-25 16:30:53 +02:00
|
|
|
allowBroken = true;
|
2023-11-20 12:01:14 +01:00
|
|
|
# Disable if you don't want unfree packages
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-20 16:44:23 +01:00
|
|
|
#Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys
|
2023-12-28 12:47:58 +01:00
|
|
|
sops.defaultSopsFile = ./secrets/sops.yaml;
|
2023-11-20 16:17:34 +01:00
|
|
|
|
2024-01-19 15:25:52 +01:00
|
|
|
environment.systemPackages = with pkgs; [
|
2023-11-23 14:24:44 +01:00
|
|
|
fzf
|
2024-01-21 22:58:18 +01:00
|
|
|
matrix-conduit
|
2023-11-24 13:07:39 +01:00
|
|
|
docker
|
|
|
|
docker-compose
|
2023-12-26 16:35:33 +01:00
|
|
|
gitea
|
2023-11-27 14:42:44 +01:00
|
|
|
gotosocial
|
2023-11-19 23:12:21 +01:00
|
|
|
alejandra
|
2023-11-24 21:44:59 +01:00
|
|
|
exiftool
|
|
|
|
imagemagick
|
2023-11-23 17:00:05 +01:00
|
|
|
ffmpeg
|
2024-02-09 22:00:23 +01:00
|
|
|
#aria2
|
|
|
|
#jellyfin
|
|
|
|
#jellyfin-web
|
|
|
|
#jellyfin-ffmpeg
|
2023-12-20 10:04:24 +01:00
|
|
|
nextcloud28
|
2023-11-20 11:51:01 +01:00
|
|
|
nginx
|
2023-11-23 19:26:52 +01:00
|
|
|
onlyoffice-documentserver
|
2024-04-05 23:22:03 +02:00
|
|
|
phanpy
|
2023-12-21 20:57:21 +01:00
|
|
|
postgresql_16
|
2024-06-21 23:59:28 +02:00
|
|
|
python310
|
|
|
|
python310Packages.nbconvert
|
2024-03-07 13:23:47 +01:00
|
|
|
jupyter
|
2023-11-24 21:44:59 +01:00
|
|
|
rabbitmq-server
|
2023-12-17 22:27:04 +01:00
|
|
|
roundcube
|
2023-12-21 23:38:01 +01:00
|
|
|
roundcubePlugins.contextmenu
|
|
|
|
roundcubePlugins.carddav
|
|
|
|
roundcubePlugins.custom_from
|
|
|
|
roundcubePlugins.persistent_login
|
|
|
|
roundcubePlugins.thunderbird_labels
|
2023-11-23 17:06:20 +01:00
|
|
|
youtube-dl
|
2024-03-14 15:48:41 +01:00
|
|
|
sqlite
|
|
|
|
rocksdb
|
2023-11-19 23:12:21 +01:00
|
|
|
];
|
|
|
|
|
2024-03-01 15:04:14 +01:00
|
|
|
# Create an auto-update systemd service that runs every day
|
2024-05-06 15:55:51 +02:00
|
|
|
# system.autoUpgrade = {
|
|
|
|
# flake = "git+https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git";
|
|
|
|
# dates = "daily";
|
|
|
|
# enable = true;
|
|
|
|
# };
|
2024-03-01 14:53:40 +01:00
|
|
|
|
2024-05-06 15:55:51 +02:00
|
|
|
# systemd.services.systemd-networkd.serviceConfig.Environment = "SYSTEMD_LOG_LEVEL=debug";
|
2023-11-19 23:12:21 +01:00
|
|
|
# Enable networking
|
2024-05-07 10:26:15 +02:00
|
|
|
# networking.networkmanager.enable = true;
|
|
|
|
# networking.nat.enable = true;
|
|
|
|
# networking.nat.internalInterfaces = ["ve-+"];
|
|
|
|
# networking.nat.externalInterface = "ens18";
|
2024-05-07 10:33:28 +02:00
|
|
|
networking.enableIPv6 = lib.mkForce true;
|
2024-05-07 10:36:30 +02:00
|
|
|
networking.nameservers = ["2a02:c207::1:53" "2a02:c207::2:53"];
|
2024-03-28 13:47:41 +01:00
|
|
|
|
2024-05-07 10:36:30 +02:00
|
|
|
# networking.interfaces.ens18.ipv4.addresses = [
|
|
|
|
# {
|
|
|
|
# address = "62.171.160.195";
|
|
|
|
# prefixLength = 32;
|
|
|
|
# }
|
|
|
|
# ];
|
2024-03-28 13:54:25 +01:00
|
|
|
|
2024-05-07 10:33:28 +02:00
|
|
|
networking.interfaces.ens18.ipv6.addresses = [
|
|
|
|
{
|
|
|
|
address = "2a02:c207:2063:2448::1";
|
|
|
|
prefixLength = 64;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
networking.defaultGateway6 = {
|
|
|
|
address = "fe80::1";
|
|
|
|
interface = "ens18";
|
|
|
|
};
|
2024-03-04 18:20:58 +01:00
|
|
|
|
2024-03-24 21:03:17 +01:00
|
|
|
# Open ports in the firewall.
|
|
|
|
networking.firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowPing = false;
|
|
|
|
allowedTCPPorts = [
|
|
|
|
22 # SSH
|
|
|
|
5349 # STUN tls
|
|
|
|
5350 # STUN tls alt
|
|
|
|
80 # http
|
|
|
|
443 # https
|
|
|
|
];
|
|
|
|
allowedUDPPortRanges = [
|
|
|
|
{
|
|
|
|
from = 49152;
|
|
|
|
to = 49999;
|
|
|
|
} # TURN relay
|
|
|
|
];
|
|
|
|
};
|
2023-11-19 23:20:16 +01:00
|
|
|
|
2024-03-03 14:25:22 +01:00
|
|
|
# networking.useNetworkd = true;
|
2024-03-02 23:15:23 +01:00
|
|
|
|
2024-03-03 14:21:32 +01:00
|
|
|
# networking.useDHCP = false;
|
2024-03-02 23:21:19 +01:00
|
|
|
|
2024-03-03 14:21:32 +01:00
|
|
|
# modules.contabo.wan = {
|
|
|
|
# enable = true;
|
|
|
|
# macAddress = "00:50:56:43:01:e2"; # changeme
|
|
|
|
# ipAddresses = [
|
|
|
|
# "192.0.2.0/32"
|
|
|
|
# "2001:db8::1/64"
|
|
|
|
# ];
|
|
|
|
# };
|
2024-03-02 23:15:23 +01:00
|
|
|
|
2023-11-19 23:12:21 +01:00
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
2023-11-22 17:46:20 +01:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2023-11-19 23:20:16 +01:00
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
2023-11-21 18:40:55 +01:00
|
|
|
defaults.email = "letsencrypt@gladtherescake.eu";
|
2023-11-19 23:20:16 +01:00
|
|
|
};
|
|
|
|
|
2023-12-19 11:19:29 +01:00
|
|
|
# users.groups.virtualMail = {};
|
2023-11-25 00:48:47 +01:00
|
|
|
|
2023-11-19 23:12:21 +01:00
|
|
|
# Enable completion of system packages by zsh
|
|
|
|
environment.pathsToLink = ["/share/zsh"];
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
extraSpecialArgs = {inherit inputs outputs;};
|
|
|
|
users = {
|
|
|
|
# Import your home-manager configuration
|
2024-02-07 13:52:23 +01:00
|
|
|
lillian = import ../../../home-manager/hosts/queen;
|
2023-11-19 23:12:21 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.hostName = "queen";
|
|
|
|
|
2023-11-21 15:30:15 +01:00
|
|
|
boot.loader.grub.enable = true;
|
2023-12-18 22:17:37 +01:00
|
|
|
boot.loader.grub.configurationLimit = 3;
|
2023-11-20 12:01:14 +01:00
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
2023-11-19 23:12:21 +01:00
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
2024-05-25 16:30:53 +02:00
|
|
|
system.stateVersion = "24.11";
|
2023-11-19 23:12:21 +01:00
|
|
|
}
|