Browse Source

factor out into lib/admins.nix

container/radius
Astro 3 years ago
parent
commit
9bd5208c2f
  1. 1
      hosts/glotzbert/configuration.nix
  2. 1
      hosts/pulsebert/configuration.nix
  3. 1
      hosts/storage-ng/dhcp/configuration.nix
  4. 1
      hosts/storage-ng/grafana/configuration.nix
  5. 1
      hosts/storage-ng/mucbot/configuration.nix
  6. 7
      lib/admins.nix
  7. 1
      lib/lxc-container.nix

1
hosts/glotzbert/configuration.nix

@ -16,6 +16,7 @@ in
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../lib/admins.nix
];
# Use the systemd-boot EFI boot loader.

1
hosts/pulsebert/configuration.nix

@ -11,6 +11,7 @@ in {
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../lib/admins.nix
];
# Use the systemd-boot EFI boot loader.

1
hosts/storage-ng/dhcp/configuration.nix

@ -4,6 +4,7 @@
imports =
[ ../../../lib/lxc-container.nix
../../../lib/shared.nix
../../../lib/admins.nix
];
networking.hostName = "dhcp";

1
hosts/storage-ng/grafana/configuration.nix

@ -4,6 +4,7 @@
imports =
[ ../../../lib/lxc-container.nix
../../../lib/shared.nix
../../../lib/admins.nix
];
networking.hostName = "grafana";

1
hosts/storage-ng/mucbot/configuration.nix

@ -7,6 +7,7 @@ in
imports =
[ ../../../lib/lxc-container.nix
../../../lib/shared.nix
../../../lib/admins.nix
"${tiggerGit}/module.nix"
];

7
lib/admins.nix

@ -0,0 +1,7 @@
{ config, ... }:
{
users.users.root.openssh.authorizedKeys.keys =
if config.services.openssh.enable
then (import ../secrets/lib/authorized_keys).admins
else [];
}

1
lib/lxc-container.nix

@ -28,5 +28,4 @@
# Required for remote deployment
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = (import ../secrets/lib/authorized_keys).admins;
}

Loading…
Cancel
Save