ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
{ config, pkgs, lib, ... }:

{

  system.activationScripts.extraUserActivation.text = ''
    # Set defaults for panes in Finder's "Get Info"
    defaults write com.apple.finder FXInfoPanesExpanded -dict \
      General -bool true \
      OpenWith -bool true \
      Privileges -bool true \
      Preview -bool false
  '';

  system.defaults.CustomUserPreferences = {
    # Avoid creating .DS_Store files on network or USB volumes
    "com.apple.desktopservices" = {
      DSDontWriteNetworkStores = true;
      DSDontWriteUSBStores     = true;
    };

    # Automatically open a new Finder window when a volume is mounted
    "com.apple.finder".OpenWindowForNewRemovableDisk = true;
    "com.apple.frameworks.diskimages" = {
      auto-open-ro-root = true;
      auto-open-rw-root = true;
    };

    "com.apple.finder" = {
      # Set defaults for panes in Finder's "Get Info"
      #FXInfoPanesExpanded = {
      #  General    = true;
      #  OpenWith   = true;
      #  Privileges = true;
      #  Preview    = false;
      #};

      # disable animation when opening the info window in finder (CMD + I)
      DisableAllAnimations = true;

      # keep folders on top when sorting by name
      "_FXSortFoldersFirst" = true;

      # Set $HOME as the default location for new Finder windows
      NewWindowTarget     = "PfLo";
      NewWindowTargetPath = "file://${config.home-manager.users.katja.home.homeDirectory}";
    };
  };

  system.defaults = {
    NSGlobalDomain = {
      AppleShowAllExtensions = true;

      # Save to disk (not to iCloud!) by default
      NSDocumentSaveNewDocumentsToCloud    = false;

      # Expand save panel by default
      NSNavPanelExpandedStateForSaveMode   = true;
      NSNavPanelExpandedStateForSaveMode2  = true;

      # Enable spring loading for directories
      "com.apple.springing.enabled"        = true;
      # Remove the spring loading delay for directories
      "com.apple.springing.delay"          = 0.0;
    };

    LaunchServices = {
      # disable "Application Downloaded from Internet" popup
      LSQuarantine = false;
    };

    finder = {
      #allow quitting the finder
      QuitMenuItem                   = true;
      # always show file-extensions
      AppleShowAllExtensions         = true;
      # No icons on desktop
      CreateDesktop                  = false;
      # show statusbar at the bottom of the finder window
      ShowStatusBar                  = true;
      # no brotkrümel in finder pls
      ShowPathbar                    = false;
      # default view style ("icnv" = Icon view, "Nlsv" = List view, "clmv" = Column View, "Flwv" = Gallery View)
      FXPreferredViewStyle           = "Nlsv";
      # default search scope ("SCcf" = current folder; null = This Mac)
      FXDefaultSearchScope           = "SCcf";
      # no warning when changing the file extension
      FXEnableExtensionChangeWarning = false;
    };
  };

}