aboutsummaryrefslogtreecommitdiff
path: root/nix/lib/machine-utils.nix
blob: 65012574c3ff6b50da9cfa227595bf298f444f35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, ... }:

let
  # Simple function to check if a machine is of a specific type
  isMachineType =
    machineType: systemName:
    let
      workMachines = [ "hq-kwny2vh41p" ];
      personalMachines = [ "mba-m2" ];
    in
    if machineType == "work" then
      lib.elem systemName workMachines
    else if machineType == "personal" then
      lib.elem systemName personalMachines
    else
      false;
in
{
  inherit isMachineType;
}