add vm named hugo

Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2021-12-22 11:57:09 -05:00
parent f21903d83d
commit 8ac09a92e9
4 changed files with 54 additions and 2 deletions

5
deploy Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
nix run github:serokell/deploy-rs

View File

@ -20,7 +20,8 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
({ config, ... }: { ({ config, ... }: {
system.configurationRevision = self.sourceInfo.rev; system.configurationRevision = self.sourceInfo.rev;
services.getty.greetingLine = ''<<< Welcome to NixOS ${config.system.nixos.label} @ ${self.sourceInfo.rev} - \l >>>''; services.getty.greetingLine =
"<<< Welcome to NixOS ${config.system.nixos.label} @ ${self.sourceInfo.rev} - \\l >>>";
}) })
] ++ extraModules; ] ++ extraModules;
}; };
@ -32,7 +33,13 @@
]; ];
}; };
nixosConfigurations.logos = mkSystem [ ./hosts/logos ./hardware/alrest ]; nixosConfigurations = {
logos = mkSystem [ ./hosts/logos ./hardware/alrest ];
# vms
## logos
hugo = mkSystem [ ./hosts/vm/hugo ./hardware/libvirt-generic ];
};
deploy.nodes.logos = { deploy.nodes.logos = {
hostname = "192.168.2.35"; hostname = "192.168.2.35";
@ -46,6 +53,18 @@
}; };
}; };
deploy.nodes.hugo = {
hostname = "10.77.129.6";
sshUser = "root";
fastConnection = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.hugo;
};
};
# This is highly advised, and will prevent many possible mistakes # This is highly advised, and will prevent many possible mistakes
checks = builtins.mapAttrs checks = builtins.mapAttrs
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;

View File

@ -0,0 +1,25 @@
{ config, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ../../common ];
services.openssh.enable = true;
boot.initrd.availableKernelModules =
[ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/vda";
nixpkgs.config.allowUnfree = true;
fileSystems."/" = {
device = "/dev/vda1";
fsType = "ext4";
};
services.qemuGuest.enable = true;
}

View File

@ -0,0 +1,3 @@
{ ... }: {
networking.hostName = "hugo";
}