diff --git a/flake.nix b/flake.nix index d6c0334d..fc09811c 100644 --- a/flake.nix +++ b/flake.nix @@ -37,7 +37,7 @@ in { nixosConfigurations = { # Virtual - osaka-vultr-01 = libx.mkSmallHost { hostname = "osaka-vultr-01"; }; + osaka-vultr-01 = libx.mkHost { hostname = "osaka-vultr-01"; type = "small";}; nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; }; # Physical framework-server = libx.mkHost { hostname = "framework-server"; }; diff --git a/lib/default.nix b/lib/default.nix index 88e907c9..b9178802 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -22,32 +22,18 @@ desktop ? null, gpu ? null, platform ? "x86_64-linux", - theme ? "default" + theme ? "default", + type ? "default" }: inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; modules = [ - ../nixos + # Types are 'default', 'small', and 'minimal' + ../nixos/${type}.nix inputs.sops-nix.nixosModules.sops inputs.lanzaboote.nixosModules.lanzaboote ]; }; - # Helper function for generating host configs - mkSmallHost = { - hostname, - username ? "albert", - desktop ? null, - gpu ? null, - platform ? "x86_64-linux", - theme ? "default" - }: inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; - modules = [ - ../nixos/small.nix - inputs.sops-nix.nixosModules.sops - ]; - }; - # Combines mkHost and mkHome for image building mkImage = { hostname ,