{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; hyprland.url = "github:hyprwm/Hyprland"; hermes-agent.url = "github:NousResearch/hermes-agent"; agenix.url = "github:ryantm/agenix"; hjem = { url = "github:feel-co/hjem"; inputs.nixpkgs.follows = "nixpkgs"; }; hjem-rum = { url = "github:snugnug/hjem-rum"; inputs.nixpkgs.follows = "nixpkgs"; inputs.hjem.follows = "hjem"; }; }; outputs = { self, nixpkgs, ... }@inputs: let system = "x86_64-linux"; username = "poslop"; lib = nixpkgs.lib; # mkHost # roles resolve to ./roles/.nix; list entries may also be # inline attrsets or paths, which load after (and override) roles. # hosts//custom.nix, if present, always loads last. mkHost = name: roles: nixpkgs.lib.nixosSystem { modules = [ { nixpkgs.hostPlatform = system; } ] ++ [ ./hosts/${name}/configuration.nix ] ++ map ( role: if builtins.isString role then ./roles/${role}.nix else role ) roles ++ lib.optional (builtins.pathExists ./hosts/${name}/custom.nix) ./hosts/${name}/custom.nix; specialArgs = { inherit self inputs username ; host = name; }; }; in { nixosConfigurations = { nixos-vm2 = mkHost "nixos-vm2" [ "core" ]; qemu-vm = mkHost "qemu-vm" [ "core" ]; goyplex-vm = mkHost "goyplex-vm" [ "k3s-server" ]; hermes-vm = mkHost "hermes-vm" [ "hermes" ]; }; }; }