all repos — nixfiles @ a38d38f2e1c13c63ac7608e0ccf9e0a19fa1c255

System and user configuration, managed by nix and home-manager

user/hosts/marvin.nix (view raw)

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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
{
  config,
  pkgs,
  ...
}:
{
  imports = [
    ../settings/base.nix
    ../settings/development/base.nix
    ../settings/development/fish.nix
    ../settings/development/nix.nix
    ../settings/development/javascript.nix
    ../settings/development/python.nix
    ../settings/development/golang.nix
    ../settings/development/vlang.nix
    ../settings/development/web.nix
    ../settings/darwin.nix
    ../settings/emacs.nix
    ../settings/fish.nix
    ../settings/git.nix
    ../settings/nixpkgs.nix
    ../settings/ssh.nix
    ../settings/workstation.nix
    ../settings/user-interface.nix
    ../settings/nix.nix
    ../settings/zed.nix
    ../../private/ssh.nix
    ../../private/llm.nix
  ];

  home.username = "alan";
  home.homeDirectory = "/Users/alan";
  home.stateVersion = "22.11";
  home.packages = with pkgs; [
    picocom
  ];

  programs.git = {
    signing = {
      format = "ssh";
      key = "${config.home.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/7ddf377f63c957d7c69185c07ab98a7b.pub";
      signByDefault = true;
    };
    settings.gpg = {
      ssh = {
        allowedSignersFile = toString (
          pkgs.writeText "allowed-signers" ''
            ${config.programs.git.settings.user.email} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJVREjPey2TOIPzfYJoG9yIR4Rui7tNJK2QIKa+pbgsyXg31hhPIw37LRRIic+l53mW8eahHxX3Y1IeTjcMw8IU= alan@alanpearce.eu
          ''
        );
      };
    };
  };

  home.sessionPath = [
    "/Library/Developer/CommandLineTools/usr/bin"
  ];

  programs.nixcord = {
    enable = true;
    discord = {
      enable = false;
      equicord.enable = true;
      vencord.enable = false;
    };
    vesktop.enable = true;
    config = {
      plugins = {
        ClearURLs.enable = true;
        OnePingPerDM.enable = true;
        anammox.enable = true;
        appleMusicRichPresence = {
          enable = true;
          activityType = 2;
        };
        betterSettings.enable = true;
        betterUserArea.enable = true;

        themeLibrary.enable = true;
        noProfileThemes.enable = true;
        noTypingAnimation.enable = true;
        userMessagesPronouns.enable = true;
        noReplyMention.enable = true;
        replyPingControl = {
          enable = true;
          alwaysPingOnReply = true;
        };
      };
    };
  };

  targets.darwin.defaults = {
    NSGlobalDomain = {
      AppleKeyboardUIMode = 2;
      ApplePressAndHoldEnabled = false;
      AppleShowScrollBars = "Always";
    };
    "com.apple.controlcenter" = {
      "NSStatusItem Visible Sound" = true;
      "NSStatusItem Visible FocusModes" = true;
    };
    "com.apple.dock" = {
      autohide = true;
      autohide-delay = 0.05;
      autohide-time-modifier = 0.12;
      expose-animation-duration = 0.5;
      launchanim = false;
      mineffect = "scale";
      minimize-to-application = true;
      scroll-to-open = true;
      show-process-indicators = false;
      static-only = true;
      static-apps = [ ];
      static-others = [
        {
          tile-data = {
            file-data = {
              _CFURLString = "file://${config.home.homeDirectory}/Downloads/";
              _CFURLStringType = 15;
            };
          };
          tile-type = "directory-tile";
        }
      ];
    };
    "com.apple.finder" = {
      _FXSortFoldersFirst = true;
      AppleShowAllExtensions = true;
      FXDefaultSearchScope = "SCcf"; # current folder
      FXEnableExtensionChangeWarning = false;
      FXPreferredViewStyle = "clmv"; # column view
      FXRemoveOldTrashItems = true;
      NewWindowTarget = "Home";
      NSDocumentSaveNewDocumentsToCloud = false;
    };
    "com.apple.menuextra.clock" =
      let
        values = {
          if-space = 0;
          always = 1;
          never = 2;
        };
      in
      {
        Show24Hour = true;
        ShowDate = values.never;
      };
    "com.apple.hitoolbox" = {
      AppleFnUsageType = "Do Nothing";
    };
    "com.apple.multitouchtouchpad" = {
      TrackpadThreeFingerTapGesture = 2; # Lookup
    };
    "com.apple.mouse" = {
      linear = true;
    };
    "com.apple.safari" = {
      ShowFullURLInSmartSearchField = true;
    };
    "com.apple.screensaver" = {
      askForPasswordDelay = 60;
    };
    "com.apple.siri" = {
      StatusMenuVisible = false;
    };
    "com.apple.textedit" = {
      RichText = false;
    };
    "com.apple.timemachine" = {
      DoNotOfferNewDisksForBackup = true;
    };
  };
}