From b8cba0a5b25e8ddb198def2f549063733fcddce8 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:12:53 -0600 Subject: [PATCH] fixed services --- README.md | 2 +- configuration.nix | 1 + nixos/services/promtail.nix | 4 ++-- nixos/services/telegraf.nix | 4 ++-- scripts/default.nix | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4b5a902..45f5858 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ SSH keys are pre-authorized from `secrets/authorized_keys` which contains the pu - `secrets/secrets.yaml` contains the encrypted keys. - There needs to be a `~/.config/sops/age/keys.txt` file with the age secret key. This file has to be manually placed. -- `sops.yaml` indicates to SOPS that the yaml file is encrypted with that secret key. +- `.sops.yaml` indicates to SOPS that the yaml file is encrypted with that secret key. - `sops-ad` is a convenience script for editing the secrets.yaml file. ## Setup diff --git a/configuration.nix b/configuration.nix index bfb7c5b..5f9149d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,6 +15,7 @@ sops.defaultSopsFile = ./secrets/secrets.yaml; sops.defaultSopsFormat = "yaml"; + sops.age.keyFile = "${userSettings.adHome}/.config/sops/age/keys.txt"; environment.systemPackages = with pkgs; [ bash diff --git a/nixos/services/promtail.nix b/nixos/services/promtail.nix index 2131870..df15b79 100644 --- a/nixos/services/promtail.nix +++ b/nixos/services/promtail.nix @@ -8,8 +8,8 @@ in }; environment.systemPackages = with pkgs; [ - (pkgs.writeShellScriptBin "pc" "systemctl status promtail.service") - (pkgs.writeShellScriptBin "pw" "journalctl -u promtail.service -b -n 25 -f") + (pkgs.writeShellScriptBin "promtail-check" "systemctl status promtail.service") + (pkgs.writeShellScriptBin "promtail-watch" "journalctl -u promtail.service -b -n 25 -f") ]; services.promtail = { diff --git a/nixos/services/telegraf.nix b/nixos/services/telegraf.nix index 0825ab6..c3cf5d5 100644 --- a/nixos/services/telegraf.nix +++ b/nixos/services/telegraf.nix @@ -9,8 +9,8 @@ in sops.secrets."telegraf_influx_token" = { }; environment.systemPackages = with pkgs; [ - (pkgs.writeShellScriptBin "tc" "systemctl status telegraf.service") - (pkgs.writeShellScriptBin "tw" "journalctl -u telegraf.service -b -n 25 -f") + (pkgs.writeShellScriptBin "telegraf-check" "systemctl status telegraf.service") + (pkgs.writeShellScriptBin "telegraf-watch" "journalctl -u telegraf.service -b -n 25 -f") ]; systemd.services.telegraf = { diff --git a/scripts/default.nix b/scripts/default.nix index 862791e..fc45271 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -4,7 +4,7 @@ (pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch") (pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch") (pkgs.writeShellScriptBin "nfs" '' - sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#${systemSettings.hostName} + sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#${systemSettings.hostName} --impure '') (pkgs.writeShellScriptBin "ads" "nix develop --no-pure-eval $(readlink -f /etc/nixos)") (pkgs.writeShellScriptBin "link-nix" "${builtins.readFile ./link-nix.sh}")