2022-03-10 15:19:07 +01:00
|
|
|
# VPS hosted at GleSYS, running my Quassel and some random network
|
|
|
|
# stuff.
|
|
|
|
|
|
|
|
_: # ignore readTree options
|
|
|
|
|
|
|
|
{ config, depot, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
mod = name: depot.path + ("/ops/modules/" + name);
|
2022-04-16 22:21:51 +02:00
|
|
|
usermod = name: depot.path + ("/users/tazjin/nixos/modules/" + name);
|
2022-03-10 15:19:07 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(mod "quassel.nix")
|
2022-04-16 22:21:51 +02:00
|
|
|
(mod "www/base.nix")
|
|
|
|
(usermod "tgsa.nix")
|
2022-03-10 15:19:07 +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
|
|
|
|
boot.initrd.availableKernelModules = [ "ata_piix" "vmw_pvscsi" "sd_mod" "sr_mod" ];
|
|
|
|
|
2022-04-15 14:21:10 +02:00
|
|
|
# Adjust to disk size increases
|
|
|
|
boot.growPartition = true;
|
|
|
|
|
2022-03-10 19:57:15 +01:00
|
|
|
virtualisation.vmware.guest.enable = true;
|
|
|
|
virtualisation.vmware.guest.headless = true;
|
|
|
|
|
2022-03-10 15:43:33 +01:00
|
|
|
nix.settings.trusted-users = [ "tazjin" ];
|
|
|
|
|
2022-03-10 15:19:07 +01:00
|
|
|
fileSystems."/" =
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-uuid/4c51357a-1e34-4b59-b169-63af1fcdce71";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "polyanka";
|
|
|
|
domain = "tazj.in";
|
|
|
|
useDHCP = false;
|
|
|
|
|
|
|
|
# Required for VPN usage
|
|
|
|
networkmanager.enable = true;
|
|
|
|
|
|
|
|
interfaces.ens192 = {
|
|
|
|
ipv4.addresses = lib.singleton {
|
|
|
|
address = "159.253.30.129";
|
|
|
|
prefixLength = 24;
|
|
|
|
};
|
|
|
|
|
|
|
|
ipv6.addresses = lib.singleton {
|
|
|
|
address = "2a02:750:7:3305::308";
|
|
|
|
prefixLength = 64;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultGateway = "159.253.30.1";
|
|
|
|
defaultGateway6.address = "2a02:750:7:3305::1";
|
|
|
|
|
2022-03-10 16:58:18 +01:00
|
|
|
firewall.enable = true;
|
2022-04-16 22:21:51 +02:00
|
|
|
firewall.allowedTCPPorts = [ 22 80 443 ];
|
2022-03-10 15:19:07 +01:00
|
|
|
|
|
|
|
nameservers = [
|
|
|
|
"79.99.4.100"
|
|
|
|
"79.99.4.101"
|
|
|
|
"2a02:751:aaaa::1"
|
|
|
|
"2a02:751:aaaa::2"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "UTC";
|
|
|
|
|
|
|
|
security.acme.acceptTerms = true;
|
|
|
|
security.acme.certs."polyanka.tazj.in" = {
|
|
|
|
listenHTTP = ":80";
|
|
|
|
email = "mail@tazj.in";
|
|
|
|
group = "quassel";
|
|
|
|
};
|
|
|
|
|
|
|
|
users.users.tazjin = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
shell = pkgs.fish;
|
2022-04-21 14:36:14 +02:00
|
|
|
openssh.authorizedKeys.keys = depot.users.tazjin.keys.all;
|
2022-03-10 15:19:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
|
|
|
|
services.depot.quassel = {
|
|
|
|
enable = true;
|
|
|
|
acmeHost = "polyanka.tazj.in";
|
|
|
|
bindAddresses = [
|
|
|
|
"0.0.0.0"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
# $ nix search wget
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
curl
|
|
|
|
htop
|
|
|
|
jq
|
|
|
|
nmap
|
|
|
|
bat
|
|
|
|
emacs-nox
|
|
|
|
nano
|
|
|
|
wget
|
|
|
|
];
|
|
|
|
|
|
|
|
programs.mtr.enable = true;
|
2022-03-10 15:40:41 +01:00
|
|
|
programs.mosh.enable = true;
|
2022-03-10 15:19:07 +01:00
|
|
|
services.openssh.enable = true;
|
|
|
|
|
2022-03-10 15:23:24 +01:00
|
|
|
services.zerotierone.enable = true;
|
|
|
|
services.zerotierone.joinNetworks = [
|
|
|
|
"35c192ce9bd4c8c7"
|
|
|
|
];
|
|
|
|
|
2022-03-10 15:19:07 +01:00
|
|
|
system.stateVersion = "20.09";
|
|
|
|
}
|