-{ privateFiles }:
{ config, pkgs, resources, ... }:
{
deployment = {
targetHost = config.hostEnv.ips.main.ip4;
substituteOnDestination = true;
};
+ # ssh-keyscan monitoring-1 | nix-shell -p ssh-to-age --run ssh-to-age
+ secrets.ageKeys = [ "age1dn4lzhgxusqrpjjnzm7w8ml39ptf326htuzmpqdqs2gg3wq7cqzqxuvx8k" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
- myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
+ myEnv = import ../../../nixops/secrets/environment.nix;
imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ] ++ builtins.attrValues (import ../..);
services.netdata.config.web."allow netdata.conf from" = "fd*";
services.netdata.config.web."allow management from" = "fd*";
networking.firewall.allowedTCPPorts = [ 19999 ];
- environment.etc."netdata/stream.conf".source = "/var/secrets/netdata-stream.conf";
+ environment.etc."netdata/stream.conf".source = config.secrets.fullPaths."netdata-stream.conf";
- secrets.keys = [
- {
- dest = "netdata-stream.conf";
+ secrets.keys = {
+ "netdata-stream.conf" = {
user = config.services.netdata.user;
group = config.services.netdata.group;
permissions = "0400";
default memory = ram
health enabled by default = auto
'') config.myEnv.monitoring.netdata_keys);
- }
- ];
+ };
+ };
users.users."${config.services.netdata.user}".extraGroups = [ "keys" ];
# This value determines the NixOS release with which your system is
# to be compatible, in order to avoid breaking some software such as