From 0598236822c8ac36f8028c89d4b79f4f6b251a72 Mon Sep 17 00:00:00 2001 From: tzlil Date: Fri, 21 Apr 2023 15:22:47 +0300 Subject: dont rememeber --- hosts/laptop/cfg.nix | 16 ++++++++++++++++ hosts/vps/cfg.nix | 1 + hosts/vps/git.nix | 7 ++++--- hosts/vps/website.nix | 12 ++++++++++-- 4 files changed, 31 insertions(+), 5 deletions(-) (limited to 'hosts') diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix index 3fb53d0..e7042df 100644 --- a/hosts/laptop/cfg.nix +++ b/hosts/laptop/cfg.nix @@ -102,5 +102,21 @@ driSupport = true; driSupport32Bit = true; }; + + networking.firewall.allowedTCPPorts = [25565]; + + services = { + power-profiles-daemon.enable = true; + thermald.enable = true; + }; + + services.tlp = { + settings = { + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + }; + }; }; } diff --git a/hosts/vps/cfg.nix b/hosts/vps/cfg.nix index c902c53..f780229 100644 --- a/hosts/vps/cfg.nix +++ b/hosts/vps/cfg.nix @@ -13,6 +13,7 @@ ./website.nix ./git.nix ./hydrus.nix + ./matrix.nix ]; config = { diff --git a/hosts/vps/git.nix b/hosts/vps/git.nix index 06a8af2..e334aeb 100644 --- a/hosts/vps/git.nix +++ b/hosts/vps/git.nix @@ -33,7 +33,7 @@ group = "fcgiwrap"; }; caddy = { - virtualHosts."http://95.179.168.209".extraConfig = '' + virtualHosts."tzlil.net".extraConfig = '' bind 0.0.0.0 ${config.website.defaultHeaders} handle_path /cgit/* { @@ -59,12 +59,12 @@ favicon = "/favicon.ico"; clone-url = pkgs.lib.concatStringsSep " " [ "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" - "ssh://git@git.example.com:$CGIT_REPO_URL" + "ssh://git@tzlil.net:$CGIT_REPO_URL" ]; enable-log-filecount = 1; enable-log-linecount = 1; enable-git-config = 1; - root-title = "git.example.com"; + root-title = "tzlil.net"; root-desc = "Tzlil's Git Repositories"; scan-path = "/home/git"; about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.py"; @@ -75,6 +75,7 @@ } } } + } ''; }; }; diff --git a/hosts/vps/website.nix b/hosts/vps/website.nix index 86b725a..ef057e0 100644 --- a/hosts/vps/website.nix +++ b/hosts/vps/website.nix @@ -38,7 +38,7 @@ services.caddy = { enable = true; virtualHosts = { - "http://95.179.168.209".extraConfig = '' + "tzlil.net".extraConfig = '' bind 0.0.0.0 handle_path / { try_files ${pkgs.writeText "index.txt" '' @@ -62,7 +62,7 @@ ????++=~:=?IIIII=~:: ~~+II77$$7$ZO8NMMMND.+: .=7+=~ ,,:?...~II??+??I?+??IIII?I ??III7II+~:?II7+II?, ~,:,~7777$$$I$8DNMMNO .~I .Z:.,:~: ,+???+=,IIIIII??IIIII ???I7I:,~=:,+II+=~I??:.,,,.:77777777$ODMM8 .:+ZI. ,~,..~~ :II?==~:?II??IIIIIIIII - No matter where you go, everybody's connected + No matter where you go, everyone's connected /cgit/ for repositories ''} / @@ -72,5 +72,13 @@ }; }; networking.firewall.allowedTCPPorts = [80 443]; + + environment.persistence."/nix/persist".directories = [ + { + directory = "/var/lib/caddy"; + user = "caddy"; + group = "caddy"; + } + ]; }; } -- cgit 1.4.1