forked from
lass.pds.lassul.us/superconfig
This repository has no description
3.4 kB
140 lines
1{ pkgs, self, ... }:
2
3{
4 imports = [
5 # ./rosetta.nix
6 self.inputs.nix-index-database.darwinModules.nix-index
7 ];
8 clan.core.networking.targetHost = "root@localhost";
9 programs.nix-index-database.comma.enable = true;
10
11 nixpkgs.hostPlatform = "aarch64-darwin";
12 environment.systemPackages = [
13 self.packages.${pkgs.system}.nvim
14 self.packages.${pkgs.system}.pass
15 self.packages.${pkgs.system}.passmenu
16
17 # zsh dependencies
18 pkgs.fzf
19 pkgs.atuin
20
21 pkgs.gnupg
22 pkgs.pinentry_mac
23 pkgs.lazygit
24 pkgs.sshuttle
25 pkgs.git
26 pkgs.element-desktop
27 pkgs.iterm2
28 (pkgs.firefox-devedition-bin-unwrapped.overrideAttrs (o: {
29 meta = o.meta // {
30 license = pkgs.lib.licenses.free;
31 };
32 }))
33 pkgs.ripgrep
34 pkgs.alt-tab-macos
35 pkgs.zed-editor
36 pkgs.nixd
37 pkgs.nil
38 ];
39
40 # Use a custom configuration.nix location.
41 # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
42 # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
43
44 nix = {
45 package = pkgs.nix;
46 settings = {
47 extra-experimental-features = [
48 "nix-command"
49 "flakes"
50 ];
51 };
52 };
53
54 # homebrew = {
55 # enable = true;
56 # casks = [
57 # "gpg-suite"
58 # ];
59 # };
60
61 # keyboard settings
62 system.keyboard = {
63 enableKeyMapping = true;
64 };
65
66 # Add skhd for keyboard shortcuts
67 services.skhd = {
68 enable = true;
69 skhdConfig = ''
70 # Open passmenu with Hyper-P
71 ctrl + shift + alt + cmd - p : /run/current-system/sw/bin/passmenu
72 '';
73 };
74
75 system.defaults = {
76 # minimal dock
77 dock = {
78 autohide = true;
79 orientation = "left";
80 show-process-indicators = false;
81 show-recents = false;
82 static-only = true;
83 };
84 # a finder that tells me what I want to know and lets me work
85 finder = {
86 AppleShowAllExtensions = true;
87 ShowPathbar = true;
88 FXEnableExtensionChangeWarning = false;
89 };
90 # Tab between form controls and F-row that behaves as F1-F12
91 NSGlobalDomain = {
92 AppleKeyboardUIMode = 3;
93 "com.apple.keyboard.fnState" = true;
94 };
95 };
96
97 nix.linux-builder.enable = true;
98 nix.linux-builder.supportedFeatures = [
99 "benchmark"
100 "big-parallel"
101 "kvm"
102 "nixos-test"
103 "uid-range"
104 ];
105 nix.linux-builder.config = {
106 imports = [
107 ../../2configs/container-tests.nix
108 ];
109 };
110
111 # Create /etc/zshrc that loads the nix-darwin environment.
112 programs.zsh.enable = true; # default shell on catalina
113 programs.zsh.shellInit = self.packages.${pkgs.system}.zsh.zshrc;
114
115 # enable sudo touch
116 security.pam.services.sudo_local.touchIdAuth = true;
117
118 # disable natural scrolling
119 system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = false;
120 programs.direnv.enable = true;
121 programs.nix-index.enable = true;
122 programs.gnupg.agent = {
123 enable = true;
124 enableSSHSupport = true;
125 };
126
127 # Used for backwards compatibility, please read the changelog before changing.
128 # $ darwin-rebuild changelog
129 system.stateVersion = 6;
130
131 system.primaryUser = "lassulus";
132
133 services.openssh.enable = true;
134 users.users.lassulus.openssh.authorizedKeys.keys = [ self.keys.ssh ];
135 users.users.root.openssh.authorizedKeys.keys = [ self.keys.ssh ];
136
137 users.users.root.shell = pkgs.zsh;
138 users.users.root.uid = 0;
139 users.knownUsers = [ "root" ];
140}