!coeAONBrWyDJnYMbMi:nixos.org

NixOS System Operations

560 Members
About system administration for running NixOS systems in production. Declaratively manage your operations. | Room recommendations: #networking:nixos.org150 Servers

Load older messages


SenderMessageTime
9 Dec 2024
@adam:robins.wtf@adam:robins.wtf

oh, the nix module

                 # Config validation may fail when using extraFlags = [ "-config.expand-env=true" ].
                 # To work around this, we simply skip it when extraFlags is not empty.
03:31:29
@adam:robins.wtf@adam:robins.wtfi have that enabled for injecting s3 secrets03:31:43
@adam:robins.wtf@adam:robins.wtf
    services.loki = {
      enable = true;
      extraFlags = [ "--config.expand-env=true" ];

      configuration = {
        auth_enabled = false;

        common = {
          instance_interface_names = [ "grid" ];
          ring.kvstore = {
            store = "consul";
            prefix = "loki/collectors/";
          };
        };

        compactor.working_directory = "${config.services.loki.dataDir}/compactor";

        schema_config.configs = [
          {
            from = "2024-01-01";
            store = "tsdb";
            object_store = "s3";
            schema = "v13";
            index = {
              prefix = "index_";
              period = "24h";
            };
          }
        ];

        storage_config = {
          aws = {
            bucketnames = "loki";
            endpoint = site.services.s3;
            region = "garage";
            secret_access_key = "\${S3_SECRET_ACCESS_KEY}";
            access_key_id = "\${S3_ACCESS_KEY_ID}";
            s3forcepathstyle = true;
          };
          tsdb_shipper = {
            active_index_directory = "${config.services.loki.dataDir}/index";
            cache_location = "${config.services.loki.dataDir}/index_cache";
          };
        };

        server = {
          http_listen_address = "127.0.0.1";
          http_listen_port = 12010;
          grpc_listen_address = config.stop.roles.grid.ip.internal.ipv4;
          grpc_listen_port = 12011;
        };
      };

04:29:52
@adam:robins.wtf@adam:robins.wtfin theory that works, but i have nothing to ship logs yet 😆04:35:19
@karlericsson:matrix.org@karlericsson:matrix.org joined the room.07:50:00
@philon:philon.tubephilon ⚡️ joined the room.09:25:45
@hans:procolix.comHans van Zijst joined the room.17:28:14
10 Dec 2024
@steveej0:matrix.orgsteveeji'm using remmina or gnome-connections to RDP into a windows 2019 server, and the keyboard layout seems to map incorrectly. tried all the mapping settings in remmina with no luck. is this potentially an issue with our configuration of freerdp?09:19:13
@steveej0:matrix.orgsteveejcould be this: https://github.com/NixOS/nixpkgs/issues/32592809:20:31
@steveej0:matrix.orgsteveejwhich has reports of non-nixpkgs remmina also behaving the same09:20:45
@jfquesada:matrix.orgice9Does anyone here has any experience running SMACK MAC on nixos?10:23:01
@jfquesada:matrix.orgice9it's far simpler than SELinux, but somehow I don't see or hear much about SMACK10:23:54
@scrumplex:duckhub.ioScrumplexRedacted or Malformed Event10:34:06
11 Dec 2024
@dminca:matrix.org@dminca:matrix.org left the room.14:18:59
@k_t.666:matrix.orgkat ⛧ they/them joined the room.19:24:22
@soispha:vhack.euBenedikt joined the room.21:22:18
@lars:familie-vogdt.de@lars:familie-vogdt.de left the room.22:31:03
12 Dec 2024
@mrtni:matrix.orgmrtni joined the room.06:24:06
@gagandeepb:matrix.orggagandeepb joined the room.07:48:02
@nam3l33ss:matrix.org·☽•Nameless☆•777 · ± changed their profile picture.14:34:50
13 Dec 2024
@brainlessbitch:matrix.orgbunbun joined the room.09:08:35
@brainlessbitch:matrix.orgbunbunhello all, i was wondering if anyone knows of a way to use ccache for kernel builds? currently my build takes almost 3 hours for one tiny patch and it's kind of a problem. i've done some looking and tried some different things i found but none of them worked09:12:51
@k900:0upti.meK900ccache doesn't really work well with Nix09:13:40
@k900:0upti.meK900What is your patch for?09:13:43
@brainlessbitch:matrix.orgbunbuna very stupid thing09:13:56
@brainlessbitch:matrix.orgbunbun
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index d19c78a78ae3..8c87d66bd4b6 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -19,6 +19,17 @@ struct dmi_device_attribute{
 #define to_dmi_dev_attr(_dev_attr) \
 	container_of(_dev_attr, struct dmi_device_attribute, dev_attr)

+void apply_twinkpad_replacement(char* str)
+{
+	static const char thinkpadstr[] = "thinkpad";
+	while (*str) {
+		if (!strncasecmp(str, thinkpadstr, sizeof(thinkpadstr) - 1)) {
+			str[1] ^= 'H' ^ 'W';
+		}
+		++str;
+	}
+}
+
 static ssize_t sys_dmi_field_show(struct device *dev,
 				  struct device_attribute *attr,
 				  char *page)
@@ -26,6 +37,7 @@ static ssize_t sys_dmi_field_show(struct device *dev,
 	int field = to_dmi_dev_attr(attr)->field;
 	ssize_t len;
 	len = scnprintf(page, PAGE_SIZE, "%s\n", dmi_get_system_info(field));
+	apply_twinkpad_replacement(page);
 	page[len-1] = '\n';
 	return len;
 }
09:14:20
@k900:0upti.meK900I assume "have you considered not doing that" isn't useful then, is it09:16:05
@brainlessbitch:matrix.orgbunbuni think it's worth it, but that's just me09:16:54
@k900:0upti.meK900You could also try changing the string that's actually reported by the firmware09:20:17
@k900:0upti.meK900Using e.g. https://www.ami.com/bios-uefi-utilities/09:20:21

Show newer messages


Back to Room ListRoom Version: 10