Select the types of activity you want to include in your feed.
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+#!/usr/bin/env bash
22+#shellcheck disable=SC1091
33+44+# My base bash shell customizations outside Home Manager, to make things
55+# portable at least.
66+# SPDX-License-Identifier: MPL-2.0
77+88+# do feature detection if keychain is installed
99+if command -v keychain >> /dev/null; then
1010+ FF_KEYCHAIN=1
1111+else
1212+ FF_KEYCHAIN=0
1313+fi
1414+1515+try_1password_ssh_agent() {
1616+ export OP_SSH_AUTH_SOCK="$HOME/.1password/agent.sock"
1717+ if [[ ! -S "$OP_SSH_AUTH_SOCK" ]]; then
1818+ echo "[ssh-agent-loader::1password] 1Password SSH agent isn't enabled or desktop app isn't installed yet"
1919+ return 1
2020+ fi
2121+2222+ echo "[ssh-agent-loader::1password] attempting to use 1Password SSH agent"
2323+ if ! SSH_AUTH_SOCK=$OP_SSH_AUTH_SOCK ssh-add -l >> /dev/null 2>&1; then
2424+ echo "[ssh-agent-loader::1password] something went wrong while checking for 1Password SSH agent availability"
2525+ echo "[ssh-agent-loader::1password] unlock the desktop app first or enable SSH agent from settings"
2626+ return 1
2727+ fi
2828+ export SSH_AUTH_SOCK=$OP_SSH_AUTH_SOCK
2929+ unset OP_SSH_AUTH_SOCK
3030+}
3131+3232+try_keychain_ssh_agent() {
3333+ if [[ $FF_KEYCHAIN == "1" ]]; then
3434+ echo "[ssh-agent-loader::keychain] attempting to use keychain for SSH agents"
3535+ eval "$(keychain --eval --agents ssh,gpg)"
3636+ fi
3737+}
3838+3939+ssh-agent-loader() {
4040+ if [[ $1 == "" || $1 == "auto" ]]; then
4141+ unset SSH_AGENT_PID SSH_AUTH_SOCK
4242+ if try_1password_ssh_agent; then
4343+ return
4444+ elif try_keychain_ssh_agent; then
4545+ return
4646+ else
4747+ echo "[ssh-agent-loader] SSH agent seems to be failed to load at the moment"
4848+ echo "[ssh-agent-loader] try again later by manually invoking the shell function"
4949+ return 1
5050+ fi
5151+ elif [[ $1 == "1passowrd" || $1 == "op" ]]; then
5252+ unset SSH_AGENT_PID SSH_AUTH_SOCK
5353+ try_1password_ssh_agent
5454+ elif [[ $1 == "keychain" ]]; then
5555+ try_keychain_ssh_agent
5656+ else
5757+ echo "ssh-agent-loader [auto|[1password|op|1p]|keychain]"
5858+ return 1
5959+ fi
6060+}
6161+6262+command -v direnv >> /dev/null && eval "$(direnv hook bash)"
6363+6464+# Technically a hack in case we don't use home-manager switch
6565+if [ -L "$HOME/.nix-profile" ] && [ -e "$HOME/.nix-profile" ]; then
6666+ export PATH="$HOME/.nix-profile/bin:$HOME:$PATH"
6767+ if [ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
6868+ source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
6969+ # Don't return yet, since we still do some stuff after that.
7070+ #return
7171+ fi
7272+fi
7373+7474+export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
7575+export DOCKER_BUILDKIT=1
7676+7777+# Check if we're running bash shell inside VS Code and update EDITOR and
7878+# GIT_EDITOR accordingly. We'll probably figure it out for desktop, but in the
7979+# meanwhile, just stick to nano at the moment.
8080+if [[ -n $VSCODE_IPC_HOOK_CLI ]]; then
8181+ EDITOR="code --wait"
8282+ ssh-agent-loader auto
8383+elif [[ -n "$SSH_CONNECTION" ]]; then
8484+ EDITOR="nano"
8585+ ssh-agent-loader keychain
8686+else
8787+ EDITOR="nano"
8888+ ssh-agent-loader auto
8989+fi
9090+export EDITOR GIT_EDITOR=$EDITOR
-17
.config/home-manager/home.nix
···11-{ config, ... }:
22-33-{
44- imports = [
55- ../nixos/shared/home-manager/main.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-}
+29
.profile
···11+#!/usr/bin/env sh
22+33+# ~/.profile: executed by the command interpreter for login shells.
44+# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
55+# exists.
66+# see /usr/share/doc/bash/examples/startup-files for examples.
77+# the files are located in the bash-doc package.
88+99+# the default umask is set in /etc/profile; for setting the umask
1010+# for ssh logins, install and configure the libpam-umask package.
1111+#umask 022
1212+1313+# if running bash
1414+if [ -n "$BASH_VERSION" ]; then
1515+ # include .bashrc if it exists
1616+ if [ -f "$HOME/.bashrc" ]; then
1717+ . "$HOME/.bashrc"
1818+ fi
1919+fi
2020+2121+# set PATH so it includes user's private bin if it exists
2222+if [ -d "$HOME/bin" ] ; then
2323+ PATH="$HOME/bin:$PATH"
2424+fi
2525+2626+# set PATH so it includes user's private bin if it exists
2727+if [ -d "$HOME/.local/bin" ] ; then
2828+ PATH="$HOME/.local/bin:$PATH"
2929+fi
+5
.ssh/git/allowed_signers
···11+# @ajhalili2006's keys
22+ajhalili2006@andreijiroh.dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXuD3hJwInlcHs3wkXWAWNo8es3bPAd2e8ipjyqgGp2 SSH Key - main personal key, circa 2022
33+ajhalili2006@andreijiroh.dev ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzMlrUe7qMA1P0lP56lq2dKTrwFU6CrVltQ9um+PhOMLkoi31kAlujHtWF6mqGRLXcK0Ao/0Wqug++r82Zu0u7dpAv8LCExtaRRMzagwPkEe4OOqUBOpS6mggfsik8mNA+1UtpkXJ+ZiB4cXtNKEZC0jtxWOTXSV67qgkSxuO+YBWB+7pnESkB0KorqwOoWGGUVfYQtbKUAt6VqM4s6dn7saXqwmN0tCPO6a+4L4mazkYjFD11HhktYsjP9dvnxYSOtMrSFb9JOXRST2LdiIJgwg+HTqBSWGO7aBRHMJaTF3ajlbMtKDQI/EcNQLyGgX6yFdjjzz9DRY+2oU0vPTytdqM2BKsfLlR0GVg7BVL7TZPaLJ1lgpCl4Z1oClW9FOzhnYJVT0W+IKPsnYsFPfv/BVgjWF7YtLdc5zqFJ31PULtikCyd0I6Kt95YD0HdrlR2faWcBHI8KKEAwCCanodGnK/xTOxisTX2dXOxx3mvR/L3Wil2ca5hnD+vt500/o8= SSH Key - ajhalili2006@launchpad.net
44+ajhalili2006@agmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEXuD3hJwInlcHs3wkXWAWNo8es3bPAd2e8ipjyqgGp2 SSH Key - main personal key, circa 2022
55+ajhalili2006@gmail.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzMlrUe7qMA1P0lP56lq2dKTrwFU6CrVltQ9um+PhOMLkoi31kAlujHtWF6mqGRLXcK0Ao/0Wqug++r82Zu0u7dpAv8LCExtaRRMzagwPkEe4OOqUBOpS6mggfsik8mNA+1UtpkXJ+ZiB4cXtNKEZC0jtxWOTXSV67qgkSxuO+YBWB+7pnESkB0KorqwOoWGGUVfYQtbKUAt6VqM4s6dn7saXqwmN0tCPO6a+4L4mazkYjFD11HhktYsjP9dvnxYSOtMrSFb9JOXRST2LdiIJgwg+HTqBSWGO7aBRHMJaTF3ajlbMtKDQI/EcNQLyGgX6yFdjjzz9DRY+2oU0vPTytdqM2BKsfLlR0GVg7BVL7TZPaLJ1lgpCl4Z1oClW9FOzhnYJVT0W+IKPsnYsFPfv/BVgjWF7YtLdc5zqFJ31PULtikCyd0I6Kt95YD0HdrlR2faWcBHI8KKEAwCCanodGnK/xTOxisTX2dXOxx3mvR/L3Wil2ca5hnD+vt500/o8= SSH Key - ajhalili2006@launchpad.net