home reorg

This commit is contained in:
willemml 2023-02-08 15:33:54 -08:00
parent c496b8f223
commit 63567f0d06
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
7 changed files with 240 additions and 233 deletions

View file

@ -16,8 +16,9 @@ let
web = "Safari"; web = "Safari";
zotero = "Zotero"; zotero = "Zotero";
}; };
in { in
imports = [ ./launchd.nix ]; {
imports = [ ./launchd.nix ./iterm2.nix ./finder.nix ];
home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin '' home.file.".gnupg/gpg-agent.conf".text = mkIf stdenv.isDarwin ''
pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid" pinentry-program "${pkgs.pinentry-touchid}/bin/pinentry-touchid"
@ -35,7 +36,6 @@ in {
}; };
programs.zsh.shellAliases = mkIf stdenv.isDarwin ({ programs.zsh.shellAliases = mkIf stdenv.isDarwin ({
am = lib.mkIf pkgs.stdenv.isDarwin "zsh ~/.config/zsh/am.sh";
o = "open"; o = "open";
oa = "open -a"; oa = "open -a";
pinentry = "pinentry-mac"; pinentry = "pinentry-mac";
@ -46,8 +46,6 @@ in {
targets.darwin = { targets.darwin = {
defaults = { defaults = {
"com.googlecode.iterm2" = import ./iterm2.nix;
"com.apple.finder" = import ./finder.nix;
NSGlobalDomain = { NSGlobalDomain = {
AppleLanguages = [ "en-CA" ]; AppleLanguages = [ "en-CA" ];
AppleLocale = "en_CA"; AppleLocale = "en_CA";

View file

@ -1,164 +0,0 @@
let
columnSettings = {
name = {
visible = true;
width = 300;
index = 1;
};
dateModified = {
visible = true;
width = 150;
index = 2;
};
dateCreated = {
visible = true;
width = 150;
index = 3;
};
size = {
visible = true;
index = 4;
width = 100;
};
dateLastOpened = {
visible = true;
width = 150;
index = 5;
};
kind = {
visible = true;
width = 100;
index = 6;
};
comments = {
visible = false;
width = 200;
index = 7;
};
label = {
visible = false;
width = 50;
index = 8;
};
version = {
visible = false;
width = 50;
index = 9;
};
};
listviewsettings = {
calculateAllSizes = true;
showIconPreview = true;
iconSize = 16;
textSize = 13;
sortColumn = "name";
useRelativeDates = true;
viewOptionsVersion = 1;
};
default-view-settings = {
ExtendedListViewSettingsV2 = {
columns = builtins.sort (a: b: a.index < b.index) (map (name:
(name: value: {
identifier = "${name}";
visible = value.visible;
width = value.width;
index = value.index;
}) name columnSettings.${name}) (builtins.attrNames columnSettings));
} // listviewsettings;
ListViewSettings = { columns = columnSettings; } // listviewsettings;
};
dvs-with-ws = {
WindowState = {
ContainerShowSidebar = true;
ShowStatusBar = true;
ShowSidebar = true;
ShowToolbar = true;
ShowTabView = true;
};
} // default-view-settings;
in {
AppleShowAllExtensions = true;
ComputerViewSettings = dvs-with-ws;
CreateDesktop = false;
DesktopViewSettings = { GroupBy = "Kind"; };
FinderSpawnTab = false;
FK_DefaultListViewSettingsV2 =
default-view-settings.ExtendedListViewSettingsV2;
FK_StandardViewSettings = {
SettingsType = "FK_StandardViewSettings";
} // default-view-settings;
FK_iCloudListViewSettingsV2 =
default-view-settings.ExtendedListViewSettingsV2;
FXArrangeGroupViewBy = "Name";
FXDefaultSearchScope = "SCsp";
FXEnableExtensionChangeWarning = false;
FXEnableRemoveFromICloudDriveWarning = false;
FXICloudDriveDocuments = true;
FXICloudDriveEnabled = true;
FXPreferredGroupBy = "Kind";
FXPreferredViewStyle = "Nlsv";
GoToField = "~/Library/";
ICloudViewSettings = dvs-with-ws;
NetworkViewSettings = dvs-with-ws;
NSDocumentSaveNewDocumentsToCloud = false;
NSTableViewDefaultSizeMode = 1;
PackageViewSettings = dvs-with-ws;
RecentsArrangeGroupViewBy = "Date Last Opened";
SearchViewSettings = dvs-with-ws;
ShowExternalHardDrivesOnDesktop = false;
ShowHardDrivesOnDesktop = false;
ShowPathbar = true;
ShowRemovableMediaOnDesktop = false;
ShowSidebar = true;
showWindowTitlebarIcons = false;
SidebarWidth = 135;
SidebarZoneOrder1 = [ "icloud_drive" "favorites" "devices" "tags" ];
StandardViewSettings = {
SettingsType = "StandardViewSettings";
} // default-view-settings;
TrashViewSettings = dvs-with-ws;
WarnOnEmptyTrash = false;
_FXShowPosixPathInTitle = true;
_FXSortFoldersFirst = true;
_FXSortFoldersFirstOnDesktop = true;
}

View file

@ -43,5 +43,5 @@ rec {
username = "willem"; username = "willem";
}; };
imports = [ ./emacs.nix ./packages.nix ./programs.nix ./darwin ]; imports = [ ./emacs.nix ./packages.nix ./programs.nix ./darwin.nix ];
} }

170
home/finder.nix Normal file
View file

@ -0,0 +1,170 @@
let
columnSettings = {
name = {
visible = true;
width = 300;
index = 1;
};
dateModified = {
visible = true;
width = 150;
index = 2;
};
dateCreated = {
visible = true;
width = 150;
index = 3;
};
size = {
visible = true;
index = 4;
width = 100;
};
dateLastOpened = {
visible = true;
width = 150;
index = 5;
};
kind = {
visible = true;
width = 100;
index = 6;
};
comments = {
visible = false;
width = 200;
index = 7;
};
label = {
visible = false;
width = 50;
index = 8;
};
version = {
visible = false;
width = 50;
index = 9;
};
};
listviewsettings = {
calculateAllSizes = true;
showIconPreview = true;
iconSize = 16;
textSize = 13;
sortColumn = "name";
useRelativeDates = true;
viewOptionsVersion = 1;
};
default-view-settings = {
ExtendedListViewSettingsV2 = {
columns = builtins.sort (a: b: a.index < b.index) (map
(name:
(name: value: {
identifier = "${name}";
visible = value.visible;
width = value.width;
index = value.index;
}) name
columnSettings.${name})
(builtins.attrNames columnSettings));
} // listviewsettings;
ListViewSettings = { columns = columnSettings; } // listviewsettings;
};
dvs-with-ws = {
WindowState = {
ContainerShowSidebar = true;
ShowStatusBar = true;
ShowSidebar = true;
ShowToolbar = true;
ShowTabView = true;
};
} // default-view-settings;
in
{
targets.darwin.defaults."com.apple.finder" = {
AppleShowAllExtensions = true;
ComputerViewSettings = dvs-with-ws;
CreateDesktop = false;
DesktopViewSettings = { GroupBy = "Kind"; };
FinderSpawnTab = false;
FK_DefaultListViewSettingsV2 =
default-view-settings.ExtendedListViewSettingsV2;
FK_StandardViewSettings = {
SettingsType = "FK_StandardViewSettings";
} // default-view-settings;
FK_iCloudListViewSettingsV2 =
default-view-settings.ExtendedListViewSettingsV2;
FXArrangeGroupViewBy = "Name";
FXDefaultSearchScope = "SCsp";
FXEnableExtensionChangeWarning = false;
FXEnableRemoveFromICloudDriveWarning = false;
FXICloudDriveDocuments = true;
FXICloudDriveEnabled = true;
FXPreferredGroupBy = "Kind";
FXPreferredViewStyle = "Nlsv";
GoToField = "~/Library/";
ICloudViewSettings = dvs-with-ws;
NetworkViewSettings = dvs-with-ws;
NSDocumentSaveNewDocumentsToCloud = false;
NSTableViewDefaultSizeMode = 1;
PackageViewSettings = dvs-with-ws;
RecentsArrangeGroupViewBy = "Date Last Opened";
SearchViewSettings = dvs-with-ws;
ShowExternalHardDrivesOnDesktop = false;
ShowHardDrivesOnDesktop = false;
ShowPathbar = true;
ShowRemovableMediaOnDesktop = false;
ShowSidebar = true;
showWindowTitlebarIcons = false;
SidebarWidth = 135;
SidebarZoneOrder1 = [ "icloud_drive" "favorites" "devices" "tags" ];
StandardViewSettings = {
SettingsType = "StandardViewSettings";
} // default-view-settings;
TrashViewSettings = dvs-with-ws;
WarnOnEmptyTrash = false;
_FXShowPosixPathInTitle = true;
_FXSortFoldersFirst = true;
_FXSortFoldersFirstOnDesktop = true;
};
}

View file

@ -226,60 +226,63 @@ let
"Visual Bell" = true; "Visual Bell" = true;
"Window Type" = 0; "Window Type" = 0;
} // dracula_plus; } // dracula_plus;
in { in
"AlternateMouseScroll" = true; {
"Default Bookmark Guid" = "30FFD0AB-B2EB-4635-9469-D089C1D9E106"; targets.darwin.defaults."com.googlecode.iterm2" = {
"HotkeyMigratedFromSingleToMulti" = true; "AlternateMouseScroll" = true;
"LeftCommand" = 7; "Default Bookmark Guid" = "30FFD0AB-B2EB-4635-9469-D089C1D9E106";
"LeftOption" = 2; "HotkeyMigratedFromSingleToMulti" = true;
"ShowFullScreenTabBar" = false; "LeftCommand" = 7;
"SoundForEsc" = false; "LeftOption" = 2;
"SUEnableAutomaticChecks" = false; "ShowFullScreenTabBar" = false;
"SUHasLaunchedBefore" = true; "SoundForEsc" = false;
"VisualIndicatorForEsc" = false; "SUEnableAutomaticChecks" = false;
"New Bookmarks" = [ "SUHasLaunchedBefore" = true;
({ "VisualIndicatorForEsc" = false;
"Columns" = 120; "New Bookmarks" = [
"Command" = ""; ({
"Custom Command" = "No"; "Columns" = 120;
"Custom Directory" = "No"; "Command" = "";
"Default Bookmark" = "Yes"; "Custom Command" = "No";
"Description" = "Default"; "Custom Directory" = "No";
"Guid" = "30FFD0AB-B2EB-4635-9469-D089C1D9E106"; "Default Bookmark" = "Yes";
"Name" = "Primary"; "Description" = "Default";
"Rows" = 30; "Guid" = "30FFD0AB-B2EB-4635-9469-D089C1D9E106";
"Screen" = -1; "Name" = "Primary";
"Tags" = [ ]; "Rows" = 30;
"Working Directory" = "/Users/willem"; "Screen" = -1;
} // profile_defaults) "Tags" = [ ];
({ "Working Directory" = "/Users/willem";
"Columns" = 120; } // profile_defaults)
"Command" = ""; ({
"Custom Command" = "No"; "Columns" = 120;
"Custom Directory" = "No"; "Command" = "";
"Default Bookmark" = "No"; "Custom Command" = "No";
"Description" = "Default"; "Custom Directory" = "No";
"Disable Window Resizing" = true; "Default Bookmark" = "No";
"Guid" = "00A17AC2-1885-4AE2-B941-A47A5D8C36B4"; "Description" = "Default";
"Has Hotkey" = true; "Disable Window Resizing" = true;
"HotKey Activated By Modifier" = false; "Guid" = "00A17AC2-1885-4AE2-B941-A47A5D8C36B4";
"HotKey Alternate Shortcuts" = { }; "Has Hotkey" = true;
"HotKey Characters Ignoring Modifiers" = " "; "HotKey Activated By Modifier" = false;
"HotKey Characters" = " "; "HotKey Alternate Shortcuts" = { };
"HotKey Key Code" = 49; "HotKey Characters Ignoring Modifiers" = " ";
"HotKey Modifier Activation" = 3; "HotKey Characters" = " ";
"HotKey Modifier Flags" = 1048576; "HotKey Key Code" = 49;
"HotKey Window Animates" = false; "HotKey Modifier Activation" = 3;
"HotKey Window AutoHides" = true; "HotKey Modifier Flags" = 1048576;
"HotKey Window Dock Click Action" = 0; "HotKey Window Animates" = false;
"HotKey Window Floats" = true; "HotKey Window AutoHides" = true;
"HotKey Window Reopens On Activation" = false; "HotKey Window Dock Click Action" = 0;
"Name" = "Hotkey Window"; "HotKey Window Floats" = true;
"Rows" = 25; "HotKey Window Reopens On Activation" = false;
"Screen" = -1; "Name" = "Hotkey Window";
"Space" = -1; "Rows" = 25;
"Tags" = [ ]; "Screen" = -1;
"Working Directory" = "/Users/willem"; "Space" = -1;
} // profile_defaults) "Tags" = [ ];
]; "Working Directory" = "/Users/willem";
} // profile_defaults)
];
};
} }

View file

@ -3,7 +3,7 @@
{ {
programs = { programs = {
bash.enableCompletion = true; bash.enableCompletion = true;
browserpass = { browserpass = {
enable = true; enable = true;
browsers = [ browsers = [
@ -96,23 +96,23 @@
zsh = { zsh = {
enable = true; enable = true;
autocd = true; autocd = true;
defaultKeymap = "emacs"; defaultKeymap = "emacs";
dotDir = ".config/zsh"; dotDir = ".config/zsh";
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
enableSyntaxHighlighting = true; enableSyntaxHighlighting = true;
enableVteIntegration = true; enableVteIntegration = true;
history = { history = {
path = "$HOME/.local/zsh/history"; path = "$HOME/.local/zsh/history";
extended = true; extended = true;
ignoreDups = true; ignoreDups = true;
}; };
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
loginExtra = '' loginExtra = ''
#!/usr/bin/env zsh #!/usr/bin/env zsh
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
@ -140,7 +140,7 @@
sed \-e "$ s/;//" sed \-e "$ s/;//"
} }
''; '';
shellAliases = { shellAliases = {
cd = "z"; cd = "z";
drs = "darwin-rebuild switch --flake ${config.home.homeDirectory}/.config/dotfiles.nix#"; drs = "darwin-rebuild switch --flake ${config.home.homeDirectory}/.config/dotfiles.nix#";