mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
refactor: simplify host setup
This commit is contained in:
parent
15fb616845
commit
d1d4082d56
27 changed files with 147 additions and 90 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{hostname, ...}: {
|
||||
{config, ...}: {
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
hostName = config.fireproof.hostname;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
username,
|
||||
hostname,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.fireproof) username;
|
||||
inherit (config.fireproof) hostname;
|
||||
# Load all public keys from ../../secrets/hosts/*/id_ed25519.pub
|
||||
allHosts = lib.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir ../../secrets/hosts));
|
||||
publicKeys = map (x: builtins.readFile (../../secrets/hosts + ("/" + x) + "/id_ed25519.pub")) allHosts;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{
|
||||
username,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
{config, ...}: let
|
||||
inherit (config.fireproof) username;
|
||||
inherit (config.age) secrets;
|
||||
in {
|
||||
config = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue