From bc57d06655f1c15aeb74fd9762b88efa1b72ebba Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 24 Jan 2023 20:46:51 -0600 Subject: [PATCH] Working deploy for nextcloud2 --- flake.lock | 8 ++++---- flake.nix | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 81bf0c7..1792853 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1674611834, - "narHash": "sha256-4XIs7K5rBUwwZY9BSNf/RbK9RIfu4djGiCPQdFs8/XA=", + "lastModified": 1674613871, + "narHash": "sha256-ybiVqMvTq0Ke0Zs8KgOSmnTI4I3b7gu8f9uVnXxO56U=", "ref": "refs/heads/main", - "rev": "8af720229e07ea9b147ee90b02cd2fb016236a97", - "revCount": 45, + "rev": "73571dbf09e7ecc417a137cbe3c9dc4e27cf01d5", + "revCount": 48, "type": "git", "url": "https://git.asonix.dog/asonix/nixos-aarch64-images" }, diff --git a/flake.nix b/flake.nix index eae9a87..333bd35 100644 --- a/flake.nix +++ b/flake.nix @@ -8,18 +8,42 @@ }; outputs = { self, deploy-rs, image-builder, nixpkgs }: { - nixosConfigurations.nextcloud2 = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - modules = [ - image-builder.modules.rockPro64v2 - { } - ]; - }; + nixosConfigurations.nextcloud2 = + let + 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; + + 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 + { + 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; }; };