Netbird Changes + virt-manager

This commit is contained in:
Annika Merris 2024-08-27 14:37:35 -04:00
parent 646e294880
commit 93edbaf48d
5 changed files with 28 additions and 1 deletions

View file

@ -81,6 +81,7 @@ inputs.nixpkgs.lib.nixosSystem {
platformio.enable = true;
python3.enable = true;
vscode.enable = true;
virt-manager.enable = true;
# Utilities
# git is not optional
docker.enable = true;

View file

@ -14,6 +14,13 @@
'';
default = "";
};
setup_key_file = lib.mkOption {
type = lib.types.str;
description = ''
Path to a file containing a setup key obtained from the Management Service Dashboard (used to register peer)
'';
default = "";
};
management_url = lib.mkOption {
type = lib.types.str;
description = ''
@ -48,6 +55,9 @@
(lib.mkIf (config.netbird.opts.setup_key != "") {
NB_SETUP_KEY = config.netbird.opts.setup_key;
})
(lib.mkIf(config.netbird.opts.setup_key_file != "") {
NB_SETUP_KEY_FILE = config.netbird.opts.setup_key_file;
})
]);
};
}

View file

@ -2,5 +2,6 @@
{
imports = [
./gui.nix
./virt-manager.nix
];
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
options = {
virt-manager = {
enable = lib.mkEnableOption {
description = "Enable virtualization and virt-manager";
default = false;
};
};
};
config = lib.mkIf (config.virt-manager.enable) {
virtualization.libvirtd.enable = true;
programs.virt-manager.enable = true;
};
}

View file

@ -6,7 +6,7 @@
isNormalUser = true;
home = "/home/annika";
description = "Annika Merris";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [ "networkmanager" "wheel", "libvirtd" ];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG9NhsAOBwWBdBeenfaPoRtqQrAIgg7E5m4sKYQU9cFx annika@kim" ];
hashedPasswordFile = config.sops.secrets.annika_password.path;
};