sbc-deploys/flake.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

2023-01-25 01:58:10 +00:00
{
description = "A very basic flake";
inputs = {
deploy-rs.url = "github:serokell/deploy-rs";
nixpkgs.url = "github:nixos/nixpkgs/master";
image-builder.url = "git+https://git.asonix.dog/asonix/nixos-aarch64-images";
};
2023-01-25 02:49:00 +00:00
outputs = { self, deploy-rs, image-builder, nixpkgs }:
{
modules.shared = {
services.openssh.settings.PasswordAuthentication = false;
2023-01-25 02:46:51 +00:00
2023-01-25 02:49:00 +00:00
# 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;
2023-01-25 02:46:51 +00:00
2023-01-25 02:49:00 +00:00
fileSystems."/" =
2023-01-25 02:46:51 +00:00
{
2023-01-25 02:49:00 +00:00
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
2023-01-25 02:46:51 +00:00
};
2023-01-25 01:58:10 +00:00
2023-01-25 02:49:00 +00:00
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;
};
2023-01-25 01:58:10 +00:00
};
};
}