nix/darwin/default.nix
2025-04-05 02:14:48 -05:00

63 lines
1.5 KiB
Nix

{
inputs,
lib,
config,
pkgs,
system,
host,
...
}: {
imports = [
./aerospace.nix
./homebrew.nix
./keyboard.nix
];
options.custom = with lib; {
shell = {
packages = mkOption {
type =
with types;
attrsOf (oneOf [
str
attrs
package
]);
apply = custom.mkShellPackages;
default = { };
description = ''
Attrset of shell packages to install and add to pkgs.custom overlay (for compatibility across multiple shells).
Both string and attr values will be passed as arguments to writeShellApplicationCompletions
'';
example = ''
shell.packages = {
myPackage1 = "echo 'Hello, World!'";
myPackage2 = {
runtimeInputs = [ pkgs.hello ];
text = "hello --greeting 'Hi'";
};
}
'';
};
};
symlinks = mkOption {
type = types.attrsOf types.str;
default = { };
description = "Symlinks to create in the format { dest = src;}";
};
};
config = {
# networking
# networking.hostName = host;
# networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName);
# networking.networkmanager.enable = true;
environment.systemPackages = with pkgs; [
vim
htop
] ++ (lib.attrValues config.custom.shell.packages);
system.stateVersion = 6;
};
}