h
This commit is contained in:
parent
540ac42eac
commit
98f576b2c3
5 changed files with 111 additions and 75 deletions
|
|
@ -16,5 +16,28 @@
|
||||||
imports = [
|
imports = [
|
||||||
./../../home
|
./../../home
|
||||||
];
|
];
|
||||||
|
|
||||||
|
desktop.hyprland = {
|
||||||
|
numlock = true;
|
||||||
|
monitors = [
|
||||||
|
"desc:AOC Q27G2WG4 0x00005F45, 2560x1440@144, 3840x0, 1 # main monitor"
|
||||||
|
"desc:Samsung Electric Company S24D330 0x5A5A5131, 1920x1080@60, 3840x1440, 1 # side monitor"
|
||||||
|
"desc:Panasonic Industry Company Panasonic-TV, 3840x2160@30, 0x0, 1 # tv"
|
||||||
|
"desc:Valve Corporation Index HMD 0x3DEBE38D, preffered, auto, 1"
|
||||||
|
];
|
||||||
|
workspaces.workspaces = [
|
||||||
|
|
||||||
|
"1, monitor:DP-1, persistent:true"
|
||||||
|
"2, monitor:DP-1, persistent:true"
|
||||||
|
"3, monitor:DP-1, persistent:true"
|
||||||
|
"4, monitor:DP-1, persistent:true"
|
||||||
|
"5, monitor:HDMI-A-1, persistent:true"
|
||||||
|
"6, monitor:HDMI-A-1, persistent:true"
|
||||||
|
"7, monitor:HDMI-A-1, persistent:true"
|
||||||
|
"8, monitor:HDMI-A-1, persistent:true"
|
||||||
|
"9, monitor:DP-3, persistent:true"
|
||||||
|
"special:magic"
|
||||||
|
];
|
||||||
|
};
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
timezone = "Europe/Berlin";
|
timezone = "Europe/Berlin";
|
||||||
language = "en_GB.UTF-8";
|
language = "en_GB.UTF-8";
|
||||||
locale = "de_DE.UTF-8";
|
locale = "de_DE.UTF-8";
|
||||||
hostname = "marty-thinkpad";
|
hostname = "marty-pc";
|
||||||
};
|
};
|
||||||
apps = {
|
apps = {
|
||||||
audio = {
|
audio = {
|
||||||
|
|
@ -119,13 +119,13 @@
|
||||||
desktop = {
|
desktop = {
|
||||||
window-managers = {
|
window-managers = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = false;
|
enable = true;
|
||||||
};
|
};
|
||||||
niri = {
|
niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
sway = {
|
sway = {
|
||||||
enable = true;
|
enable = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
shell = {
|
shell = {
|
||||||
|
|
|
||||||
|
|
@ -21,73 +21,83 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
services = {
|
services =
|
||||||
nextcloud = {
|
if config.server.cloud.nextcloud.enable then
|
||||||
enable = config.server.cloud.nextcloud.enable;
|
{
|
||||||
configureRedis = true;
|
nextcloud = {
|
||||||
package = pkgs.nextcloud33;
|
enable = true;
|
||||||
hostName = "nextcloud-net";
|
configureRedis = true;
|
||||||
config = {
|
package = pkgs.nextcloud33;
|
||||||
dbtype = "pgsql";
|
hostName = "nextcloud-net";
|
||||||
dbuser = "nextcloud";
|
config = {
|
||||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
dbtype = "pgsql";
|
||||||
dbname = "nextcloud";
|
dbuser = "nextcloud";
|
||||||
adminpassFile = "/home/marty/secrets/nextcloud";
|
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||||
adminuser = "admin";
|
dbname = "nextcloud";
|
||||||
};
|
adminpassFile = "/home/marty/secrets/nextcloud";
|
||||||
settings = {
|
adminuser = "admin";
|
||||||
trusted_proxies = [
|
};
|
||||||
"localhost"
|
settings = {
|
||||||
"127.0.0.1"
|
trusted_proxies = [
|
||||||
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}"
|
"localhost"
|
||||||
config.networking.hostName
|
"127.0.0.1"
|
||||||
];
|
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}"
|
||||||
trusted_domains = [
|
config.networking.hostName
|
||||||
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}"
|
];
|
||||||
config.networking.hostName
|
trusted_domains = [
|
||||||
];
|
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}"
|
||||||
skeletondirectory = "";
|
config.networking.hostName
|
||||||
preview_ffmpeg_path = "${pkgs.ffmpeg}/bin/ffmpeg";
|
];
|
||||||
log_type = "file";
|
skeletondirectory = "";
|
||||||
logfile = "nextcloud.log";
|
preview_ffmpeg_path = "${pkgs.ffmpeg}/bin/ffmpeg";
|
||||||
loglevel = 0;
|
log_type = "file";
|
||||||
};
|
logfile = "nextcloud.log";
|
||||||
};
|
loglevel = 0;
|
||||||
postgresql = {
|
};
|
||||||
enable = true;
|
};
|
||||||
ensureDatabases = [ "nextcloud" ];
|
postgresql = {
|
||||||
ensureUsers = [
|
enable = true;
|
||||||
{
|
ensureDatabases = [ "nextcloud" ];
|
||||||
name = "nextcloud";
|
ensureUsers = [
|
||||||
ensureDBOwnership = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
nginx = {
|
|
||||||
virtualHosts = {
|
|
||||||
"nextcloud-net".listen = [
|
|
||||||
{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = config.server.cloud.nextcloud.port;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" =
|
|
||||||
if config.server.cloud.nextcloud.public then
|
|
||||||
{
|
{
|
||||||
enableACME = true;
|
name = "nextcloud";
|
||||||
forceSSL = true;
|
ensureDBOwnership = true;
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:${toString config.server.cloud.nextcloud.port}";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
else
|
];
|
||||||
{ };
|
};
|
||||||
};
|
nginx = {
|
||||||
};
|
virtualHosts = {
|
||||||
};
|
"nextcloud-net".listen = [
|
||||||
systemd.services."nextcloud-setup" = {
|
{
|
||||||
requires = [ "postgresql.service" ];
|
addr = "0.0.0.0";
|
||||||
after = [ "postgresql.service" ];
|
port = config.server.cloud.nextcloud.port;
|
||||||
};
|
}
|
||||||
|
];
|
||||||
|
"${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" =
|
||||||
|
if config.server.cloud.nextcloud.public then
|
||||||
|
{
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.server.cloud.nextcloud.port}";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
|
systemd =
|
||||||
|
if config.server.cloud.nextcloud.enable then
|
||||||
|
{
|
||||||
|
services."nextcloud-setup" = {
|
||||||
|
requires = [ "postgresql.service" ];
|
||||||
|
after = [ "postgresql.service" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
domain = ${config.server.misc.lauti.subdomain}.${config.networking.domain};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
server.misc.lauti = {
|
server.misc.lauti = {
|
||||||
|
|
@ -14,6 +16,10 @@
|
||||||
description = "lauti port";
|
description = "lauti port";
|
||||||
};
|
};
|
||||||
public = lib.mkEnableOption "make lauti public";
|
public = lib.mkEnableOption "make lauti public";
|
||||||
|
domain = lib.mkOption {
|
||||||
|
default = "";
|
||||||
|
description = "lauti domain";
|
||||||
|
};
|
||||||
subdomain = lib.mkOption {
|
subdomain = lib.mkOption {
|
||||||
default = "lauti";
|
default = "lauti";
|
||||||
description = "lauti subdomain";
|
description = "lauti subdomain";
|
||||||
|
|
@ -26,7 +32,7 @@
|
||||||
enable = config.server.misc.lauti.enable;
|
enable = config.server.misc.lauti.enable;
|
||||||
settings = {
|
settings = {
|
||||||
LAUTI_ADMIN_EMAIL = "lauti@${config.networking.domain}";
|
LAUTI_ADMIN_EMAIL = "lauti@${config.networking.domain}";
|
||||||
LAUTI_BASE_URL = "https://${config.server.misc.lauti.subdomain}.${config.networking.domain}";
|
LAUTI_BASE_URL = "https://${domain}";
|
||||||
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/lauti/osm";
|
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/lauti/osm";
|
||||||
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||||
LAUTI_TIMEZONE = "Europe/Berlin";
|
LAUTI_TIMEZONE = "Europe/Berlin";
|
||||||
|
|
@ -36,7 +42,7 @@
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${config.server.misc.lauti.subdomain}.${config.networking.domain}" =
|
"${domain}" =
|
||||||
if config.server.misc.lauti.public then
|
if config.server.misc.lauti.public then
|
||||||
{
|
{
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,4 @@
|
||||||
oniux
|
oniux
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
oniux
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue