Skip to content

Commit

Permalink
home-manager/darwin: convert to module
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Sep 29, 2023
1 parent ddf9b96 commit ee9628f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 29 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
})
(mkHomeConfig {
hostname = "home-macos";
configuration = ./home-manager/macos.nix;
system = "x86_64-darwin";
homePath = "/Users";
})
Expand Down
33 changes: 33 additions & 0 deletions home-manager/darwin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:

{
options.home-manager.darwin.enable = lib.mkEnableOption "Darwin config" // {
default = pkgs.stdenv.isDarwin;
};

config = lib.mkIf config.home-manager.darwin.enable {
home-manager = {
dev.enable = lib.mkDefault true;
editor.emacs.enable = lib.mkDefault true;
};

targets.darwin.defaults = {
# Disable all automatic substitution
NSGlobalDomain = {
NSAutomaticCapitalizationEnabled = false;
NSAutomaticDashSubstitutionEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticQuoteSubstitutionEnabled = false;
NSAutomaticSpellingCorrectionEnabled = false;
};
# Do not write .DS_Store files outside macOS
com.apple.desktopservices = {
DSDontWriteNetworkStores = true;
DSDontWriteUSBStores = true;
};
# Disable mouse acceleration
com.apple.mouse.scalling = -1;
# com.apple.trackpad.scalling = -1;
};
};
}
1 change: 1 addition & 0 deletions home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
imports = [
../modules
./cli
./darwin.nix
./desktop
./dev
./editor
Expand Down
28 changes: 0 additions & 28 deletions home-manager/macos.nix

This file was deleted.

0 comments on commit ee9628f

Please sign in to comment.