| author | |
| committer | |
| log | 0959c9c2c3ad26a9819c10f888bc48f9039060a3 |
| tree | 67b2fc5e5c39762fb67068b1d19891b09a4d756f |
| parent | 1904989c627cfd22a6d96e6bee22b1c7af62537d |
| signature | Commit is signed but in an unrecognized format. |
9 files changed, 240 insertions(+), 93 deletions(-)
hosts/desktop/configuration.nix+1-4| ... | ... | @@ -8,10 +8,7 @@ |
| 8 | 8 | # Include the results of the hardware scan. |
| 9 | 9 | ./hardware-configuration.nix |
| 10 | 10 | |
| 11 | ../../modules/nixos/nvidia.nix | |
| 12 | ../../modules/nixos/boot.nix | |
| 13 | ../../modules/nixos/ld.nix | |
| 14 | ../../modules/nixos/services.nix | |
| 11 | ../../modules/nixos | |
| 15 | 12 | ]; |
| 16 | 13 | programs = { |
| 17 | 14 | gamemode.enable = true; |
hosts/laptop/configuration.nix+1-87| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | {pkgs, ...}: { |
| 2 | 2 | imports = [ |
| 3 | ../../modules/macos/homebrew.nix | |
| 3 | ../../modules/macos | |
| 4 | 4 | ]; |
| 5 | 5 | |
| 6 | 6 | environment.systemPackages = with pkgs; [ |
| ... | ... | @@ -25,90 +25,4 @@ |
| 25 | 25 | fi |
| 26 | 26 | ''; |
| 27 | 27 | }; |
| 28 | ||
| 29 | #Use touchid or watch to activate sudo | |
| 30 | security.pam.services.sudo_local = { | |
| 31 | enable = true; | |
| 32 | reattach = true; | |
| 33 | touchIdAuth = true; | |
| 34 | }; | |
| 35 | ||
| 36 | # set some OSX preferences that I always end up hunting down and changing. | |
| 37 | system = { | |
| 38 | # Used for backwards compatibility, please read the changelog before changing. | |
| 39 | # $ darwin-rebuild changelog | |
| 40 | stateVersion = 6; | |
| 41 | ||
| 42 | defaults = { | |
| 43 | # Turn quaranite off | |
| 44 | LaunchServices = { | |
| 45 | LSQuarantine = false; | |
| 46 | }; | |
| 47 | ||
| 48 | NSGlobalDomain = { | |
| 49 | # Show extensions in finder | |
| 50 | AppleShowAllExtensions = true; | |
| 51 | #Turn off the hold and press to input special chars | |
| 52 | ApplePressAndHoldEnabled = false; | |
| 53 | ||
| 54 | # 120, 90, 60, 30, 12, 6, 2 | |
| 55 | KeyRepeat = 2; | |
| 56 | ||
| 57 | # 120, 94, 68, 35, 25, 15 | |
| 58 | InitialKeyRepeat = 15; | |
| 59 | ||
| 60 | #Turn off beep noise in terminal | |
| 61 | "com.apple.mouse.tapBehavior" = 1; | |
| 62 | "com.apple.sound.beep.volume" = 0.0; | |
| 63 | "com.apple.sound.beep.feedback" = 0; | |
| 64 | ||
| 65 | #Ew. | |
| 66 | NSAutomaticCapitalizationEnabled = false; | |
| 67 | NSAutomaticDashSubstitutionEnabled = false; | |
| 68 | NSAutomaticInlinePredictionEnabled = false; | |
| 69 | NSAutomaticPeriodSubstitutionEnabled = false; | |
| 70 | NSAutomaticQuoteSubstitutionEnabled = false; | |
| 71 | NSAutomaticSpellingCorrectionEnabled = false; | |
| 72 | NSDisableAutomaticTermination = true; | |
| 73 | NSDocumentSaveNewDocumentsToCloud = false; | |
| 74 | AppleICUForce24HourTime = true; | |
| 75 | }; | |
| 76 | # minimal dock | |
| 77 | dock = { | |
| 78 | autohide = true; | |
| 79 | #instant hide and show | |
| 80 | autohide-time-modifier = 0.0; | |
| 81 | show-process-indicators = true; | |
| 82 | ||
| 83 | expose-group-apps = true; | |
| 84 | ||
| 85 | show-recents = true; | |
| 86 | static-only = true; | |
| 87 | ||
| 88 | # Scale instead of shrink | |
| 89 | mineffect = "scale"; | |
| 90 | ||
| 91 | orientation = "bottom"; | |
| 92 | }; | |
| 93 | # Better finder settings | |
| 94 | finder = { | |
| 95 | _FXShowPosixPathInTitle = true; | |
| 96 | FXDefaultSearchScope = "SCcf"; | |
| 97 | AppleShowAllExtensions = true; | |
| 98 | ShowPathbar = true; | |
| 99 | FXEnableExtensionChangeWarning = false; | |
| 100 | }; | |
| 101 | CustomSystemPreferences = { | |
| 102 | "com.apple.universalaccess" = { | |
| 103 | closeViewTrackpadGestureZoomEnabled = 1; | |
| 104 | }; | |
| 105 | }; | |
| 106 | }; | |
| 107 | ||
| 108 | # Bind caps to escape for better normal mode stuff | |
| 109 | keyboard = { | |
| 110 | enableKeyMapping = true; | |
| 111 | remapCapsLockToEscape = true; | |
| 112 | }; | |
| 113 | }; | |
| 114 | 28 | } |
lib/mkSystem.nix+1-2| ... | ... | @@ -63,8 +63,7 @@ in |
| 63 | 63 | # Enable caching for nix-index so we dont have to rebuild it |
| 64 | 64 | |
| 65 | 65 | #shared modules |
| 66 | ../modules/shared/extras.nix | |
| 67 | ../modules/shared/nix.nix | |
| 66 | ../modules/shared | |
| 68 | 67 | |
| 69 | 68 | # Link to config.nix |
| 70 | 69 | hostConfig |
modules/macos/default.nix created+7| ... | ... | @@ -0,0 +1,7 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | imports = [ | |
| 3 | ./homebrew.nix | |
| 4 | ./system.nix | |
| 5 | # ./tiling | |
| 6 | ]; | |
| 7 | } |
modules/macos/system.nix created+94| ... | ... | @@ -0,0 +1,94 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | #Use touchid or watch to activate sudo | |
| 3 | security.pam.services.sudo_local = { | |
| 4 | enable = true; | |
| 5 | reattach = true; | |
| 6 | touchIdAuth = true; | |
| 7 | }; | |
| 8 | # set some OSX preferences that I always end up hunting down and changing. | |
| 9 | system = { | |
| 10 | # Used for backwards compatibility, please read the changelog before changing. | |
| 11 | # $ darwin-rebuild changelog | |
| 12 | stateVersion = 6; | |
| 13 | ||
| 14 | defaults = { | |
| 15 | # Turn quaranite off | |
| 16 | LaunchServices = { | |
| 17 | LSQuarantine = false; | |
| 18 | }; | |
| 19 | ||
| 20 | NSGlobalDomain = { | |
| 21 | # Show extensions in finder | |
| 22 | AppleShowAllExtensions = true; | |
| 23 | #Turn off the hold and press to input special chars | |
| 24 | ApplePressAndHoldEnabled = false; | |
| 25 | ||
| 26 | # 120, 90, 60, 30, 12, 6, 2 | |
| 27 | KeyRepeat = 2; | |
| 28 | ||
| 29 | # 120, 94, 68, 35, 25, 15 | |
| 30 | InitialKeyRepeat = 15; | |
| 31 | ||
| 32 | #Turn off beep noise in terminal | |
| 33 | "com.apple.mouse.tapBehavior" = 1; | |
| 34 | "com.apple.sound.beep.volume" = 0.0; | |
| 35 | "com.apple.sound.beep.feedback" = 0; | |
| 36 | ||
| 37 | #Ew. | |
| 38 | NSAutomaticCapitalizationEnabled = false; | |
| 39 | NSAutomaticDashSubstitutionEnabled = false; | |
| 40 | NSAutomaticInlinePredictionEnabled = false; | |
| 41 | NSAutomaticPeriodSubstitutionEnabled = false; | |
| 42 | NSAutomaticQuoteSubstitutionEnabled = false; | |
| 43 | NSAutomaticSpellingCorrectionEnabled = false; | |
| 44 | NSDisableAutomaticTermination = true; | |
| 45 | NSDocumentSaveNewDocumentsToCloud = false; | |
| 46 | AppleICUForce24HourTime = true; | |
| 47 | }; | |
| 48 | # minimal dock | |
| 49 | dock = { | |
| 50 | autohide = true; | |
| 51 | #instant hide and show | |
| 52 | autohide-time-modifier = 0.0; | |
| 53 | show-process-indicators = true; | |
| 54 | ||
| 55 | expose-group-apps = true; | |
| 56 | ||
| 57 | show-recents = true; | |
| 58 | static-only = true; | |
| 59 | ||
| 60 | # Scale instead of shrink | |
| 61 | mineffect = "scale"; | |
| 62 | ||
| 63 | orientation = "bottom"; | |
| 64 | }; | |
| 65 | # Better finder settings | |
| 66 | finder = { | |
| 67 | _FXShowPosixPathInTitle = true; | |
| 68 | FXDefaultSearchScope = "SCcf"; | |
| 69 | AppleShowAllExtensions = true; | |
| 70 | ShowPathbar = true; | |
| 71 | FXEnableExtensionChangeWarning = false; | |
| 72 | }; | |
| 73 | CustomSystemPreferences = { | |
| 74 | "com.apple.universalaccess" = { | |
| 75 | closeViewTrackpadGestureZoomEnabled = 1; | |
| 76 | }; | |
| 77 | ||
| 78 | "com.apple.symbolichotkeys" = { | |
| 79 | AppleSymbolicHotKeys = { | |
| 80 | "64" = { | |
| 81 | enabled = false; | |
| 82 | }; | |
| 83 | }; | |
| 84 | }; | |
| 85 | }; | |
| 86 | }; | |
| 87 | ||
| 88 | # Bind caps to escape for better normal mode stuff | |
| 89 | keyboard = { | |
| 90 | enableKeyMapping = true; | |
| 91 | remapCapsLockToEscape = true; | |
| 92 | }; | |
| 93 | }; | |
| 94 | } |
modules/macos/tiling/aerospace.nix created+117| ... | ... | @@ -0,0 +1,117 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | services.aerospace = { | |
| 3 | enable = true; | |
| 4 | settings = { | |
| 5 | # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization | |
| 6 | enable-normalization-flatten-containers = true; | |
| 7 | enable-normalization-opposite-orientation-for-nested-containers = true; | |
| 8 | ||
| 9 | # See: https://nikitabobko.github.io/AeroSpace/guide#layouts | |
| 10 | # The 'accordion-padding' specifies the size of accordion padding | |
| 11 | # You can set 0 to disable the padding feature | |
| 12 | accordion-padding = 0; | |
| 13 | ||
| 14 | # Possible values: tiles|accordion | |
| 15 | default-root-container-layout = "tiles"; | |
| 16 | ||
| 17 | # Possible values: horizontal|vertical|auto | |
| 18 | # "auto" means: wide monitor (anything wider than high) gets horizontal orientation, | |
| 19 | # tall monitor (anything higher than wide) gets vertical orientation | |
| 20 | default-root-container-orientation = "auto"; | |
| 21 | ||
| 22 | key-mapping.preset = "qwerty"; | |
| 23 | ||
| 24 | gaps = { | |
| 25 | inner = { | |
| 26 | horizontal = 0; | |
| 27 | vertical = 0; | |
| 28 | }; | |
| 29 | outer = { | |
| 30 | left = 0; | |
| 31 | bottom = 0; | |
| 32 | top = 0; | |
| 33 | right = 0; | |
| 34 | }; | |
| 35 | }; | |
| 36 | # You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag | |
| 37 | # Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key | |
| 38 | # Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app | |
| 39 | automatically-unhide-macos-hidden-apps = true; | |
| 40 | ||
| 41 | mode.main.binding = { | |
| 42 | # See: https://nikitabobko.github.io/AeroSpace/commands#layout | |
| 43 | alt-slash = "layout tiles horizontal vertical"; | |
| 44 | alt-comma = "layout accordion horizontal vertical"; | |
| 45 | ||
| 46 | # See: https://nikitabobko.github.io/AeroSpace/commands#focus | |
| 47 | alt-h = "focus left"; | |
| 48 | alt-j = "focus down"; | |
| 49 | alt-k = "focus up"; | |
| 50 | alt-l = "focus right"; | |
| 51 | ||
| 52 | # See: https://nikitabobko.github.io/AeroSpace/commands#move | |
| 53 | alt-shift-h = "move left"; | |
| 54 | alt-shift-j = "move down"; | |
| 55 | alt-shift-k = "move up"; | |
| 56 | alt-shift-l = "move right"; | |
| 57 | ||
| 58 | # See: https://nikitabobko.github.io/AeroSpace/commands#resize | |
| 59 | alt-minus = "resize smart -50"; | |
| 60 | alt-equal = "resize smart +50"; | |
| 61 | ||
| 62 | # See: https://nikitabobko.github.io/AeroSpace/commands#workspace | |
| 63 | cmd-1 = "workspace 1"; | |
| 64 | cmd-2 = "workspace 2"; | |
| 65 | cmd-3 = "workspace 3"; | |
| 66 | cmd-4 = "workspace 4"; | |
| 67 | cmd-5 = "workspace 5"; | |
| 68 | cmd-6 = "workspace 6"; | |
| 69 | cmd-7 = "workspace 7"; | |
| 70 | cmd-8 = "workspace 8"; | |
| 71 | cmd-9 = "workspace 9"; | |
| 72 | ||
| 73 | # See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace | |
| 74 | cmd-shift-1 = "move-node-to-workspace 1"; | |
| 75 | cmd-shift-2 = "move-node-to-workspace 2"; | |
| 76 | cmd-shift-3 = "move-node-to-workspace 3"; | |
| 77 | cmd-shift-4 = "move-node-to-workspace 4"; | |
| 78 | cmd-shift-5 = "move-node-to-workspace 5"; | |
| 79 | cmd-shift-6 = "move-node-to-workspace 6"; | |
| 80 | cmd-shift-7 = "move-node-to-workspace 7"; | |
| 81 | cmd-shift-8 = "move-node-to-workspace 8"; | |
| 82 | cmd-shift-9 = "move-node-to-workspace 9"; | |
| 83 | ||
| 84 | # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth | |
| 85 | alt-tab = "workspace-back-and-forth"; | |
| 86 | # See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor | |
| 87 | alt-shift-tab = "move-workspace-to-monitor --wrap-around next"; | |
| 88 | ||
| 89 | # See: https://nikitabobko.github.io/AeroSpace/commands#mode | |
| 90 | alt-shift-semicolon = "mode service"; | |
| 91 | }; | |
| 92 | mode.service.binding = { | |
| 93 | esc = ["reload-config" "mode main"]; | |
| 94 | r = ["flatten-workspace-tree" "mode main"]; # reset layout | |
| 95 | f = ["layout floating tiling" "mode main"]; # Toggle between floating and tiling layout | |
| 96 | backspace = ["close-all-windows-but-current" "mode main"]; | |
| 97 | ||
| 98 | # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2 | |
| 99 | #s = ["layout sticky tiling", "mode main"] | |
| 100 | ||
| 101 | alt-shift-h = ["join-with left" "mode main"]; | |
| 102 | alt-shift-j = ["join-with down" "mode main"]; | |
| 103 | alt-shift-k = ["join-with up" "mode main"]; | |
| 104 | alt-shift-l = ["join-with right" "mode main"]; | |
| 105 | ||
| 106 | down = "volume down"; | |
| 107 | up = "volume up"; | |
| 108 | shift-down = ["volume set 0" "mode main"]; | |
| 109 | }; | |
| 110 | exec-on-workspace-change = [ | |
| 111 | "/bin/bash" | |
| 112 | "-c" | |
| 113 | "/run/current-system/sw/bin/sketchybar --trigger aerospace_workspace_change FOCUSED_WORKSPACE=$AEROSPACE_FOCUSED_WORKSPACE" | |
| 114 | ]; | |
| 115 | }; | |
| 116 | }; | |
| 117 | } |
modules/macos/tiling/default.nix created+5| ... | ... | @@ -0,0 +1,5 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | imports = [ | |
| 3 | ./aerospace.nix | |
| 4 | ]; | |
| 5 | } |
modules/nixos/default.nix created+8| ... | ... | @@ -0,0 +1,8 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | imports = [ | |
| 3 | ./boot.nix | |
| 4 | ./ld.nix | |
| 5 | ./nvidia.nix | |
| 6 | ./services.nix | |
| 7 | ]; | |
| 8 | } |
modules/shared/default.nix created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | {pkgs, ...}: { | |
| 2 | imports = [ | |
| 3 | ./extras.nix | |
| 4 | ./nix.nix | |
| 5 | ]; | |
| 6 | } |