From 78caf0048a586a09849382e43776c21e48d47527 Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 24 Jan 2023 20:49:00 -0600 Subject: [PATCH] Move shared out of let-in --- flake.nix | 68 +++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/flake.nix b/flake.nix index 333bd35..3ffd10a 100644 --- a/flake.nix +++ b/flake.nix @@ -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; + }; }; }; - }; }