Skip to content

Commit

Permalink
feat(nix/hosts): introduce large marker
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesegfault committed Oct 12, 2023
1 parent 8444d12 commit e5eabfb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nix/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ let
, pubkey ? null
, homeDirectory ? null
, remoteBuild ? true
, large ? false
}:
if type == "nixos" then
assert address != null && pubkey != null;
assert (hasSuffix "linux" hostPlatform);
{
inherit type hostPlatform address pubkey remoteBuild;
inherit type hostPlatform address pubkey remoteBuild large;
}
else if type == "darwin" then
assert pubkey != null;
assert (hasSuffix "darwin" hostPlatform);
{
inherit type hostPlatform pubkey;
inherit type hostPlatform pubkey large;
}
else if type == "home-manager" then
assert homeDirectory != null;
{
inherit type hostPlatform homeDirectory;
inherit type hostPlatform homeDirectory large;
}
else throw "unknown host type '${type}'";
in
Expand Down Expand Up @@ -99,5 +100,6 @@ in
address = "100.68.240.30";
hostPlatform = "x86_64-linux";
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDUZPmPTATZ4nBWstPqlUiguvxr26XWAE9BGPVNNRBR5";
large = true;
};
}

0 comments on commit e5eabfb

Please sign in to comment.