Skip to content

Commit 3d55fd6

Browse files
committed
Initial config
0 parents  commit 3d55fd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5562
-0
lines changed

flake.lock

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
description = "My MacOS config";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs";
6+
home-manager = {
7+
url = "github:nix-community/home-manager/release-23.05";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
11+
darwin = {
12+
url = "github:lnl7/nix-darwin";
13+
inputs.nixpkgs.follows = "nixpkgs";
14+
};
15+
};
16+
17+
outputs = { self, nixpkgs, home-manager, darwin }: {
18+
darwinConfigurations = {
19+
"MACBOOK008" = darwin.lib.darwinSystem {
20+
system = "aarch64-darwin";
21+
modules = [
22+
home-manager.darwinModules.home-manager
23+
./hosts/macbook008
24+
];
25+
};
26+
};
27+
};
28+
}

hosts/macbook008/default.nix

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{ pkgs, ... }:
2+
{
3+
users.users."martin.gondermann" = {
4+
name = "martin.gondermann";
5+
home = "/Users/martin.gondermann";
6+
};
7+
8+
nix = {
9+
package = pkgs.nixVersions.stable;
10+
settings = {
11+
cores = 0;
12+
max-jobs = 10;
13+
auto-optimise-store = true;
14+
};
15+
gc = {
16+
automatic = true;
17+
options = "-d";
18+
};
19+
extraOptions = "experimental-features = nix-command flakes";
20+
};
21+
22+
services.nix-daemon.enable = true;
23+
24+
# if you use zsh (the default on new macOS installations),
25+
# you'll need to enable this so nix-darwin creates a zshrc sourcing needed environment changes
26+
programs.zsh.enable = true;
27+
programs.gnupg.agent.enable = true;
28+
environment.pathsToLink = [ "/share/zsh" ];
29+
30+
# bash is enabled by default
31+
32+
system.defaults = {
33+
dock = {
34+
autohide = true;
35+
mru-spaces = false;
36+
show-recents = false;
37+
static-only = true;
38+
expose-animation-duration = 0.01;
39+
};
40+
finder = {
41+
AppleShowAllExtensions = true;
42+
};
43+
NSGlobalDomain = {
44+
AppleShowAllExtensions = true;
45+
ApplePressAndHoldEnabled = false;
46+
InitialKeyRepeat = 25;
47+
KeyRepeat = 4;
48+
};
49+
};
50+
51+
homebrew = {
52+
enable = true;
53+
onActivation = {
54+
autoUpdate = true;
55+
upgrade = true;
56+
};
57+
casks = [
58+
"alfred"
59+
"jetbrains-toolbox"
60+
"iterm2"
61+
"microsoft-teams"
62+
"microsoft-outlook"
63+
"enpass"
64+
"firefox"
65+
"google-chrome"
66+
"sf-symbols"
67+
];
68+
};
69+
70+
home-manager = {
71+
useGlobalPkgs = true;
72+
useUserPackages = true;
73+
users."martin.gondermann" = { pkgs, ... } : {
74+
imports = [ ./modules/console ];
75+
programs = {
76+
home-manager.enable = true;
77+
};
78+
home = {
79+
stateVersion = "23.05";
80+
};
81+
};
82+
};
83+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{pkgs, ...}: {
2+
imports = [
3+
./git.nix
4+
./neovim
5+
./shell_tools.nix
6+
./starship.nix
7+
./tmux
8+
./zsh
9+
];
10+
}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
{
2+
config,
3+
lib,
4+
pkgs,
5+
...
6+
}:
7+
with lib;
8+
{
9+
home.packages = with pkgs; [
10+
less
11+
lazygit
12+
];
13+
14+
programs = {
15+
lazygit = {
16+
enable = true;
17+
settings = {
18+
gui = {
19+
showIcons = true;
20+
theme = {
21+
lightTheme = false;
22+
};
23+
};
24+
};
25+
};
26+
27+
git = {
28+
enable = true;
29+
userName = "Martin Gondermann";
30+
userEmail = "[email protected]";
31+
aliases = {
32+
s = "status";
33+
st = "status";
34+
stu = "status --untracked-files=no";
35+
36+
ci = "commit";
37+
cim = "commit --message";
38+
cima = "commit --all --message";
39+
type = "cat-file -t";
40+
dump = "cat-file -p";
41+
42+
# Correcting commits
43+
amend = "commit --amend --no-edit";
44+
reword = "commit --amend --message";
45+
undo = "reset HEAD~1";
46+
rh = "reset --hard";
47+
48+
# index related commands
49+
a = "add";
50+
aa = "add --all";
51+
unstage = "reset HEAD";
52+
53+
# git branch and remote
54+
co = "checkout";
55+
br = "branch";
56+
b = "branch";
57+
brs = "branch --all --verbose";
58+
59+
# git remote
60+
rv = "remote --verbose";
61+
62+
# git diff
63+
d = "diff";
64+
df = "diff";
65+
dc = "diff --staged";
66+
preview = "diff --staged";
67+
dt = "difftool";
68+
69+
# merges
70+
mt = "mergetool";
71+
unresolve = "checkout --conflict=merge";
72+
73+
# git log
74+
ll = "log";
75+
l = "log --oneline --max-count=15";
76+
ld = "log --oneline --max-count=15 --decorate";
77+
gl = "log --graph --oneline --decorate --branches --all";
78+
glog = "log --graph --oneline --decorate --branches --all";
79+
hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short";
80+
who = "log --date=relative --pretty='format:%C(yellow)%h%Creset %C(bold blue)%an%Creset %C(bold green)%cr%Creset %s'";
81+
wdw = "log --date=relative --pretty='format:%C(yellow)%h%Creset %C(bold blue)%an%Creset %C(bold green)%cr%Creset %s'";
82+
most-changed = "!git log --format=%n --name-only | grep -v '^$' | sort | uniq -c | sort --numeric-sort --reverse | head -n 50";
83+
84+
# clean
85+
cleanf = "clean -xdf";
86+
};
87+
88+
ignores = [
89+
"*~"
90+
".DS_Store"
91+
".fake"
92+
"bin"
93+
"*.userprefs"
94+
"obj"
95+
"packages"
96+
"deploy"
97+
"*.log"
98+
];
99+
100+
extraConfig = {
101+
color.ui = true;
102+
core = {
103+
autocrlf = "input";
104+
editor = "nvim";
105+
};
106+
merge.conflictstyle = "diff3";
107+
diff.colorMoved = "default";
108+
fetch.prune = true;
109+
push.default = "current";
110+
pull = {
111+
rebase = true;
112+
ff = "only";
113+
};
114+
commit = {
115+
cleanup = "scissors";
116+
};
117+
init.defaultBranch = "main";
118+
gui.pruneDuringFetch = true;
119+
};
120+
121+
delta = {
122+
enable = true;
123+
options = {
124+
features = "side-by-side line-numbers decorations";
125+
whitespace-error-style = "22 reverse";
126+
decorations = {
127+
commit-decoration-style = "bold yellow box ul";
128+
file-style = "bold yellow ul";
129+
file-decoration-style = "none";
130+
};
131+
};
132+
};
133+
};
134+
};
135+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
column_width = 120
2+
line_endings = "Unix"
3+
indent_type = "Spaces"
4+
indent_width = 2
5+
quote_style = "AutoPreferSingle"
6+
no_call_parentheses = false
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "magicmonty-snippets",
3+
"engines": {
4+
"vscode": "^1.11.0"
5+
},
6+
"contributes": {
7+
"snippets": [
8+
{
9+
"language": "ruby",
10+
"path": "./ruby.json"
11+
}
12+
]
13+
}
14+
}

0 commit comments

Comments
 (0)