mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-05-08 21:36:10 +02:00
Compare commits
5 Commits
ba4b977388
...
ebdf499ffe
Author | SHA1 | Date | |
---|---|---|---|
Jill "oatmealine" Monoids | ebdf499ffe | ||
Jill "oatmealine" Monoids | e826bc5100 | ||
Jill "oatmealine" Monoids | 0894041f4e | ||
Jill "oatmealine" Monoids | d5285d9249 | ||
Jill "oatmealine" Monoids | a5038dc4c0 |
112
flake.lock
112
flake.lock
|
@ -7,11 +7,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701216516,
|
||||
"narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=",
|
||||
"lastModified": 1703107199,
|
||||
"narHash": "sha256-Xx9Kkoqye520mkEWTZx/sKQRJsIeWOuwoh568uwHpNg=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "13ac9ac6d68b9a0896e3d43a082947233189e247",
|
||||
"rev": "17090d105af1b9f941109c1e12d6e3a596657f97",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -68,11 +68,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702002149,
|
||||
"narHash": "sha256-KAtAAnpfogr6XzdskJ33ytdrd0c6UU4OT94u84eWvpQ=",
|
||||
"lastModified": 1702399955,
|
||||
"narHash": "sha256-FnB5O1RVFzj3h7Ayf7UxFnOL1gsJuG6gn1LCTd9dKFs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "170e86030361a09053abe3ca36b0fefa1292a13e",
|
||||
"rev": "47798c4ab07d5f055bb2625010cf6d8e3f384923",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -195,11 +195,11 @@
|
|||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700814205,
|
||||
"narHash": "sha256-lWqDPKHRbQfi+zNIivf031BUeyciVOtwCwTjyrhDB5g=",
|
||||
"lastModified": 1703113038,
|
||||
"narHash": "sha256-oxkyzjpD+mNT7arzU/zHrkNHLuY9tKwmnD2MNaZiSDw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "aeb2232d7a32530d3448318790534d196bf9427a",
|
||||
"rev": "0c2353d5d930c3d93724df6858aef064a31b3c00",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -218,11 +218,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701988578,
|
||||
"narHash": "sha256-44jQ4XMNP5ql3fdXLN+SCEnKfZcK1aY34koIwFLWgYw=",
|
||||
"lastModified": 1703194032,
|
||||
"narHash": "sha256-ynsyO+BacfysxWm3R9owGPZfsClLXWEXNEfqMD6mBic=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "6fb1b89b982eea26ecae75b93f1742537c4f31ae",
|
||||
"rev": "bd952dcef2ead3b0b7e2d730930a3fc528813ee0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -261,11 +261,11 @@
|
|||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701083219,
|
||||
"narHash": "sha256-0j4Poy2OEZ55GWagfj6ookxG6jXdsDHZLh6vU3DBuz4=",
|
||||
"lastModified": 1703193305,
|
||||
"narHash": "sha256-fuNLHEFwYiUQgxGfi4t3rDN/r2Ulbw9+ylE24SrBakI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprpaper",
|
||||
"rev": "b94f84605d6d6d8d3c17a42a72fc3b01df69ab7f",
|
||||
"rev": "ae4f498fdac07eea6ba48e5c85349edd38b5a2f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -299,11 +299,11 @@
|
|||
"nixpkgs": "nixpkgs_8"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701998456,
|
||||
"narHash": "sha256-I/5XgTPo0tMmk0o/IZuml7Dx1uVT4oMHLUPIgFE4Sg0=",
|
||||
"lastModified": 1703207873,
|
||||
"narHash": "sha256-j1kXgZKfSc8toQNaRzWODIvZH/jDJYA8zYO2eyBYBX8=",
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "2ac70284dc5835f375f4f63ea763ede4e46d0dce",
|
||||
"rev": "97ae0a9d6e8a146f075f815679829f96dfe2a929",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -314,11 +314,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1701656485,
|
||||
"narHash": "sha256-xDFormrGCKKGqngHa2Bz1GTeKlFMMjLnHhTDRdMJ1hs=",
|
||||
"lastModified": 1702453208,
|
||||
"narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "fa194fc484fd7270ab324bb985593f71102e84d1",
|
||||
"rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -345,11 +345,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1701615100,
|
||||
"narHash": "sha256-7VI84NGBvlCTduw2aHLVB62NvCiZUlALLqBe5v684Aw=",
|
||||
"lastModified": 1702221085,
|
||||
"narHash": "sha256-Br3GCSkkvkmw46cT6wCz6ro2H1WgDMWbKE0qctbdtL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e9f06adb793d1cca5384907b3b8a4071d5d7cb19",
|
||||
"rev": "c2786e7084cbad90b4f9472d5b5e35ecb57958af",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -361,11 +361,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1701718080,
|
||||
"narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=",
|
||||
"lastModified": 1703013332,
|
||||
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c7f3c0fb7c08a0814627611d9d7d45ab6d75335",
|
||||
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -405,6 +405,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1702151865,
|
||||
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1701718080,
|
||||
"narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=",
|
||||
|
@ -420,29 +436,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1700204040,
|
||||
"narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1700612854,
|
||||
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
|
||||
"lastModified": 1702312524,
|
||||
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
|
||||
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -454,11 +454,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1683014792,
|
||||
"narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1702645756,
|
||||
"narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42",
|
||||
"rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -502,11 +502,11 @@
|
|||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1701952659,
|
||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||
"lastModified": 1703068421,
|
||||
"narHash": "sha256-WSw5Faqlw75McIflnl5v7qVD/B3S2sLh+968bpOGrWA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
|
||||
"rev": "d65bceaee0fb1e64363f7871bc43dc1c6ecad99f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -660,11 +660,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700508250,
|
||||
"narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=",
|
||||
"lastModified": 1702334919,
|
||||
"narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47",
|
||||
"rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -4,8 +4,8 @@ with lib;
|
|||
let
|
||||
# https://git.sleeping.town/unascribed/unsup/releases
|
||||
unsup = pkgs.fetchurl {
|
||||
url = "https://git.sleeping.town/attachments/c521d178-8938-40a5-b21b-0333eef4099e";
|
||||
sha256 = "c5bd49784392b651e4bc71fe57976f5b4fb14f09e0e23183ae5b94a821ae4756";
|
||||
url = "https://git.sleeping.town/unascribed/unsup/releases/download/v0.2.3/unsup-0.2.3.jar";
|
||||
hash = "sha256-DBMxiZwfUUiLqXYOMD8EUz4HubAZIEjAPmk32T0NYtA=";
|
||||
};
|
||||
|
||||
mkUnsupINI = { url, extraConfig ? "" }: pkgs.writeTextFile {
|
||||
|
@ -43,7 +43,7 @@ in {
|
|||
"gayrats" = import ./gayrats.nix {
|
||||
inherit pkgs;
|
||||
|
||||
enable = true;
|
||||
enable = false;
|
||||
server-port = 25565;
|
||||
|
||||
inherit unsup;
|
||||
|
@ -67,7 +67,7 @@ in {
|
|||
"n3ko-test" = import ./n3ko-test.nix {
|
||||
inherit pkgs;
|
||||
|
||||
enable = true;
|
||||
enable = false;
|
||||
server-port = 25595;
|
||||
};
|
||||
|
||||
|
@ -75,7 +75,7 @@ in {
|
|||
inherit pkgs;
|
||||
inherit lib;
|
||||
|
||||
enable = true;
|
||||
enable = false;
|
||||
server-port = 25535;
|
||||
|
||||
inherit unsup;
|
||||
|
@ -89,6 +89,35 @@ in {
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
"modfest-build" = let
|
||||
unsupINI = mkUnsupINI {
|
||||
url = "https://raw.githack.com/ModFest/modfest-1-20/main/pack/pack.toml";
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
package = pkgs.fabricServers."fabric-1_20_4".override { loaderVersion = "0.15.3"; };
|
||||
jvmOpts = ((import ./mc-flags.nix) "4G") + " -javaagent:${unsup}";
|
||||
|
||||
openFirewall = true;
|
||||
|
||||
serverProperties = {
|
||||
server-port = 25525;
|
||||
gamemode = 1;
|
||||
motd = "modfest build server !";
|
||||
white-list = true;
|
||||
max-players = 128;
|
||||
allow-flight = true;
|
||||
enable-command-block = true;
|
||||
enforce-secure-profile = false;
|
||||
snooper-enabled = false;
|
||||
spawn-protection = 0;
|
||||
};
|
||||
|
||||
symlinks = {
|
||||
"unsup.ini" = unsupINI;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.minecraft-server-dark-firepit.serviceConfig = {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
symlinks = { "unsup.ini" = unsupINI; };
|
||||
|
||||
package = pkgs.minecraftServers.fabric-1_19_2;
|
||||
package = pkgs.fabricServers."fabric-1_19_2".override { loaderVersion = "0.14.17"; };
|
||||
|
||||
jvmOpts = "-Xmx6G -javaagent:${unsup}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
memory: "-Xms${memory} -Xmx${memory} -XX:+UseShenandoahGC"
|
|
@ -0,0 +1,55 @@
|
|||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
|
||||
ingester:
|
||||
lifecycler:
|
||||
address: 0.0.0.0
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
replication_factor: 1
|
||||
final_sleep: 0s
|
||||
chunk_idle_period: 1h # Any chunk not receiving new logs in this time will be flushed
|
||||
max_chunk_age: 1h # All chunks will be flushed when they hit this age, default is 1h
|
||||
chunk_target_size: 1048576 # Loki will attempt to build chunks up to 1.5MB, flushing first if chunk_idle_period or max_chunk_age is reached first
|
||||
chunk_retain_period: 30s # Must be greater than index read cache TTL if using an index cache (Default index read cache TTL is 5m)
|
||||
max_transfer_retries: 0 # Chunk transfers disabled
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2023-12-08
|
||||
store: boltdb-shipper
|
||||
object_store: filesystem
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
storage_config:
|
||||
boltdb_shipper:
|
||||
active_index_directory: /var/lib/loki/boltdb-shipper-active
|
||||
cache_location: /var/lib/loki/boltdb-shipper-cache
|
||||
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
|
||||
shared_store: filesystem
|
||||
filesystem:
|
||||
directory: /var/lib/loki/chunks
|
||||
|
||||
limits_config:
|
||||
reject_old_samples: true
|
||||
reject_old_samples_max_age: 168h
|
||||
|
||||
chunk_store_config:
|
||||
max_look_back_period: 0s
|
||||
|
||||
table_manager:
|
||||
retention_deletes_enabled: false
|
||||
retention_period: 0s
|
||||
|
||||
compactor:
|
||||
working_directory: /var/lib/loki
|
||||
shared_store: filesystem
|
||||
compactor_ring:
|
||||
kvstore:
|
||||
store: inmemory
|
|
@ -0,0 +1,110 @@
|
|||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.services.metrics;
|
||||
in {
|
||||
options.modules.services.metrics = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
# default = "grafana.oat.zone";
|
||||
default = null;
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 2342;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{ assertion = cfg.domain != null;
|
||||
description = "please set the domain for grafana";
|
||||
}
|
||||
];
|
||||
systemd.services.promtail = {
|
||||
description = "Promtail service for Loki";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.grafana-loki}/bin/promtail --config.file ${./promtail.yml}
|
||||
'';
|
||||
};
|
||||
};
|
||||
services = {
|
||||
grafana = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
domain = cfg.domain;
|
||||
http_port = cfg.port;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
prometheus = let
|
||||
ports = {
|
||||
base = 9001;
|
||||
node = 9002;
|
||||
nginx = 9003;
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
port = ports.base;
|
||||
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = ports.node;
|
||||
};
|
||||
nginx = {
|
||||
enable = true;
|
||||
port = ports.nginx;
|
||||
};
|
||||
};
|
||||
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "lucent-firepit";
|
||||
static_configs = [{
|
||||
targets = [
|
||||
"127.0.0.1:${toString ports.node}"
|
||||
"127.0.0.1:${toString ports.nginx}"
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
loki = {
|
||||
enable = true;
|
||||
configFile = ./loki-local-config.yml;
|
||||
};
|
||||
|
||||
nginx.statusPage = true;
|
||||
|
||||
nginx.virtualHosts."${cfg.domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
locations."= /robots.txt" = {
|
||||
extraConfig = ''
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "User-agent: *\nDisallow: /\n";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
server:
|
||||
http_listen_port: 28183
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://127.0.0.1:3100/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: journal
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: systemd-journal
|
||||
host: lucent-firepit
|
||||
relabel_configs:
|
||||
- source_labels: ["__journal__systemd_unit"]
|
||||
target_label: "unit"
|
Loading…
Reference in New Issue