fixed services

This commit is contained in:
John Lancaster
2024-12-29 14:12:53 -06:00
parent 2687c755a3
commit b8cba0a5b2
5 changed files with 7 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ SSH keys are pre-authorized from `secrets/authorized_keys` which contains the pu
- `secrets/secrets.yaml` contains the encrypted keys. - `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. - 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. - `sops-ad` is a convenience script for editing the secrets.yaml file.
## Setup ## Setup

View File

@@ -15,6 +15,7 @@
sops.defaultSopsFile = ./secrets/secrets.yaml; sops.defaultSopsFile = ./secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml"; sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "${userSettings.adHome}/.config/sops/age/keys.txt";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bash bash

View File

@@ -8,8 +8,8 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "pc" "systemctl status promtail.service") (pkgs.writeShellScriptBin "promtail-check" "systemctl status promtail.service")
(pkgs.writeShellScriptBin "pw" "journalctl -u promtail.service -b -n 25 -f") (pkgs.writeShellScriptBin "promtail-watch" "journalctl -u promtail.service -b -n 25 -f")
]; ];
services.promtail = { services.promtail = {

View File

@@ -9,8 +9,8 @@ in
sops.secrets."telegraf_influx_token" = { }; sops.secrets."telegraf_influx_token" = { };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "tc" "systemctl status telegraf.service") (pkgs.writeShellScriptBin "telegraf-check" "systemctl status telegraf.service")
(pkgs.writeShellScriptBin "tw" "journalctl -u telegraf.service -b -n 25 -f") (pkgs.writeShellScriptBin "telegraf-watch" "journalctl -u telegraf.service -b -n 25 -f")
]; ];
systemd.services.telegraf = { systemd.services.telegraf = {

View File

@@ -4,7 +4,7 @@
(pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch") (pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch")
(pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch") (pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch")
(pkgs.writeShellScriptBin "nfs" '' (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 "ads" "nix develop --no-pure-eval $(readlink -f /etc/nixos)")
(pkgs.writeShellScriptBin "link-nix" "${builtins.readFile ./link-nix.sh}") (pkgs.writeShellScriptBin "link-nix" "${builtins.readFile ./link-nix.sh}")