From 5a205b1b4d03bde7788f29a13d99c214b73b9f15 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 3 Oct 2024 09:38:43 +0300 Subject: [PATCH] docs: unify comments, remove reduntant --- hosts/cloud/default.nix | 2 +- roles/docker.nix | 2 +- roles/gaming/steam.nix | 4 ++-- roles/shell/direnv.elv | 2 +- roles/tailscale.nix | 3 +-- roles/zellij.nix | 2 +- systems/hosts/auth/authelia-main.nix | 2 +- systems/hosts/cloud/default.nix | 6 +++--- systems/hosts/cloud/miniflux.nix | 4 ++-- systems/hosts/dns/default.nix | 8 ++++---- systems/hosts/proxy/default.nix | 1 - systems/hosts/social/default.nix | 4 ++-- 12 files changed, 19 insertions(+), 21 deletions(-) diff --git a/hosts/cloud/default.nix b/hosts/cloud/default.nix index 49283e8..ea5a202 100644 --- a/hosts/cloud/default.nix +++ b/hosts/cloud/default.nix @@ -2,7 +2,7 @@ sops.secrets.rootPwd.neededForUsers = true; sops.secrets.liljamoPwd.neededForUsers = true; - # Outline is under BSL1.1 + # Outline is under BSL1.1. arta.unfree.allow = ["outline"]; roles.base = { diff --git a/roles/docker.nix b/roles/docker.nix index f05d291..45b05fe 100644 --- a/roles/docker.nix +++ b/roles/docker.nix @@ -16,7 +16,7 @@ in { enableNvidia = cfg.enableNvidia; }; - # FIXME: make configurable + # FIXME: Make configurable. roles.base.primaryUser.extraGroups = ["docker"]; }; } diff --git a/roles/gaming/steam.nix b/roles/gaming/steam.nix index 03f31e5..d7074d1 100644 --- a/roles/gaming/steam.nix +++ b/roles/gaming/steam.nix @@ -16,7 +16,7 @@ in { steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ - # for gamescope + # For gamescope to work properly: # https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1523177264 xorg.libXcursor xorg.libXi @@ -29,7 +29,7 @@ in { libkrb5 keyutils - # fallback fonts (e.g. for Don't Get Lost) + # Fallback fonts (e.g. for Don't Get Lost). liberation_ttf ]; }; diff --git a/roles/shell/direnv.elv b/roles/shell/direnv.elv index 7939f24..7331db5 100644 --- a/roles/shell/direnv.elv +++ b/roles/shell/direnv.elv @@ -1,4 +1,4 @@ -## hook for direnv as of direnv 2.34.0 +## Hook for direnv as of direnv 2.34.0 set @edit:before-readline = $@edit:before-readline { try { var m = [("direnv" export elvish | from-json)] diff --git a/roles/tailscale.nix b/roles/tailscale.nix index 973e03b..2cd9878 100644 --- a/roles/tailscale.nix +++ b/roles/tailscale.nix @@ -25,10 +25,9 @@ in { services.tailscale = { enable = true; authKeyFile = lib.mkIf (cfg.authKeyFile != null) cfg.authKeyFile; - extraUpFlags = lib.mkIf (cfg.enableSSH) ["--ssh"]; # TODO: Make modular for multiple possible flags + extraUpFlags = lib.mkIf (cfg.enableSSH) ["--ssh"]; # TODO: Make modular for multiple possible flags. interfaceName = cfg.interfaceName; openFirewall = false; - #port = 41641; useRoutingFeatures = "none"; }; }; diff --git a/roles/zellij.nix b/roles/zellij.nix index accf199..625c6cb 100644 --- a/roles/zellij.nix +++ b/roles/zellij.nix @@ -7,7 +7,7 @@ }: let cfg = config.roles.zellij; - # hard light + # Hard light: # https://github.com/sainnhe/everforest/blob/master/palette.md#light # https://github.com/sainnhe/everforest/blob/e5b9e2fb676a9ded3e86ae51924f7962fa4fb0ac/autoload/everforest.vim#L51 everforest = { diff --git a/systems/hosts/auth/authelia-main.nix b/systems/hosts/auth/authelia-main.nix index 72030d6..73aab1e 100644 --- a/systems/hosts/auth/authelia-main.nix +++ b/systems/hosts/auth/authelia-main.nix @@ -119,7 +119,7 @@ in { }; log = { level = "info"; - format = "text"; # json, text + format = "text"; }; telemetry.metrics.enabled = false; totp = { diff --git a/systems/hosts/cloud/default.nix b/systems/hosts/cloud/default.nix index 51e48b9..69af193 100644 --- a/systems/hosts/cloud/default.nix +++ b/systems/hosts/cloud/default.nix @@ -68,13 +68,13 @@ in { default_phone_region = "FI"; loglevel = 2; log_type = "file"; - maintenance_window_start = 0; # Maintenance window from UTC 0000 to 0400 + maintenance_window_start = 0; # Maintenance window from UTC 0000 to 0400. redis = { host = "/run/redis-nextcloud/redis.sock"; }; trusted_domains = ["nextcloud.rustylily.home.arpa"]; trusted_proxies = ["10.1.2.10"]; - opcache.interned_strings_buffer = 64; # Megabytes of memory to use + opcache.interned_strings_buffer = 64; # Megabytes of memory to use. overwriteprotocol = "https"; # Programs needed for... stuff. @@ -133,7 +133,7 @@ in { ensureDatabases = ["outline" "nextcloud"]; ensureUsers = [ { - name = "outline"; # needs to match the user that's running outline + name = "outline"; ensureDBOwnership = true; } { diff --git a/systems/hosts/cloud/miniflux.nix b/systems/hosts/cloud/miniflux.nix index 2c04022..20957ef 100644 --- a/systems/hosts/cloud/miniflux.nix +++ b/systems/hosts/cloud/miniflux.nix @@ -24,13 +24,13 @@ in { LISTEN_ADDR = "0.0.0.0:${toString port}"; BASE_URL = "https://rss.liljamo.com/"; DISABLE_LOCAL_AUTH = 1; - #METRICS_COLLECTOR = 1; # TODO: metrics, disable /metrics path on haproxy like jellyfin + #METRICS_COLLECTOR = 1; # TODO: Metrics, disable /metrics path on haproxy like jellyfin. OAUTH2_PROVIDER = "oidc"; OAUTH2_CLIENT_ID = "miniflux"; OAUTH2_CLIENT_SECRET_FILE = config.sops.secrets."miniflux/oidcSecret".path; OAUTH2_REDIRECT_URL = "https://rss.liljamo.com/oauth2/oidc/callback"; - # .well-known/openid-configuration is appended to this by the oidc library used by miniflux + # .well-known/openid-configuration is appended to this by the oidc library used by miniflux. OAUTH2_OIDC_DISCOVERY_ENDPOINT = "https://auth.liljamo.com"; OAUTH2_USER_CREATION = 1; diff --git a/systems/hosts/dns/default.nix b/systems/hosts/dns/default.nix index 22da31d..b0541e4 100644 --- a/systems/hosts/dns/default.nix +++ b/systems/hosts/dns/default.nix @@ -57,11 +57,11 @@ in { clientGroupsBlock = { default = ["ads"]; }; - # 'zeroIp' is default, and returns 0.0.0.0 - # 'nxDomain' would return a NXDOMAIN code + # 'zeroIp' is default and returns 0.0.0.0 + # 'nxDomain' would return a NXDOMAIN code. blockType = "zeroIp"; blockTTL = "6h"; - # how often to refresh lists + # How often to refresh lists. loading = { downloads = { timeout = "5m"; @@ -77,7 +77,7 @@ in { maxTime = "60m"; maxItemsCount = 10000; prefetching = false; - # cache NXDOMAIN results for only a short time + # Cache NXDOMAIN results for only a short time. cacheTimeNegative = "5m"; }; prometheus = { diff --git a/systems/hosts/proxy/default.nix b/systems/hosts/proxy/default.nix index a1b8e7c..bfeb6b9 100644 --- a/systems/hosts/proxy/default.nix +++ b/systems/hosts/proxy/default.nix @@ -66,7 +66,6 @@ in { }; caddy = { enable = true; - #email = ""; logFormat = "level ERROR"; globalConfig = '' http_port 8080 diff --git a/systems/hosts/social/default.nix b/systems/hosts/social/default.nix index d016045..961765a 100644 --- a/systems/hosts/social/default.nix +++ b/systems/hosts/social/default.nix @@ -30,7 +30,7 @@ in { ":pleroma" = { ":instance" = { description = "Personal instance"; - email = "jonni@liljamo.com"; # FIXME: maybe abuse@liljamo.com? + email = "jonni@liljamo.com"; # FIXME: maybe abuse@lothlorien.social? name = "Lothlórien"; registrations_open = false; }; @@ -42,7 +42,7 @@ in { database = "akkoma"; }; - # FIXME: different subdomain as recommended + # FIXME: different subdomain as recommended. "Pleroma.Upload".base_url = "https://lothlorien.social/media/"; "Pleroma.Web.Endpoint".http.ip = "0.0.0.0"; -- 2.44.1