refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
32
modules/darwin/system/fonts/default.nix
Normal file
32
modules/darwin/system/fonts/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.system.fonts;
|
||||
in
|
||||
{
|
||||
options.plusultra.system.fonts = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to manage fonts.";
|
||||
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.variables = {
|
||||
# Enable icons in tooling since we have nerdfonts.
|
||||
LOG_ICONS = "true";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fontDir = enabled;
|
||||
|
||||
fonts = with pkgs;
|
||||
[
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
(nerdfonts.override { fonts = [ "Hack" ]; })
|
||||
] ++ cfg.fonts;
|
||||
};
|
||||
};
|
||||
}
|
1
modules/darwin/system/input/DefaultKeyBinding.dict
Normal file
1
modules/darwin/system/input/DefaultKeyBinding.dict
Normal file
|
@ -0,0 +1 @@
|
|||
{ "~a" = (); "~b" = (); "~c" = (); "~d" = (); "~e" = (); "~f" = (); "~g" = (); "~h" = (); "~i" = (); "~j" = (); "~k" = (); "~l" = (); "~m" = (); "~n" = (); "~o" = (); "~p" = (); "~q" = (); "~r" = (); "~s" = (); "~t" = (); "~u" = (); "~v" = (); "~w" = (); "~x" = (); "~y" = (); "~z" = (); }
|
55
modules/darwin/system/input/default.nix
Normal file
55
modules/darwin/system/input/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.system.input;
|
||||
in
|
||||
{
|
||||
options.plusultra.system.input = with types; {
|
||||
enable = mkEnableOption "macOS input";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
system = {
|
||||
keyboard = {
|
||||
enableKeyMapping = true;
|
||||
remapCapsLockToEscape = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
".GlobalPreferences" = {
|
||||
"com.apple.mouse.scaling" = "1";
|
||||
};
|
||||
|
||||
NSGlobalDomain = {
|
||||
AppleKeyboardUIMode = 3;
|
||||
ApplePressAndHoldEnabled = false;
|
||||
|
||||
KeyRepeat = 2;
|
||||
InitialKeyRepeat = 15;
|
||||
|
||||
NSAutomaticCapitalizationEnabled = false;
|
||||
NSAutomaticDashSubstitutionEnabled = false;
|
||||
NSAutomaticQuoteSubstitutionEnabled = false;
|
||||
NSAutomaticPeriodSubstitutionEnabled = false;
|
||||
NSAutomaticSpellingCorrectionEnabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
snowfallorg.user.${config.plusultra.user.name}.home.config = {
|
||||
home.activation = {
|
||||
# Disable special keys when using Option as a modifier.
|
||||
# https://superuser.com/questions/941286/disable-default-option-key-binding
|
||||
disableSpecialKeys = lib.home-manager.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
set +e
|
||||
$DRY_RUN_CMD /usr/bin/sudo mkdir -p $HOME/Library/KeyBindings
|
||||
$DRY_RUN_CMD /usr/bin/sudo cp '${builtins.toPath ./DefaultKeyBinding.dict}' "$HOME/Library/KeyBindings/DefaultKeyBinding.dict"
|
||||
set -e
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
29
modules/darwin/system/interface/default.nix
Normal file
29
modules/darwin/system/interface/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let cfg = config.plusultra.system.interface;
|
||||
in
|
||||
{
|
||||
options.plusultra.system.interface = with types; {
|
||||
enable = mkEnableOption "macOS interface";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
system.defaults = {
|
||||
dock.autohide = true;
|
||||
|
||||
finder = {
|
||||
AppleShowAllExtensions = true;
|
||||
FXEnableExtensionChangeWarning = false;
|
||||
};
|
||||
|
||||
NSGlobalDomain = {
|
||||
_HIHideMenuBar = true;
|
||||
AppleShowScrollBars = "Always";
|
||||
};
|
||||
};
|
||||
|
||||
plusultra.home.file.".hushlogin".text = "";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue