feat: nextcloud up and running
This commit is contained in:
parent
93268f03e0
commit
d26489f3d6
|
@ -1,4 +1,8 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.common-pc
|
inputs.nixos-hardware.nixosModules.common-pc
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
@ -20,4 +24,5 @@
|
||||||
layout = "de";
|
layout = "de";
|
||||||
xkbVariant = "bone";
|
xkbVariant = "bone";
|
||||||
};
|
};
|
||||||
|
services.thermald.enable = lib.mkForce false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
inherit (config.secrets.secrets.local.networking) hostId;
|
inherit (config.secrets.secrets.local.networking) hostId;
|
||||||
};
|
};
|
||||||
systemd.network.networks = {
|
systemd.network.networks = {
|
||||||
"01-lan1" = {
|
"lan01" = {
|
||||||
address = ["192.168.178.32/24"];
|
address = ["192.168.178.32/24"];
|
||||||
gateway = ["192.168.178.1"];
|
gateway = ["192.168.178.1"];
|
||||||
matchConfig.MACAddress = config.secrets.secrets.local.networking.interfaces.lan01.mac;
|
#matchConfig.MACAddress = config.secrets.secrets.local.networking.interfaces.lan01.mac;
|
||||||
|
matchConfig.Name = "mv-lan01";
|
||||||
dns = ["192.168.178.2"];
|
dns = ["192.168.178.2"];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
IPv6PrivacyExtensions = "yes";
|
IPv6PrivacyExtensions = "yes";
|
||||||
|
@ -14,9 +15,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# To be able to ping containers from the host, it is necessary
|
||||||
|
# to create a macvlan on the host on the VLAN 1 network.
|
||||||
|
networking.macvlans.mv-lan01 = {
|
||||||
|
interface = "lan01";
|
||||||
|
mode = "bridge";
|
||||||
|
};
|
||||||
|
|
||||||
boot.initrd.systemd.network = {
|
boot.initrd.systemd.network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
networks = {inherit (config.systemd.network.networks) "01-lan1";};
|
networks = {inherit (config.systemd.network.networks) "lan01";};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ inputs: _self: super: {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ephemeral = true;
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
"state" = {
|
"state" = {
|
||||||
mountPoint = "/state";
|
mountPoint = "/state";
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
networking = {
|
networking = {
|
||||||
useNetworkd = true;
|
useNetworkd = true;
|
||||||
dhcpcd.enable = false;
|
dhcpcd.enable = false;
|
||||||
|
useDHCP = false;
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
# allow mdns port
|
# allow mdns port
|
||||||
firewall.allowedUDPPorts = [5353];
|
firewall.allowedUDPPorts = [5353];
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
zone = config.secrets.secrets.global.domains.mail;
|
zone = config.secrets.secrets.global.domains.mail;
|
||||||
protocol = "Cloudflare";
|
protocol = "Cloudflare";
|
||||||
username = "token";
|
username = "token";
|
||||||
|
use = "web, web='https://cloudflare.com/cdn-cgi/trace', web-skip='ip='";
|
||||||
passwordFile = config.age.secrets.cloudflare_token_dns.path;
|
passwordFile = config.age.secrets.cloudflare_token_dns.path;
|
||||||
domains = [config.secrets.secrets.global.domains.mail];
|
domains = [config.secrets.secrets.global.domains.mail];
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ in {
|
||||||
pool = "panzer";
|
pool = "panzer";
|
||||||
};
|
};
|
||||||
macvlans = [
|
macvlans = [
|
||||||
"lan01"
|
"lan01:lan01-nextcloud"
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
config,
|
config,
|
||||||
|
@ -40,7 +40,7 @@ in {
|
||||||
"lan01" = {
|
"lan01" = {
|
||||||
address = ["192.168.178.33/24"];
|
address = ["192.168.178.33/24"];
|
||||||
gateway = ["192.168.178.1"];
|
gateway = ["192.168.178.1"];
|
||||||
matchConfig.Name = "mv-lan01*";
|
matchConfig.Name = "lan01*";
|
||||||
dns = ["192.168.178.2"];
|
dns = ["192.168.178.2"];
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
IPv6PrivacyExtensions = "yes";
|
IPv6PrivacyExtensions = "yes";
|
||||||
|
@ -55,8 +55,9 @@ in {
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
config.adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; # DON'T DO THIS IN PRODUCTION - the password file will be world-readable in the Nix Store!
|
config.adminpassFile = "${pkgs.writeText "adminpass" "test123"}"; # DON'T DO THIS IN PRODUCTION - the password file will be world-readable in the Nix Store!
|
||||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||||
inherit contacts calendar tasks;
|
inherit contacts calendar tasks notes unsplash maps;
|
||||||
};
|
};
|
||||||
|
maxUploadSize = "2G";
|
||||||
extraAppsEnable = true;
|
extraAppsEnable = true;
|
||||||
extraOptions.enabledPreviewProviders = [
|
extraOptions.enabledPreviewProviders = [
|
||||||
"OC\\Preview\\BMP"
|
"OC\\Preview\\BMP"
|
||||||
|
@ -71,6 +72,9 @@ in {
|
||||||
"OC\\Preview\\XBitmap"
|
"OC\\Preview\\XBitmap"
|
||||||
"OC\\Preview\\HEIC"
|
"OC\\Preview\\HEIC"
|
||||||
];
|
];
|
||||||
|
config = {
|
||||||
|
defaultPhoneRegion = "DE";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = stateVersion;
|
system.stateVersion = stateVersion;
|
||||||
|
|
Loading…
Reference in a new issue