Skip to content

Commit

Permalink
Merge pull request #764 from kylerisse/dev_server_monitoring
Browse files Browse the repository at this point in the history
Add libvirtd to devServer and update Kyle's keys
  • Loading branch information
sarcasticadmin authored Sep 21, 2024
2 parents 878ed17 + 5277ede commit 9db37cb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
6 changes: 5 additions & 1 deletion nix/machines/_common/users.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
isNormalUser = true;
uid = 2007;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMlEPbMnefiPfCTKb9lOzPzfnOVAohO08myWWMm9EJxZ" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPcTYYr/TGH4vRCaY4WU4Qc7RlzzBOHv2XYxGwCzV+fg p"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKX8NM1OQECwhNTQE0qAm422uq9L0i0Y/hvPPc4tHIOX a"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMlEPbMnefiPfCTKb9lOzPzfnOVAohO08myWWMm9EJxZ"
];
};
ruebenramirez = {
isNormalUser = true;
Expand Down
3 changes: 3 additions & 0 deletions nix/machines/devServer/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ config, pkgs, ... }:

{
imports = [
./libvirt.nix
];
# remove the annoying experimental warnings
nix.extraOptions = ''
experimental-features = nix-command flakes
Expand Down
4 changes: 2 additions & 2 deletions nix/machines/devServer/hardware-configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{ devices = [ "nodev" ]; path = "/boot"; }
{ devices = [ "nodev" ]; path = "/boot2"; }
{ devices = [ "nodev" ]; path = "/boot"; }
{ devices = [ "nodev" ]; path = "/boot2"; }
];
};

Expand Down
17 changes: 17 additions & 0 deletions nix/machines/devServer/libvirt.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ config, ... }:
{
security.polkit.enable = true;

virtualisation.libvirtd = {
enable = true;
qemu = {
ovmf.enable = true;
runAsRoot = false;
};
onBoot = "ignore";
onShutdown = "shutdown";
};

# Add any users in the 'wheel' group to the 'libvirt' group.
users.groups.libvirt.members = builtins.filter (x: builtins.elem "wheel" config.users.users."${x}".extraGroups) (builtins.attrNames config.users.users);
}

0 comments on commit 9db37cb

Please sign in to comment.