factor out into lib/admins.nix
This commit is contained in:
parent
098be6aba0
commit
9bd5208c2f
|
@ -16,6 +16,7 @@ in
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../lib/admins.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
|
|
@ -11,6 +11,7 @@ in {
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
../../lib/admins.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ ../../../lib/lxc-container.nix
|
[ ../../../lib/lxc-container.nix
|
||||||
../../../lib/shared.nix
|
../../../lib/shared.nix
|
||||||
|
../../../lib/admins.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "dhcp";
|
networking.hostName = "dhcp";
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ ../../../lib/lxc-container.nix
|
[ ../../../lib/lxc-container.nix
|
||||||
../../../lib/shared.nix
|
../../../lib/shared.nix
|
||||||
|
../../../lib/admins.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "grafana";
|
networking.hostName = "grafana";
|
||||||
|
|
|
@ -7,6 +7,7 @@ in
|
||||||
imports =
|
imports =
|
||||||
[ ../../../lib/lxc-container.nix
|
[ ../../../lib/lxc-container.nix
|
||||||
../../../lib/shared.nix
|
../../../lib/shared.nix
|
||||||
|
../../../lib/admins.nix
|
||||||
"${tiggerGit}/module.nix"
|
"${tiggerGit}/module.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 [];
|
||||||
|
}
|
|
@ -28,5 +28,4 @@
|
||||||
|
|
||||||
# Required for remote deployment
|
# Required for remote deployment
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = (import ../secrets/lib/authorized_keys).admins;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue