Skip to content

Commit f4dab44

Browse files
committed
fix: covered version
1 parent 68cdcf1 commit f4dab44

File tree

3 files changed

+58
-68
lines changed

3 files changed

+58
-68
lines changed

configuration.nix

Lines changed: 43 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
# Edit this configuration file to define what should be installed on
2-
# your system. Help is available in the configuration.nix(5) man page
3-
# and in the NixOS manual (accessible by running ‘nixos-help’).
4-
1+
# /etc/nixos/
52
{ config, pkgs, ... }:
63

74
{
85
imports =
96
[ # Include the results of the hardware scan.
107
./hardware-configuration.nix
118
./remote.conf.nix
12-
./helpwave-self-hosting.conf.nix
9+
./sentry.nix
1310
];
1411

1512
# Bootloader.
@@ -20,9 +17,6 @@
2017
networking.hostName = "helpwave"; # Define your hostname.
2118
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
2219

23-
# Configure network proxy if necessary
24-
# networking.proxy.default = "http://user:password@proxy:port/";
25-
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
2620

2721
# Enable networking
2822
networking.networkmanager.enable = true;
@@ -72,18 +66,9 @@
7266
alsa.enable = true;
7367
alsa.support32Bit = true;
7468
pulse.enable = true;
75-
# If you want to use JACK applications, uncomment this
76-
#jack.enable = true;
77-
78-
# use the example session manager (no others are packaged yet so this is enabled by default,
79-
# no need to redefine it in your config for now)
80-
#media-session.enable = true;
8169
};
8270

83-
# Enable touchpad support (enabled default in most desktopManager).
84-
# services.xserver.libinput.enable = true;
8571

86-
# Define a user account. Don't forget to set a password with ‘passwd’.
8772
users.users.helpwave = {
8873
isNormalUser = true;
8974
description = "helpwave";
@@ -99,40 +84,46 @@
9984
# Allow unfree packages
10085
nixpkgs.config.allowUnfree = true;
10186

102-
#environment.systemPackages = with pkgs; [
103-
# vim
104-
# git
105-
# wget
106-
# nano
107-
# sudo
108-
#];
109-
110-
# Some programs need SUID wrappers, can be configured further or are
111-
# started in user sessions.
112-
# programs.mtr.enable = true;
113-
# programs.gnupg.agent = {
114-
# enable = true;
115-
# enableSSHSupport = true;
116-
# };
117-
118-
# List services that you want to enable:
119-
120-
# Enable the OpenSSH daemon.
121-
#services.openssh.enable = true;
122-
#services.openssh.settings.PermitRootLogin = "yes";
123-
124-
# Open ports in the firewall.
125-
#networking.firewall.allowedTCPPorts = [ 22 80 443 3389 ];
126-
#networking.firewall.allowedUDPPorts = [ 22 80 443 3389 ];
127-
# Or disable the firewall altogether.
128-
networking.firewall.enable = false;
129-
130-
# This value determines the NixOS release from which the default
131-
# settings for stateful data, like file locations and database versions
132-
# on your system were taken. It‘s perfectly fine and recommended to leave
133-
# this value at the release version of the first install of this system.
134-
# Before changing this value read the documentation for this option
135-
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
136-
system.stateVersion = "24.05"; # Did you read the comment?
13787

88+
# Docker und Docker Compose aktivieren
89+
services.dockerRegistry.enable = true;
90+
virtualisation.docker.enable = true;
91+
virtualisation.docker.registries = [ "docker.io" ];
92+
virtualisation.docker.services = [
93+
{
94+
name = "sentry";
95+
image = "getsentry/sentry:latest"; # Ersetze dies durch die passende Version
96+
ports = [ "9000:9000" ];
97+
environment = {
98+
SENTRY_SECRET_KEY = "your_secret_key";
99+
SENTRY_DATABASE_URL = "postgres://sentry_user:password@localhost/sentry_db";
100+
SENTRY_REDIS_URL = "redis://localhost:6379";
101+
};
102+
volumes = [
103+
{ hostPath = "/var/lib/sentry"; containerPath = "/data" }
104+
];
105+
}
106+
];
107+
108+
109+
environment.systemPackages = with pkgs; [
110+
git
111+
makeWrapper
112+
vim
113+
git
114+
wget
115+
nano
116+
sudo
117+
docker-compose
118+
docker_27
119+
];
120+
121+
networking.firewall = {
122+
enable = true;
123+
allowedTCPPorts = [ 22 80 443 9000 3000 9092 2181 8123 6379 ];
124+
allowedUDPPorts = [];
125+
};
126+
127+
128+
system.stateVersion = "24.05";
138129
}

remote.conf.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# /etc/nixos/
12
{ config, pkgs, lib, ... }:
23

34
{

helpwave-self-hosting.conf.nix renamed to sentry.nix

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1+
# /etc/nixos/sentry.nix
12
{ config, pkgs, ... }:
23

34
{
4-
# Docker und Docker Compose aktivieren
5-
services.dockerRegistry.enable = true;
6-
virtualisation.docker.enable = true;
7-
8-
# Sentry Konfiguration
9-
environment.systemPackages = with pkgs; [
10-
git
11-
makeWrapper
12-
vim
13-
git
14-
wget
15-
nano
16-
sudo
17-
docker-compose
18-
docker_27
19-
];
5+
## DINSTE: Sentry, PostgreSQL, Redis, Kafka, Zookeeper, Clickhouse, Symbolicator, Relay
206

217
# PostgreSQL und Redis wie vorher
228
services.postgresql = {
@@ -120,6 +106,18 @@
120106
SENTRY_REDIS_URL = "redis://localhost:6379";
121107
};
122108

109+
services.nginx = {
110+
enable = true;
111+
virtualHosts."sentry.example.com" = {
112+
root = "/var/www/sentry";
113+
locations."/" = {
114+
proxyPass = "http://localhost:9000";
115+
};
116+
};
117+
};
118+
123119
#conterner
124120

121+
122+
125123
}

0 commit comments

Comments
 (0)