Personal dotfiles for Linux, mostly for Nixpkgs/NixOS-based and Termux setups. Mirrored using GitLab's push mirroring feature.
gitlab.com/andreijiroh-dev/dotfiles
···11+{ config, ... }:
22+33+{
44+ imports = [
55+ ./meta.nix
66+ ];
77+88+ # Home Manager needs a bit of information about you and the paths it should
99+ # manage. Also don't ask how we got here on the roleplaying part on the main
1010+ # nixpkgs branch of the dotfiles.
1111+ # TODO: Update the username and homeDirectory when switching between host-specific
1212+ # branches.
1313+ home = {
1414+ username = "gildedguy";
1515+ homeDirectory = "/home/gildedguy";
1616+ };
1717+}
+193
.config/home-manager/meta.nix
···11+# This is the meta configuration for my dotfiles with home-manager, except
22+# some home.{username,userDirectory} configs to ensure portability between
33+# hosts
44+55+{ config, pkgs, lib, ... }:
66+77+{
88+ # https://fnordig.de/til/nix/home-manager-allow-unfree.html
99+ nixpkgs = {
1010+ config = {
1111+ allowUnfree = true;
1212+ # https://github.com/nix-community/home-manager/issues/2942
1313+ allowUnfreePredicate = (_: true);
1414+ };
1515+ };
1616+1717+ # This value determines the Home Manager release that your configuration is
1818+ # compatible with. This helps avoid breakage when a new Home Manager release
1919+ # introduces backwards incompatible changes.
2020+ #
2121+ # You should not change this value, even if you update Home Manager. If you do
2222+ # want to update the value, then make sure to first check the Home Manager
2323+ # release notes.
2424+ home.stateVersion = "24.11"; # Please read the comment before changing.
2525+2626+ # The home.packages option allows you to install Nix packages into your
2727+ # environment.
2828+ home.packages = with pkgs; [
2929+ # # Adds the 'hello' command to your environment. It prints a friendly
3030+ # # "Hello, world!" when run.
3131+ # pkgs.hello
3232+3333+ # # It is sometimes useful to fine-tune packages, for example, by applying
3434+ # # overrides. You can do that directly here, just don't forget the
3535+ # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
3636+ # # fonts?
3737+ # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
3838+3939+ # # You can also create simple shell scripts directly inside your
4040+ # # configuration. For example, this adds a command 'my-hello' to your
4141+ # # environment:
4242+ # (pkgs.writeShellScriptBin "my-hello" ''
4343+ # echo "Hello, ${config.home.username}!"
4444+ # '')
4545+4646+ ## devtools ##
4747+ # https://httpie.io
4848+ httpie
4949+ # https://devenv.sh
5050+ devenv
5151+ # https://cli.github.com
5252+ gh
5353+ # bet we'll going to have a field day since Copilot is now available for free
5454+ # (this is seperate from the gh copilot extension for those asking)
5555+ # context: https://github.blog/news-insights/product-news/github-copilot-in-vscode-free/
5656+ github-copilot-cli
5757+ # markdownlint
5858+ markdownlint-cli
5959+ # https://doppler.com
6060+ doppler
6161+ direnv
6262+ shellcheck
6363+ hadolint
6464+6565+ ## programming languages
6666+ deno
6767+ nodejs_22
6868+ python313
6969+ pipx
7070+ pipenv
7171+7272+ ## language servers ##
7373+ # nix language server - https://github.com/oxalica/nil
7474+ nil
7575+ # https://github.com/alesbrelih/gitlab-ci-ls
7676+ gitlab-ci-ls
7777+ ];
7878+7979+ home.sessionPath = [
8080+ "${config.home.homeDirectory}/bin"
8181+ ];
8282+8383+ # Home Manager is pretty good at managing dotfiles. The primary way to manage
8484+ # plain files is through 'home.file'.
8585+ home.file = {
8686+ # # Building this configuration will create a copy of 'dotfiles/screenrc' in
8787+ # # the Nix store. Activating the configuration will then make '~/.screenrc' a
8888+ # # symlink to the Nix store copy.
8989+ # ".screenrc".source = dotfiles/screenrc;
9090+9191+ # # You can also set the file content immediately.
9292+ # ".gradle/gradle.properties".text = ''
9393+ # org.gradle.console=verbose
9494+ # org.gradle.daemon.idletimeout=3600000
9595+ # '';
9696+ };
9797+9898+ # Home Manager can also manage your environment variables through
9999+ # 'home.sessionVariables'. These will be explicitly sourced when using a
100100+ # shell provided by Home Manager. If you don't want to manage your shell
101101+ # through Home Manager then you have to manually source 'hm-session-vars.sh'
102102+ # located at either
103103+ #
104104+ # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
105105+ #
106106+ # or
107107+ #
108108+ # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
109109+ #
110110+ # or
111111+ #
112112+ # /etc/profiles/per-user/gildedguy/etc/profile.d/hm-session-vars.sh
113113+ #
114114+ home.sessionVariables = {
115115+ EDITOR = "nano";
116116+ NIXOS_ALLOW_UNFREE = "1"; # for impure builds
117117+ GIT_EDITOR = "code --wait";
118118+ VISUAL = "code --wait";
119119+ DOCKER_BUILDKIT = "1";
120120+ };
121121+122122+ # Let Home Manager install and manage itself.
123123+ programs.home-manager.enable = true;
124124+125125+ # let me cook with the configs, starting with git
126126+ programs.git = {
127127+ enable = true;
128128+ package = pkgs.gitAndTools.gitFull;
129129+ lfs = {
130130+ enable = true;
131131+ };
132132+ userName = "Andrei Jiroh Halili";
133133+ userEmail = "ajhalili2006@andreijiroh.dev";
134134+ aliases = {
135135+ signoff = "commit --signoff";
136136+ amend = "commit -a --amend";
137137+ remotes = "remote -v";
138138+ root = "rev-parse --show-toplevel";
139139+ unstage = "restore --staged";
140140+ stats = "status";
141141+ };
142142+ extraConfig = {
143143+ format = {
144144+ signOff = true;
145145+ };
146146+ init = {
147147+ defaultBranch = "main";
148148+ };
149149+150150+ # https://groups.google.com/g/binary-transparency/c/f-BI4o8HZW0
151151+ transfer = {
152152+ fsckobjects = true;
153153+ };
154154+ fetch = {
155155+ fsckobjects = true;
156156+ };
157157+ receive = {
158158+ fsckobjects = true;
159159+ };
160160+ push = {
161161+ autoSetupRemote = true;
162162+ };
163163+164164+165165+ };
166166+ };
167167+168168+ programs.vscode = {
169169+ enable = true;
170170+ package = pkgs.vscode;
171171+ enableExtensionUpdateCheck = true;
172172+ mutableExtensionsDir = true;
173173+ # userSettings = {
174174+ # "nix.enableLanguageServer" = true;
175175+ # "nix.serverPath" = "nil";
176176+ # "window.customTitleBarVisibility" = "auto";
177177+ # "window.titleBarStyle" = "custom";
178178+ # "window.menuBarVisibility" = "classic";
179179+ # "redhat.telemetry.enabled" = true;
180180+ # "github.copilot.editor.enableAutoCompletions" = false;
181181+ # "github.copilot.chat.followUps" = "always";
182182+ # "github.copilot.chat.terminalChatLocation" = "terminal";
183183+ # "git.confirmSync" = false;
184184+ # "microsoft-authentication.implementation" = "msal";
185185+ # "workbench.colorTheme" = "GitHub Dark Colorblind (Beta)";
186186+ # "workbench.iconTheme" = "material-icon-theme";
187187+ # "workbench.productIconTheme" = "material-product-icons";
188188+ # };
189189+ # We're importing what's generated from nix4vscode here as a workaround
190190+ # for now.
191191+ #extensions = lib.attrsets.mapAttrsToList (_: v: v) vscExts;
192192+ };
193193+}
···11# `@andreijiroh-dev/dotfiles@nixos` - @ajhalili2006's dotfiles under nixos + nixpkgs!
2233-Yup, I'm starting a fresh for my dotfiles, now with [nixpkgs](https://nixos.org)
44-and [home-manager]()
33+Yup, I'm starting a fresh for my dotfiles for 2025 and beyond, now with
44+[nixpkgs](https://nixos.org) and [home-manager](https://nix-community.github.io/home-manager).
55+(Don't worry, I'll be maintaining the yadm-era setup for non-Nix setups seperately)
5667## Usage
7889### Using my Nixpkgs config
9101111+Make sure Git is installed in your NixOS/nixpkgs setup (via `/etc/nixos/configuration.nix` or
1212+the usual `nix-env -iA nixpkgs.gitFull` or `nix profile install nixpkgs#gitFull` if using
1313+Flakes) for the setup to work.
1414+1515+```bash
1616+cd ~
1717+git init
1818+git remote add origin https://mau.dev/andreijiroh-dev/dotfiles
1919+# TODO: add the rest
2020+```
2121+1022## Directory + File Map
11231224### Essientials
13251414-* [`.config/nixos`](./.config/nixos/) - my NixOS configuration as a flake, including system tools
2626+* [`.config/nixos`](./.config/nixos/) - my NixOS configuration as a flake, including system tools,
2727+usually in sync
1528* [`.config/home-manager`](./.config/home-manager/) - Home-manager configs, mostly CLI and desktop apps go here
2929+* [`bin`](./bin) - Shell scripts! (because Nix looks like Haskell to me)
+15
bin/nix4vscode-config-builder
···11+#!/usr/bin/env bash
22+33+# Output the VSCode version
44+echo 'vscode_version = "'$(code --version | head -n1)'"'
55+echo
66+77+# Loop through each installed extension
88+code --list-extensions | while read extension; do
99+ publisher_name=$(echo "$extension" | cut -d '.' -f 1)
1010+ extension_name=$(echo "$extension" | cut -d '.' -f 2-)
1111+ echo '[[extensions]]'
1212+ echo 'publisher_name = "'$publisher_name'"'
1313+ echo 'extension_name = "'$extension_name'"'
1414+ echo
1515+done