nextcloud for calendars

This commit is contained in:
Henri Dohmen 2026-01-14 23:00:15 +01:00
parent c5c4ff3925
commit 6fe1b261d5
Signed by: hd
GPG key ID: AB79213B044674AE
8 changed files with 102 additions and 82 deletions

View file

@ -12,6 +12,7 @@
./git.nix
./hardware-configuration.nix
./networking.nix
./nextcloud.nix
./services.nix
./syncthing.nix
];

46
host/roam/nextcloud.nix Normal file
View file

@ -0,0 +1,46 @@
{
pkgs,
secrets,
config,
...
}:
let
hostName = "nextcloud.hdohmen.de";
in
{
services.nextcloud = {
enable = true;
inherit hostName;
package = pkgs.nextcloud32;
https = true;
configureRedis = true;
datadir = "/data/nextcloud";
database.createLocally = true;
extraAppsEnable = true;
extraApps = {
inherit (config.services.nextcloud.package.packages.apps)
news
contacts
calendar
tasks
;
};
config = {
adminuser = "admin";
adminpassFile = config.age.secrets.nextcloud-admin-password.path;
dbtype = "pgsql";
};
};
services.nginx.virtualHosts.${hostName} = {
enableACME = true;
forceSSL = true;
};
age.secrets.nextcloud-admin-password = {
file = secrets.roam."nextcloud-admin-password.age";
owner = "nextcloud";
group = "nextcloud";
mode = "440";
};
}

View file

@ -5,11 +5,12 @@
{
services = {
nginx = {
# recommendedTlsSettings = true;
# recommendedProxySettings = true;
# recommendedOptimisation = true;
enable = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
recommendedOptimisation = true;
virtualHosts.default = {
serverName = "_";
default = true;

View file

@ -88,6 +88,17 @@ in
userName = "henridohmen";
};
};
"Nextcloud" = {
thunderbird = {
enable = true;
color = "#FFBE6F";
};
remote = {
type = "caldav";
url = "https://nextcloud.hdohmen.de/remote.php/dav/calendars/henri/default/";
userName = "henri";
};
};
};
accounts.contact.accounts = {
"Kontakte" = {

View file

@ -4,6 +4,16 @@
...
}:
with lib;
let
mkSubOption =
of: name:
mkOption {
type = types.bool;
default = of;
description = "Enables" ++ name;
};
mkDesktopOption = mkSubOption config.hd.desktop.enable;
in
{
options.home = lib.mkOption {
# used by /home/default.nix
@ -19,85 +29,19 @@ with lib;
description = "Common NixOS configuration of all desktops.";
};
audio = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable audio configuration";
};
};
gpg = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable GPG configuration";
};
};
network = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable network configuration";
};
};
security = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable desktop security configuration";
};
};
audio.enable = mkDesktopOption "audio configuration";
gpg.enable = mkDesktopOption "GPG configuration";
network.enable = mkDesktopOption "network configuration";
security.enable = mkDesktopOption "security configuration";
software = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable software installation";
};
development = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.software.enable;
description = "Enable development software";
};
};
};
windowManager = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable window manager configuration";
};
};
accounts = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable desktop user accounts";
};
};
fonts = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable font configuration";
};
};
services = {
enable = mkOption {
type = types.bool;
default = config.hd.desktop.enable;
description = "Enable desktop services";
};
enable = mkDesktopOption "software installation";
development.enable = mkSubOption config.hd.desktop.software.enable "development software";
};
windowManager.enable = mkDesktopOption "window manager configuration";
accounts.enable = mkDesktopOption "desktop user accounts";
fonts.enable = mkDesktopOption "font configuration";
services.enable = mkDesktopOption "desktop services";
syncthing.enable = mkDesktopOption "syncthing settings";
};
imports = [

View file

@ -1,5 +1,10 @@
{ lib, var, ... }:
{
lib,
var,
config,
...
}:
lib.mkIf config.hd.desktop.syncthing.enable {
services.syncthing = {
enable = lib.mkDefault true;
user = "hd";

View file

@ -7,6 +7,7 @@ let
secrets = [
"roam/rclone-conf"
"roam/firefox-sync-secret"
"roam/nextcloud-admin-password"
"hd-password"
"tlskey"
];

View file

@ -0,0 +1,11 @@
age-encryption.org/v1
-> ssh-ed25519 ydxpSQ iWfVti14xdYQoQcONqeWzMxyIEMKwn0d0IVGyMG1knk
4be8tW7qIltggtFOpFFMAqtXzZ0J7nGWX9c5lakobko
-> ssh-ed25519 IbE9zA PdTnWT8kxLGuXOUEsOEjDltqs8nAclso3U1KRvBsOAw
bMivwzoemXiW7uph8LWF5gbnOiulbwMNoJGllZGL5fM
-> ssh-ed25519 gbs8eg c79Pw+20bBwl72bZQUiSTXdjFSUvqZVN8kinu18qqTw
mw/VdLeZIit6QiPV9fpBq8JYgZGRLmkUUo1ulXlHpKw
-> ssh-ed25519 FTMbvw zBCK0W/t/WwOl7XVkor93oRq9ybjoalYoUEVRgLU+n0
yWMzPgXmZ63q0MYvt5v968PEgAEK3nr6GL+WM0aHBqw
--- xCcYFUPNbBgvN/74BxiaxZNwpPOfFUvNNwRLoGZ+3Vk
B<EFBFBD>IiA¿ê%uõÖH€¸¨cÞ1Æß% ¦ z*é”-<2D>0ñ_ø¸SúJ~ýö