diff --git a/hosts/marty-pc/home.nix b/hosts/marty-pc/home.nix index 0e45add..a4a37ec 100644 --- a/hosts/marty-pc/home.nix +++ b/hosts/marty-pc/home.nix @@ -16,28 +16,5 @@ imports = [ ./../../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; } diff --git a/hosts/marty-pc/options.nix b/hosts/marty-pc/options.nix index 78b8e05..9f6c7a6 100644 --- a/hosts/marty-pc/options.nix +++ b/hosts/marty-pc/options.nix @@ -125,7 +125,7 @@ enable = true; }; sway = { - enable = false; + enable = true; }; }; shell = { diff --git a/hosts/marty-thinkpad/options.nix b/hosts/marty-thinkpad/options.nix index 7df270b..a8fb007 100644 --- a/hosts/marty-thinkpad/options.nix +++ b/hosts/marty-thinkpad/options.nix @@ -125,7 +125,7 @@ enable = true; }; sway = { - enable = true; + enable = false; }; }; shell = { diff --git a/modules/server/cloud/nextcloud.nix b/modules/server/cloud/nextcloud.nix index 586b49f..138051d 100644 --- a/modules/server/cloud/nextcloud.nix +++ b/modules/server/cloud/nextcloud.nix @@ -21,41 +21,41 @@ }; }; config = { - services = - if config.server.cloud.nextcloud.enable then - { - nextcloud = { - enable = true; - configureRedis = true; - package = pkgs.nextcloud33; - hostName = "nextcloud-net"; - config = { - dbtype = "pgsql"; - dbuser = "nextcloud"; - dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself - dbname = "nextcloud"; - adminpassFile = "/home/marty/secrets/nextcloud"; - adminuser = "admin"; - }; - settings = { - trusted_proxies = [ - "localhost" - "127.0.0.1" - "${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" - config.networking.hostName - ]; - trusted_domains = [ - "${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" - config.networking.hostName - ]; - skeletondirectory = ""; - preview_ffmpeg_path = "${pkgs.ffmpeg}/bin/ffmpeg"; - log_type = "file"; - logfile = "nextcloud.log"; - loglevel = 0; - }; - }; - postgresql = { + services = { + nextcloud = { + enable = config.server.cloud.nextcloud.enable; + configureRedis = true; + package = pkgs.nextcloud33; + hostName = "nextcloud-net"; + config = { + dbtype = "pgsql"; + dbuser = "nextcloud"; + dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself + dbname = "nextcloud"; + adminpassFile = "/home/${config.user.userName}/secrets/nextcloud"; + adminuser = "admin"; + }; + settings = { + trusted_proxies = [ + "localhost" + "127.0.0.1" + "${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" + config.networking.hostName + ]; + trusted_domains = [ + "${config.server.cloud.nextcloud.subdomain}.${config.networking.domain}" + config.networking.hostName + ]; + skeletondirectory = ""; + preview_ffmpeg_path = "${pkgs.ffmpeg}/bin/ffmpeg"; + log_type = "file"; + logfile = "nextcloud.log"; + loglevel = 0; + }; + }; + postgresql = + if config.server.cloud.nextcloud.enable then + { enable = true; ensureDatabases = [ "nextcloud" ]; ensureUsers = [ @@ -64,40 +64,34 @@ 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; - 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 - { }; + } + else + { }; + 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; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.server.cloud.nextcloud.port}"; + }; + } + else + { }; + }; + }; + }; + systemd.services."nextcloud-setup" = { + requires = [ "postgresql.service" ]; + after = [ "postgresql.service" ]; + }; }; } diff --git a/modules/server/misc/lauti.nix b/modules/server/misc/lauti.nix index 2bd6c08..d16f821 100644 --- a/modules/server/misc/lauti.nix +++ b/modules/server/misc/lauti.nix @@ -4,9 +4,7 @@ pkgs, ... }: -let - domain = ${config.server.misc.lauti.subdomain}.${config.networking.domain}; -in + { options = { server.misc.lauti = { @@ -16,10 +14,6 @@ in description = "lauti port"; }; public = lib.mkEnableOption "make lauti public"; - domain = lib.mkOption { - default = ""; - description = "lauti domain"; - }; subdomain = lib.mkOption { default = "lauti"; description = "lauti subdomain"; @@ -32,7 +26,7 @@ in enable = config.server.misc.lauti.enable; settings = { LAUTI_ADMIN_EMAIL = "lauti@${config.networking.domain}"; - LAUTI_BASE_URL = "https://${domain}"; + LAUTI_BASE_URL = "https://${config.server.misc.lauti.subdomain}.${config.networking.domain}"; LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/lauti/osm"; LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png"; LAUTI_TIMEZONE = "Europe/Berlin"; @@ -42,7 +36,7 @@ in }; nginx = { virtualHosts = { - "${domain}" = + "${config.server.misc.lauti.subdomain}.${config.networking.domain}" = if config.server.misc.lauti.public then { enableACME = true; diff --git a/modules/system/networking.nix b/modules/system/networking.nix index f93a3b1..797a867 100644 --- a/modules/system/networking.nix +++ b/modules/system/networking.nix @@ -7,7 +7,7 @@ { options = { - system.hostname = lib.mkOption { + system.hostname = lib.mkOption { default = "${config.user.userName}-device"; description = "hostname"; };