mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 07:59:43 +00:00
Compare commits
No commits in common. "bb37a6c3a815f8b7a661ccb6993f5d54213d84af" and "10516f783a9857314b5a2fc2573d93a810512773" have entirely different histories.
bb37a6c3a8
...
10516f783a
4 changed files with 3 additions and 55 deletions
|
|
@ -19,11 +19,6 @@
|
|||
# Glances
|
||||
reverse_proxy http://localhost:61208
|
||||
}
|
||||
|
||||
http://grafana.ts.toast.name {
|
||||
# Grafana
|
||||
reverse_proxy http://localhost:${config.runit.services.grafana.environment.GF_SERVER_HTTP_PORT}
|
||||
}
|
||||
'';
|
||||
|
||||
runit.services.caddy = {
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
runit.services.grafana = {
|
||||
script = ''
|
||||
HOME_PATH=$HOME/services/grafana
|
||||
mkdir -p "$HOME_PATH"
|
||||
|
||||
exec ${pkgs.grafana}/bin/grafana server \
|
||||
--homepath ${pkgs.grafana}/share/grafana
|
||||
'';
|
||||
|
||||
environment = {
|
||||
GF_SERVER_HTTP_ADDR = "127.0.0.1";
|
||||
GF_SERVER_HTTP_PORT = "3000";
|
||||
GF_PATHS_DATA = "${config.home.homeDirectory}/services/grafana";
|
||||
};
|
||||
|
||||
log.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
home.file.".config/prometheus/prometheus.yml".text = ''
|
||||
global:
|
||||
scrape_interval: 1m
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'restic_rest_server'
|
||||
static_configs:
|
||||
- targets: ['${config.runit.services.restic-rest-server.environment.LISTEN_ADDR}']
|
||||
'';
|
||||
|
||||
runit.services.prometheus = {
|
||||
script = ''
|
||||
TSDB_PATH=$HOME/services/prometheus
|
||||
mkdir -p TSDB_PATH
|
||||
|
||||
exec ${pkgs.prometheus}/bin/prometheus \
|
||||
--config.file=$HOME/.config/prometheus/prometheus.yml \
|
||||
--storage.tsdb.path=$TSDB_PATH \
|
||||
--web.listen-address="127.0.0.1:9090"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
"restic/env" = {};
|
||||
};
|
||||
|
||||
services.restic.backups.y2q = {
|
||||
services.restic.backups.b2 = {
|
||||
initialize = true;
|
||||
inhibitsSleep = true;
|
||||
passwordFile = config.sops.secrets."restic/password".path;
|
||||
|
|
@ -15,16 +15,15 @@
|
|||
"/home/toast/workspace"
|
||||
];
|
||||
exclude = [ "node_modules" ];
|
||||
repository = "rest:http://y2q:9000/nixos/";
|
||||
repository = "s3:https://s3.us-east-005.backblazeb2.com/restic-backups-0";
|
||||
environmentFile = config.sops.secrets."restic/env".path;
|
||||
pruneOpts = [
|
||||
"--keep-hourly 6"
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 3"
|
||||
"--keep-monthly 3"
|
||||
];
|
||||
timerConfig = {
|
||||
OnCalendar = "hourly";
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue