Move shared out of let-in

This commit is contained in:
asonix 2023-01-24 20:49:00 -06:00
parent bc57d06655
commit 78caf0048a

View file

@ -7,45 +7,45 @@
image-builder.url = "git+https://git.asonix.dog/asonix/nixos-aarch64-images";
};
outputs = { self, deploy-rs, image-builder, nixpkgs }: {
nixosConfigurations.nextcloud2 =
let
shared = {
services.openssh.settings.PasswordAuthentication = false;
outputs = { self, deploy-rs, image-builder, nixpkgs }:
{
modules.shared = {
services.openssh.settings.PasswordAuthentication = false;
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
boot.loader.grub.enable = false;
# Enables the generation of /boot/extlinux/extlinux.conf
boot.loader.generic-extlinux-compatible.enable = true;
fileSystems."/" =
{
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
};
in
nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
image-builder.packages.aarch64-linux.modules.rockPro64v2
shared
fileSystems."/" =
{
networking.hostName = "nextcloud2";
}
];
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
};
deploy.nodes.nextcloud2 = {
hostname = "192.168.20.28";
profiles.system = {
user = "root";
sshOpts = [
"-i"
"/home/asonix/.ssh/nix-installer"
];
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.nextcloud2;
nixosConfigurations.nextcloud2 =
nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
image-builder.packages.aarch64-linux.modules.rockPro64v2
self.modules.shared
{
networking.hostName = "nextcloud2";
}
];
};
deploy.nodes.nextcloud2 = {
hostname = "192.168.20.28";
profiles.system = {
user = "root";
sshOpts = [
"-i"
"/home/asonix/.ssh/nix-installer"
];
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.nextcloud2;
};
};
};
};
}