aboutsummaryrefslogtreecommitdiff
path: root/hosts/vps/configuration.nix
blob: df44b5a79c80d805c59f693d10e63d1f6a83536d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ ... }:

{
  imports = [
    ./hardware-configuration.nix
  ];

  boot.tmp.cleanOnBoot = true;
  zramSwap.enable = true;
  networking.hostName = "my-vps";
  networking.domain = "";

  users.users.administrator = {
    isNormalUser = true;
    password = "admin";
    extraGroups = [ "wheel" ];
  };

  services.openssh = {
    enable = true;
  };

  services.nginx = {
    enable = true;
    virtualHosts = {
      root = "/var/www/site/";
    };
  };

  services.nextcloud = {
    enable = true;
    https = true;
    hostName = "cloud.schererleander.de";
    database.createLocally = true;
    config = {
      dbtype = "mysql";
      adminuser = "admin";
      adminpassFile = "/etc/admin-pass-file";
    };

    settings = {
      maintenace_window_start = 2;
      default_phone_region = "de";
      filelocking.enabled = true;
    };

    caching = {
      redis = true;
    };
  };

  nix.settings.experimental-features = [ "nix-command" "flakes" ];
  nixpkgs.config.allowUnfree = true;
  system.stateVersion = "25.05";
}