From 85f7f33f2f0c8946ff9d76e51e8684468ecb6801 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 9 Jun 2026 00:33:51 +0300 Subject: removed most of the nix related files --- modules/development.nix | 152 ------------------------------------------------ 1 file changed, 152 deletions(-) delete mode 100644 modules/development.nix (limited to 'modules/development.nix') diff --git a/modules/development.nix b/modules/development.nix deleted file mode 100644 index 8520fc1..0000000 --- a/modules/development.nix +++ /dev/null @@ -1,152 +0,0 @@ -{ pkgs, lib, config, ... }: { - - options.development.enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "enables development"; - }; - - config = lib.mkIf config.development.enable { - - environment.systemPackages = with pkgs; [ - - # Tools - golangci-lint - shellcheck - beautysh # shell formatter - rustup - goose - sqlc - maven - gradle - kotlin - gomodifytags - go-tools # staticcheck - gosec - devtoolbox - busybox # A bunch of utils like lsof and fuser - libllvm - universal-ctags - valgrind - - prometheus - grafana-loki - grafana-alloy - pyroscope - ]; - - # Grafana for eko - services.grafana.enable = true; - services.grafana.settings.server.http_port = 3030; - services.grafana.settings.smtp.enabled = true; - services.grafana.settings.smtp = { - host = "smtp.example.com:587"; - user = "your@user.com"; - password = "super-secret"; # Consider using a file for secret - skip_verify = true; - from_address = "your@user.com"; - from_name = "Grafana"; - startTLS_policy = "OpportunisticStartTLS"; - }; - - systemd.services.grafana = { - serviceConfig = { - ProtectHome = lib.mkForce false; - ProtectSystem = lib.mkForce false; - PrivateTmp = lib.mkForce false; - ReadWritePaths = [ "/home/kyren/projects/eko" ]; - }; - }; - - # # Allow grafana to access DB - # fileSystems."/var/lib/grafana/eko" = { - # device = "/home/kyren/projects/eko"; - # options = [ "bind" "ro" ]; - # }; - - # Prometheus for eko - services.prometheus.enable = true; - services.prometheus.configText = builtins.readFile ./eko-prometheus.yml; - - # Alloy service for eko - systemd.services.alloy = { - description = "Alloy"; - - wants = [ "network-online.target" ]; - after = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; - - reloadTriggers = lib.mapAttrsToList (_: v: v.source or null) ( - lib.filterAttrs (n: _: lib.hasPrefix "alloy/" n && lib.hasSuffix ".alloy" n) config.environment.etc - ); - - serviceConfig = { - Restart = "always"; - RestartSec = "2s"; - - User = "root"; # TODO: make these not root? - Group = "root"; - - SupplementaryGroups = [ - # allow to read the systemd journal for loki log forwarding - "systemd-journal" - ]; - - ConfigurationDirectory = "alloy"; - StateDirectory = "alloy"; - WorkingDirectory = "%S/alloy"; - Type = "simple"; - - ExecStart = "${lib.getExe pkgs.grafana-alloy} run /etc/alloy/"; - ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID"; - }; - }; - - environment.etc = { - "alloy/eko-config.alloy".text = builtins.readFile ./eko-config.alloy; - }; - - # Loki service for eko - services.loki.enable = true; - services.loki.configuration = { - auth_enabled = false; - - server = { - http_listen_port = 3100; - }; - - common = { - ring = { - instance_addr = "127.0.0.1"; - kvstore = { - store = "inmemory"; - }; - }; - replication_factor = 1; - path_prefix = "/var/lib/loki"; - }; - - schema_config = { - configs = [ - { - from = "2020-05-15"; - store = "tsdb"; - object_store = "filesystem"; - schema = "v13"; - index = { - prefix = "index_"; - period = "24h"; - }; - } - ]; - }; - - storage_config = { - filesystem = { - directory = "/var/lib/loki/chunks"; - }; - }; - }; - - }; -} -- cgit v1.3.1