refactor: better macOS exclusive options

This commit is contained in:
winston 2024-02-18 13:49:48 +01:00
parent c286c8b963
commit c9864074f9
Signed by: winston
GPG key ID: 3786770EDBC2B481
3 changed files with 9 additions and 8 deletions

View file

@ -1,4 +1,5 @@
{lib, ...}: {
imports = [./options.nix];
# manipulate the global /etc/zshenv for PATH, etc.
programs.zsh.enable = true;

View file

@ -0,0 +1,8 @@
{lib, ...}: let
inherit (lib) mkOption types;
in {
options.location = {
latitude = mkOption {type = types.nullOr types.float;};
longitude = mkOption {type = types.nullOr types.float;};
};
}

View file

@ -74,14 +74,6 @@
./${host}
home-manager.${module}.home-manager
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
{
options.location = {
latitude = mkOption {type = types.nullOr types.float;};
longitude = mkOption {type = types.nullOr types.float;};
};
}
]
++ [(hmCommonConfig {inherit username;})]
++ extraModules;
specialArgs = {inherit inputs;};