forked from mirrors_public/oddlama_nix-config
feat: switch from colmena.makeHive to nixosSystem
This commit is contained in:
parent
e30f2a1c38
commit
c89e6d8df3
8 changed files with 130 additions and 127 deletions
|
@ -1,6 +1,15 @@
|
|||
{
|
||||
{inputs, ...}: {
|
||||
disabledModules = ["services/security/kanidm.nix"];
|
||||
imports = [
|
||||
inputs.agenix-rekey.nixosModules.default
|
||||
inputs.agenix.nixosModules.default
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.elewrap.nixosModules.default
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.nixos-nftables-firewall.nixosModules.default
|
||||
inputs.nixseparatedebuginfod.nixosModules.default
|
||||
|
||||
../users/root
|
||||
|
||||
./config/boot.nix
|
||||
|
@ -38,4 +47,9 @@
|
|||
|
||||
./system/deteministic-ids.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.microvm.overlay
|
||||
inputs.nixpkgs-wayland.overlay
|
||||
];
|
||||
}
|
||||
|
|
|
@ -84,23 +84,21 @@
|
|||
};
|
||||
|
||||
microvm.vms.${vmName} = let
|
||||
node = import ../../nix/generate-node.nix inputs {
|
||||
name = vmCfg.nodeName;
|
||||
inherit (vmCfg) system;
|
||||
};
|
||||
mac = (net.mac.assignMacs "02:01:27:00:00:00" 24 [] (attrNames vms)).${vmName};
|
||||
in {
|
||||
# Allow children microvms to know which node is their parent
|
||||
specialArgs =
|
||||
{
|
||||
parentNode = config;
|
||||
parentNodeName = nodeName;
|
||||
}
|
||||
// node.specialArgs;
|
||||
inherit (node) pkgs;
|
||||
specialArgs = {
|
||||
parentNode = config;
|
||||
parentNodeName = nodeName;
|
||||
inherit (inputs.self) nodes;
|
||||
inherit (inputs.self.pkgs.${vmCfg.system}) lib;
|
||||
inherit inputs;
|
||||
};
|
||||
pkgs = inputs.self.pkgs.${vmCfg.system};
|
||||
inherit (vmCfg) autostart;
|
||||
config = {config, ...}: {
|
||||
imports = cfg.commonImports ++ node.imports ++ vmCfg.modules;
|
||||
imports = cfg.commonImports ++ vmCfg.modules;
|
||||
node.name = vmCfg.nodeName;
|
||||
|
||||
lib.microvm.mac = mac;
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
services = {
|
||||
fwupd.enable = true;
|
||||
smartd.enable = true;
|
||||
thermald.enable = builtins.elem config.nixpkgs.system ["x86_64-linux"];
|
||||
thermald.enable = builtins.elem config.nixpkgs.hostPlatform.system ["x86_64-linux"];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue