mirror of
https://git.feal.no/felixalb/nixos-config.git
synced 2024-12-22 04:07:28 +01:00
Add code-server, various cleanups
This commit is contained in:
parent
34cbe2f460
commit
f14628114e
@ -7,12 +7,13 @@
|
||||
../../common/metrics-exporters.nix
|
||||
./hardware-configuration.nix
|
||||
./filesystems.nix
|
||||
#./vms.nix
|
||||
./vms.nix
|
||||
|
||||
./services/nginx
|
||||
./services/metrics
|
||||
./services/flame.nix
|
||||
./services/jellyfin.nix
|
||||
./services/code-server.nix
|
||||
# TODO:
|
||||
# x Boot
|
||||
# x Mount ZFS
|
||||
|
16
hosts/voyager/services/code-server.nix
Normal file
16
hosts/voyager/services/code-server.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.services.code-server;
|
||||
in {
|
||||
services.code-server = {
|
||||
enable = true;
|
||||
host = "127.0.1.2";
|
||||
port = 4444;
|
||||
};
|
||||
services.nginx.virtualHosts."code.home.feal.no" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.1.2:${toString cfg.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -4,12 +4,13 @@ let
|
||||
in {
|
||||
# Jellyfin - Media Streaming platform
|
||||
services.jellyfin.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8096 ];
|
||||
users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ];
|
||||
systemd.services.jellyfin.serviceConfig = {
|
||||
DeviceAllow = lib.mkForce [ "/dev/dri/card0" ];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domainName}" = {
|
||||
extraConfig = ''
|
||||
#add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
location = / {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.loki;
|
||||
saveDirectory = "/tank/var/lib/loki";
|
||||
in {
|
||||
services.loki = {
|
||||
enable = true;
|
||||
@ -16,7 +16,7 @@ in {
|
||||
ingester = {
|
||||
wal = {
|
||||
enabled = true;
|
||||
dir = "/var/lib/loki/wal";
|
||||
dir = "${saveDirectory}/wal";
|
||||
};
|
||||
lifecycler = {
|
||||
address = "127.0.0.1";
|
||||
@ -48,13 +48,13 @@ in {
|
||||
|
||||
storage_config = {
|
||||
boltdb_shipper = {
|
||||
active_index_directory = "/var/lib/loki/boltdb-shipper-index";
|
||||
cache_location = "/var/lib/loki/boltdb-shipper-cache";
|
||||
active_index_directory = "${saveDirectory}/boltdb-shipper-index";
|
||||
cache_location = "${saveDirectory}/boltdb-shipper-cache";
|
||||
shared_store = "filesystem";
|
||||
cache_ttl = "24h";
|
||||
};
|
||||
filesystem = {
|
||||
directory = "/var/lib/loki/chunks";
|
||||
directory = "${saveDirectory}/chunks";
|
||||
};
|
||||
};
|
||||
|
||||
@ -65,7 +65,7 @@ in {
|
||||
};
|
||||
|
||||
compactor = {
|
||||
working_directory = "/var/lib/loki/compactor";
|
||||
working_directory = "${saveDirectory}/compactor";
|
||||
shared_store = "filesystem";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user