1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00
config/modules/common/custom-options.nix

24 lines
626 B
Nix

{ config, lib, pkgs, ... }: let
inherit (lib) mkOption types;
in {
options = {
onLinux = mkOption {
type = types.bool;
default = pkgs.stdenv.isLinux;
description = "Whether the system is running on Linux";
};
isDarwin = mkOption {
type = types.bool;
default = pkgs.stdenv.isDarwin;
description = "Whether the system is running on Darwin (macOS)";
};
isServer = mkOption {
type = types.bool;
default = config.nixpkgs.hostPlatform.isAarch64;
description = "Whether the system is a server. Determined by the processor architecture.";
};
};
}