+17
.config/home-manager/home.nix
+17
.config/home-manager/home.nix
···
1
+
{ config, ... }:
2
+
3
+
{
4
+
imports = [
5
+
./meta.nix
6
+
];
7
+
8
+
# Home Manager needs a bit of information about you and the paths it should
9
+
# manage. Also don't ask how we got here on the roleplaying part on the main
10
+
# nixpkgs branch of the dotfiles.
11
+
# TODO: Update the username and homeDirectory when switching between host-specific
12
+
# branches.
13
+
home = {
14
+
username = "gildedguy";
15
+
homeDirectory = "/home/gildedguy";
16
+
};
17
+
}
+193
.config/home-manager/meta.nix
+193
.config/home-manager/meta.nix
···
1
+
# This is the meta configuration for my dotfiles with home-manager, except
2
+
# some home.{username,userDirectory} configs to ensure portability between
3
+
# hosts
4
+
5
+
{ config, pkgs, lib, ... }:
6
+
7
+
{
8
+
# https://fnordig.de/til/nix/home-manager-allow-unfree.html
9
+
nixpkgs = {
10
+
config = {
11
+
allowUnfree = true;
12
+
# https://github.com/nix-community/home-manager/issues/2942
13
+
allowUnfreePredicate = (_: true);
14
+
};
15
+
};
16
+
17
+
# This value determines the Home Manager release that your configuration is
18
+
# compatible with. This helps avoid breakage when a new Home Manager release
19
+
# introduces backwards incompatible changes.
20
+
#
21
+
# You should not change this value, even if you update Home Manager. If you do
22
+
# want to update the value, then make sure to first check the Home Manager
23
+
# release notes.
24
+
home.stateVersion = "24.11"; # Please read the comment before changing.
25
+
26
+
# The home.packages option allows you to install Nix packages into your
27
+
# environment.
28
+
home.packages = with pkgs; [
29
+
# # Adds the 'hello' command to your environment. It prints a friendly
30
+
# # "Hello, world!" when run.
31
+
# pkgs.hello
32
+
33
+
# # It is sometimes useful to fine-tune packages, for example, by applying
34
+
# # overrides. You can do that directly here, just don't forget the
35
+
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
36
+
# # fonts?
37
+
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
38
+
39
+
# # You can also create simple shell scripts directly inside your
40
+
# # configuration. For example, this adds a command 'my-hello' to your
41
+
# # environment:
42
+
# (pkgs.writeShellScriptBin "my-hello" ''
43
+
# echo "Hello, ${config.home.username}!"
44
+
# '')
45
+
46
+
## devtools ##
47
+
# https://httpie.io
48
+
httpie
49
+
# https://devenv.sh
50
+
devenv
51
+
# https://cli.github.com
52
+
gh
53
+
# bet we'll going to have a field day since Copilot is now available for free
54
+
# (this is seperate from the gh copilot extension for those asking)
55
+
# context: https://github.blog/news-insights/product-news/github-copilot-in-vscode-free/
56
+
github-copilot-cli
57
+
# markdownlint
58
+
markdownlint-cli
59
+
# https://doppler.com
60
+
doppler
61
+
direnv
62
+
shellcheck
63
+
hadolint
64
+
65
+
## programming languages
66
+
deno
67
+
nodejs_22
68
+
python313
69
+
pipx
70
+
pipenv
71
+
72
+
## language servers ##
73
+
# nix language server - https://github.com/oxalica/nil
74
+
nil
75
+
# https://github.com/alesbrelih/gitlab-ci-ls
76
+
gitlab-ci-ls
77
+
];
78
+
79
+
home.sessionPath = [
80
+
"${config.home.homeDirectory}/bin"
81
+
];
82
+
83
+
# Home Manager is pretty good at managing dotfiles. The primary way to manage
84
+
# plain files is through 'home.file'.
85
+
home.file = {
86
+
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
87
+
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
88
+
# # symlink to the Nix store copy.
89
+
# ".screenrc".source = dotfiles/screenrc;
90
+
91
+
# # You can also set the file content immediately.
92
+
# ".gradle/gradle.properties".text = ''
93
+
# org.gradle.console=verbose
94
+
# org.gradle.daemon.idletimeout=3600000
95
+
# '';
96
+
};
97
+
98
+
# Home Manager can also manage your environment variables through
99
+
# 'home.sessionVariables'. These will be explicitly sourced when using a
100
+
# shell provided by Home Manager. If you don't want to manage your shell
101
+
# through Home Manager then you have to manually source 'hm-session-vars.sh'
102
+
# located at either
103
+
#
104
+
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
105
+
#
106
+
# or
107
+
#
108
+
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
109
+
#
110
+
# or
111
+
#
112
+
# /etc/profiles/per-user/gildedguy/etc/profile.d/hm-session-vars.sh
113
+
#
114
+
home.sessionVariables = {
115
+
EDITOR = "nano";
116
+
NIXOS_ALLOW_UNFREE = "1"; # for impure builds
117
+
GIT_EDITOR = "code --wait";
118
+
VISUAL = "code --wait";
119
+
DOCKER_BUILDKIT = "1";
120
+
};
121
+
122
+
# Let Home Manager install and manage itself.
123
+
programs.home-manager.enable = true;
124
+
125
+
# let me cook with the configs, starting with git
126
+
programs.git = {
127
+
enable = true;
128
+
package = pkgs.gitAndTools.gitFull;
129
+
lfs = {
130
+
enable = true;
131
+
};
132
+
userName = "Andrei Jiroh Halili";
133
+
userEmail = "ajhalili2006@andreijiroh.dev";
134
+
aliases = {
135
+
signoff = "commit --signoff";
136
+
amend = "commit -a --amend";
137
+
remotes = "remote -v";
138
+
root = "rev-parse --show-toplevel";
139
+
unstage = "restore --staged";
140
+
stats = "status";
141
+
};
142
+
extraConfig = {
143
+
format = {
144
+
signOff = true;
145
+
};
146
+
init = {
147
+
defaultBranch = "main";
148
+
};
149
+
150
+
# https://groups.google.com/g/binary-transparency/c/f-BI4o8HZW0
151
+
transfer = {
152
+
fsckobjects = true;
153
+
};
154
+
fetch = {
155
+
fsckobjects = true;
156
+
};
157
+
receive = {
158
+
fsckobjects = true;
159
+
};
160
+
push = {
161
+
autoSetupRemote = true;
162
+
};
163
+
164
+
165
+
};
166
+
};
167
+
168
+
programs.vscode = {
169
+
enable = true;
170
+
package = pkgs.vscode;
171
+
enableExtensionUpdateCheck = true;
172
+
mutableExtensionsDir = true;
173
+
# userSettings = {
174
+
# "nix.enableLanguageServer" = true;
175
+
# "nix.serverPath" = "nil";
176
+
# "window.customTitleBarVisibility" = "auto";
177
+
# "window.titleBarStyle" = "custom";
178
+
# "window.menuBarVisibility" = "classic";
179
+
# "redhat.telemetry.enabled" = true;
180
+
# "github.copilot.editor.enableAutoCompletions" = false;
181
+
# "github.copilot.chat.followUps" = "always";
182
+
# "github.copilot.chat.terminalChatLocation" = "terminal";
183
+
# "git.confirmSync" = false;
184
+
# "microsoft-authentication.implementation" = "msal";
185
+
# "workbench.colorTheme" = "GitHub Dark Colorblind (Beta)";
186
+
# "workbench.iconTheme" = "material-icon-theme";
187
+
# "workbench.productIconTheme" = "material-product-icons";
188
+
# };
189
+
# We're importing what's generated from nix4vscode here as a workaround
190
+
# for now.
191
+
#extensions = lib.attrsets.mapAttrsToList (_: v: v) vscExts;
192
+
};
193
+
}
+188
-4
.nix4vscode.toml
+188
-4
.nix4vscode.toml
···
1
1
# SPDX-License-Identifier: MPL-2.0
2
-
# To use thhis configuration, you must have nix4vscode installed, either
3
-
# via "cargo build" or good old "nix develop" from a local clone of the
4
-
# tooling's sources.
2
+
# To use thhis configuration, you must have nix4vscode installed, either via "cargo build"
3
+
# or good old "nix develop" from a local clone of the tooling's sources. This is currently
4
+
# manually managed to be in sync with code --list-extensions while Settings Sync is enabled.
5
5
6
6
# TODO: Bump this on every VS Code release here.
7
7
vscode_version = "1.96.0"
···
30
30
[[extensions]]
31
31
publisher_name = "vivaxy"
32
32
extension_name = "vscode-conventional-commits"
33
+
[[extensions]]
34
+
publisher_name = "gitlab"
35
+
extension_name = "gitlab-workflow"
36
+
[[extensions]]
37
+
publisher_name = "exiasr"
38
+
extension_name = "hadolint"
39
+
[[extensions]]
40
+
publisher_name = "editorconfig"
41
+
extension_name = "editorconfig"
42
+
[[extensions]]
43
+
publisher_name = "donjayamanne"
44
+
extension_name = "githistory"
45
+
[[extensions]]
46
+
publisher_name = "devfile"
47
+
extension_name = "vscode-devfile"
48
+
[[extensions]]
49
+
publisher_name = "tailscale"
50
+
extension_name = "vscode-tailscale"
51
+
[[extensions]]
52
+
publisher_name = "timonwong"
53
+
extension_name = "shellcheck"
54
+
55
+
# github
56
+
[[extensions]]
57
+
publisher_name = "github"
58
+
extension_name = "copilot"
59
+
[[extensions]]
60
+
publisher_name = "github"
61
+
extension_name = "vscode-github-actions"
62
+
[[extensions]]
63
+
publisher_name = "github"
64
+
extension_name = "remotehub"
65
+
[[extensions]]
66
+
publisher_name = "github"
67
+
extension_name = "copilot-chat"
68
+
[[extensions]]
69
+
publisher_name = "github"
70
+
extension_name = "codespaces"
71
+
[[extensions]]
72
+
publisher_name = "github"
73
+
extension_name = "vscode-pull-request-github"
74
+
75
+
# markdown
76
+
[[extensions]]
77
+
publisher_name = "aikebang"
78
+
extension_name = "mkdocs-syntax-highlight"
79
+
[[extensions]]
80
+
publisher_name = "bierner"
81
+
extension_name = "emojisense"
82
+
[[extensions]]
83
+
publisher_name = "bierner"
84
+
extension_name = "markdown-checkbox"
85
+
[[extensions]]
86
+
publisher_name = "bierner"
87
+
extension_name = "github-markdown-preview"
88
+
[[extensions]]
89
+
publisher_name = "bierner"
90
+
extension_name = "markdown-emoji"
91
+
[[extensions]]
92
+
publisher_name = "bierner"
93
+
extension_name = "markdown-footnotes"
94
+
[[extensions]]
95
+
publisher_name = "bierner"
96
+
extension_name = "markdown-mermaid"
97
+
[[extensions]]
98
+
publisher_name = "bierner"
99
+
extension_name = "markdown-preview-github-styles"
100
+
[[extensions]]
101
+
publisher_name = "bierner"
102
+
extension_name = "markdown-yaml-preamble"
103
+
104
+
# microsoft
105
+
[[extensions]]
106
+
publisher_name = "ms-azuretools"
107
+
extension_name = "vscode-docker"
108
+
# temporarily commented out per https://github.com/nix-community/nix4vscode/issues/135
109
+
#[[extensions]]
110
+
#publisher_name = "ms-python"
111
+
#extension_name = "debugpy"
112
+
[[extensions]]
113
+
publisher_name = "ms-python"
114
+
extension_name = "python"
115
+
[[extensions]]
116
+
publisher_name = "ms-python"
117
+
extension_name = "vscode-pylance"
118
+
[[extensions]]
119
+
publisher_name = "ms-vscode"
120
+
extension_name = "azure-repos"
121
+
[[extensions]]
122
+
publisher_name = "ms-vscode"
123
+
extension_name = "remote-repositories"
124
+
[[extensions]]
125
+
publisher_name = "ms-vscode"
126
+
extension_name = "vscode-github-issue-notebooks"
127
+
[[extensions]]
128
+
publisher_name = "ms-vscode"
129
+
extension_name = "wordcount"
33
130
34
131
# programming languages + IntelliSense
35
132
[[extensions]]
···
43
140
extension_name = "vscode-yaml"
44
141
[[extensions]]
45
142
publisher_name = "unifiedjs"
46
-
extension_name = "vscode-mdx"
143
+
extension_name = "vscode-mdx"
144
+
[[extensions]]
145
+
publisher_name = "davidanson"
146
+
extension_name = "vscode-markdownlint"
147
+
[[extensions]]
148
+
publisher_name = "golang"
149
+
extension_name = "go"
150
+
[[extensions]]
151
+
publisher_name = "mikestead"
152
+
extension_name = "dotenv"
153
+
[[extensions]]
154
+
publisher_name = "joel-harkes"
155
+
extension_name = "emlviewer"
156
+
[[extensions]]
157
+
publisher_name = "leighlondon"
158
+
extension_name = "eml"
159
+
[[extensions]]
160
+
publisher_name = "matthewpi"
161
+
extension_name = "caddyfile-support"
162
+
[[extensions]]
163
+
publisher_name = "bradlc"
164
+
extension_name = "vscode-tailwindcss"
165
+
[[extensions]]
166
+
publisher_name = "christan-kohler"
167
+
extension_name = "npm-intellisense"
168
+
[[extensions]]
169
+
publisher_name = "codezombiech"
170
+
extension_name = "gitignore"
171
+
[[extensions]]
172
+
publisher_name = "codiium"
173
+
extension_name = "wrangler"
174
+
[[extensions]]
175
+
publisher_name = "coolbear"
176
+
extension_name = "systemd-unit-file"
177
+
[[extensions]]
178
+
publisher_name = "dbaeumer"
179
+
extension_name = "vscode-eslint"
180
+
[[extensions]]
181
+
publisher_name = "drknoxy"
182
+
extension_name = "eslint-disable-snippets"
183
+
[[extensions]]
184
+
publisher_name = "esbenp"
185
+
extension_name = "prettier-vscode"
186
+
[[extensions]]
187
+
publisher_name = "martellaj"
188
+
extension_name = "license-injector"
189
+
[[extensions]]
190
+
publisher_name = "mtxr"
191
+
extension_name = "sqltools"
192
+
[[extensions]]
193
+
publisher_name = "mtxr"
194
+
extension_name = "sqltools-mysql"
195
+
[[extensions]]
196
+
publisher_name = "mtxr"
197
+
extension_name = "sqltools-pg"
198
+
[[extensions]]
199
+
publisher_name = "mtxr"
200
+
extension_name = "sqltools-sqlite"
201
+
[[extensions]]
202
+
publisher_name = "orta"
203
+
extension_name = "vscode-jest"
204
+
[[extensions]]
205
+
publisher_name = "prisma"
206
+
extension_name = "prisma"
207
+
[[extensions]]
208
+
publisher_name = "r3inbowari"
209
+
extension_name = "gomodexplorer"
210
+
[[extensions]]
211
+
publisher_name = "socheatsok78"
212
+
extension_name = "dotenv-vscode-stripped"
213
+
[[extensions]]
214
+
publisher_name = "streetsidesoftware"
215
+
extension_name = "code-spell-checker"
216
+
[[extensions]]
217
+
publisher_name = "tamasfe"
218
+
extension_name = "even-better-toml"
219
+
[[extensions]]
220
+
publisher_name = "ultram4rine"
221
+
extension_name = "vscode-choosealicense"
222
+
[[extensions]]
223
+
publisher_name = "wdhongtw"
224
+
extension_name = "gpg-indicator"
225
+
[[extensions]]
226
+
publisher_name = "xabikos"
227
+
extension_name = "javascriptsnippets"
228
+
[[extensions]]
229
+
publisher_name = "yahyabatulu"
230
+
extension_name = "vscode-markdown-alert"
+17
-3
README.md
+17
-3
README.md
···
1
1
# `@andreijiroh-dev/dotfiles@nixos` - @ajhalili2006's dotfiles under nixos + nixpkgs!
2
2
3
-
Yup, I'm starting a fresh for my dotfiles, now with [nixpkgs](https://nixos.org)
4
-
and [home-manager]()
3
+
Yup, I'm starting a fresh for my dotfiles for 2025 and beyond, now with
4
+
[nixpkgs](https://nixos.org) and [home-manager](https://nix-community.github.io/home-manager).
5
+
(Don't worry, I'll be maintaining the yadm-era setup for non-Nix setups seperately)
5
6
6
7
## Usage
7
8
8
9
### Using my Nixpkgs config
9
10
11
+
Make sure Git is installed in your NixOS/nixpkgs setup (via `/etc/nixos/configuration.nix` or
12
+
the usual `nix-env -iA nixpkgs.gitFull` or `nix profile install nixpkgs#gitFull` if using
13
+
Flakes) for the setup to work.
14
+
15
+
```bash
16
+
cd ~
17
+
git init
18
+
git remote add origin https://mau.dev/andreijiroh-dev/dotfiles
19
+
# TODO: add the rest
20
+
```
21
+
10
22
## Directory + File Map
11
23
12
24
### Essientials
13
25
14
-
* [`.config/nixos`](./.config/nixos/) - my NixOS configuration as a flake, including system tools
26
+
* [`.config/nixos`](./.config/nixos/) - my NixOS configuration as a flake, including system tools,
27
+
usually in sync
15
28
* [`.config/home-manager`](./.config/home-manager/) - Home-manager configs, mostly CLI and desktop apps go here
29
+
* [`bin`](./bin) - Shell scripts! (because Nix looks like Haskell to me)
+15
bin/nix4vscode-config-builder
+15
bin/nix4vscode-config-builder
···
1
+
#!/usr/bin/env bash
2
+
3
+
# Output the VSCode version
4
+
echo 'vscode_version = "'$(code --version | head -n1)'"'
5
+
echo
6
+
7
+
# Loop through each installed extension
8
+
code --list-extensions | while read extension; do
9
+
publisher_name=$(echo "$extension" | cut -d '.' -f 1)
10
+
extension_name=$(echo "$extension" | cut -d '.' -f 2-)
11
+
echo '[[extensions]]'
12
+
echo 'publisher_name = "'$publisher_name'"'
13
+
echo 'extension_name = "'$extension_name'"'
14
+
echo
15
+
done
+12
bin/nix4vscode-generator
+12
bin/nix4vscode-generator
···
1
+
#!/usr/bin/env bash
2
+
set -o pipefail
3
+
4
+
if [[ $DEBUG != "" ]]; then
5
+
set -x
6
+
fi
7
+
8
+
NIX4VSCODE_PATH=$(command -v nix4vscode)
9
+
NIX4VSCODE=${NIX4VSCODE:-"$HOME/bin/nix4vscode"}
10
+
11
+
"$NIX4VSCODE" --output "$HOME/.config/nixos/shared/vscode-extensions.nix" "$HOME/.nix4vscode.toml"
12
+
"$NIX4VSCODE" --openvsx --output "$HOME/.config/nixos/shared/openvsx-extensions.nix" "$HOME/.nix4vscode.toml" || true