summaryrefslogtreecommitdiffstats
path: root/default.nix
blob: d50cf149c2b0f56a254aab1a4d5e976848ef3f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ sources ? import ./npins
, pkgs ? import sources.nixpkgs {}
}:
with (import ./lib { inherit sources pkgs; });
eval {
  machines.bob.imports = [
    ({ config, pkgs, self, ... }: {
      imports = [
        ./modules/asecret.nix
        ./modules/userSecret.nix
        self.config.outputs.nixosModules.asecret
      ];
      networking.hostName = "bob";

      asecret.rootPassword = {
        secret.consumer = config.users.users.root.passwordSecret;
      };

      users.users.root.passwordSecret.provider =
        config.asecret.rootPassword.secret;
    })
  ];
  machines.alice = {
    networking.hostName = "alice";
  };
}