refactor: better macOS exclusive options
This commit is contained in:
parent
c286c8b963
commit
c9864074f9
3 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
|
imports = [./options.nix];
|
||||||
# manipulate the global /etc/zshenv for PATH, etc.
|
# manipulate the global /etc/zshenv for PATH, etc.
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
|
8
machines/common/darwin/options.nix
Normal file
8
machines/common/darwin/options.nix
Normal 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;};
|
||||||
|
};
|
||||||
|
}
|
|
@ -74,14 +74,6 @@
|
||||||
./${host}
|
./${host}
|
||||||
home-manager.${module}.home-manager
|
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;})]
|
++ [(hmCommonConfig {inherit username;})]
|
||||||
++ extraModules;
|
++ extraModules;
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
|
|
Loading…
Reference in a new issue