add hetzner-vm and remove pinetab

This commit is contained in:
ChaotiCryptidz 2021-12-28 15:09:51 +00:00
parent f7decff19d
commit 9b95fe9b73
4 changed files with 52 additions and 42 deletions

View file

@ -1,4 +1,4 @@
{ self, home-manager, mobile-nixos, nixpkgs, tree, ... }@inputs:
{ self, home-manager, nixpkgs, tree, ... }@inputs:
let
defaultModules =
[ home-manager.nixosModules.home-manager tree.impure.profiles.base ];
@ -13,16 +13,10 @@ in {
system = "x86_64-linux";
modules = defaultModules ++ [ ./lappy/lappy.nix ];
};
pinetab_modules = defaultModules ++ [ ./pinetab/pinetab.nix ];
pinetab_modules_inc_device = self.pinetab_modules ++ [
(import "${mobile-nixos}/lib/configuration.nix" {
device = "pine64-pinetab";
})
];
pinetab = nixpkgs.lib.nixosSystem {
hetzner-vm = nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs;
system = "aarch64-linux";
modules = self.pinetab_modules_inc_device;
system = "x86_64-linux";
modules = defaultModules ++ [ ./hetzner-vm/hetzner-vm.nix ];
};
}

View file

@ -0,0 +1,39 @@
{ modulesPath, tree, config, pkgs, lib, ... }:
{
imports = with tree; [
users.chaoticryptidz
profiles.tailscale
profiles.sshd
(modulesPath + "/profiles/qemu-guest.nix")
];
home-manager.users.root = { imports = with tree; [ home.base ]; };
home-manager.users.chaoticryptidz = {
imports = with tree; [
home.base
home.dev.archives
home.dev.editors
home.dev.git
home.dev.info
home.dev.network
home.dev.vcs
];
};
networking.hostName = "hetzner-vm";
time.timeZone = "Europe/London";
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL4L1eBZzYXZNGBucTn/eOFp48el9JPiYt9iXQDpBSg/ chaoticryptidz@owo.monster"
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
system.stateVersion = "21.11";
}

View file

@ -1,25 +0,0 @@
{ tree, config, pkgs, inputs, lib, ... }:
{
imports = with tree;
[
users.chaoticryptidz
profiles.network_manager
profiles.dnscrypt
profiles.sshd
];
users.users.root.password = "nixos";
services.openssh.permitRootLogin = lib.mkForce "yes";
home-manager.users.root = { imports = with tree; [ home.base ]; };
home-manager.users.chaoticryptidz = {
imports = with tree; [ home.base home.dev home.network_manager ];
};
networking.hostName = "pinetab";
time.timeZone = "Europe/London";
system.stateVersion = "21.11";
}

View file

@ -17,13 +17,6 @@ in {
#legacyPackages.tree = tree;
nixosConfigurations = import ./hosts ({ inherit tree; } // inputs);
pinetab-disk-image =
(import "${mobile-nixos}/lib/eval-with-configuration.nix" {
configuration = [tree.impure.hosts.pinetab];
device = "pine64-pinetab";
pkgs = nixpkgs.legacyPackages.aarch64-linux;
}).outputs.disk-image;
deploy.nodes.lappy = {
hostname = "localhost";
profiles.system = {
@ -32,4 +25,13 @@ in {
self.nixosConfigurations.lappy;
};
};
deploy.nodes.hetzner-vm = {
hostname = "65.21.182.73";
username = "root"
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.hetzner-vm;
};
};
}