WIP: move nixos modules

This commit is contained in:
Filippo Berto 2023-05-14 23:40:45 +02:00
parent d725c3b788
commit 2a5983344d
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
29 changed files with 65 additions and 115 deletions

View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
let
user_keys = user:
lib.optionals (builtins.hasAttr "bertof" config.users.users)
config.users.users.${user}.openssh.authorizedKeys.keys;
in
{
# nix.buildMachines
nix.distributedBuilds = true;
nix.sshServe = {
enable = true;
keys = user_keys "bertof";
write = true;
protocol = "ssh-ng";
};
services.nix-serve = {
enable = true;
openFirewall = true;
secretKeyFile = "/etc/nix/serve";
};
nix.settings = {
trusted-users = [ "root" "nix-ssh" "@wheel" ];
trusted-public-keys = [
"odin:ukZZy//P0nBAcy4ycX8eYCByRJFOfJRlfW4sYjP/rGE="
"loki:jVAH1bQugXdQ1w29lvVknyPqWwmAn7WhjKf7z4t+q7E="
];
substituters = [
# "https://192.168.0.10"
# "https://192.168.0.100"
# "ssh-ng://loki.local"
# "ssh-ng://odin.local"
# "ssh-ng://192.168.0.10"
# "ssh-ng://192.168.0.100"
];
# trusted-substituters = [
# ];
};
}