Skip to content

gw31415/dotfiles

Repository files navigation

dotfiles and configurations for ama

Installation

nix run github:gw31415/dot-cli#install

Docker

nix build .#packages.x86_64-linux.dockerImage
docker load < result
docker run --rm -it ama-home-manager:latest

The image is built directly by Nix from .#packages.<system>.dockerImage, using the ama-linux-container-* Home Manager configuration and a small Nix-built runtime root. The image bakes the generated Home Manager profile into /home/ama, then starts fish -l directly without running home-manager at container startup. This output is exposed only for Linux systems; if you want another architecture, switch x86_64-linux to the target Linux system such as aarch64-linux.

For mutable container bootstrap tasks that should stay out of the Nix build, use bootstrap-published-container.sh. The GitHub Actions workflow runs it once against the loaded image, then commits the mutated container filesystem back into the image before pushing it.

dockerImageImpure intentionally performs mutable setup during the build, so it must be evaluated with --impure. On macOS, build it from a Linux Nix container:

docker run --rm -v "$PWD":/work -w /work nixos/nix \
  sh -lc 'nix --extra-experimental-features "nix-command flakes" build --impure .#dockerImageImpure'

GitHub Container Registry

Pushes to GitHub also build and publish the image with GitHub Actions via publish-container.yml. The workflow builds .#packages.x86_64-linux.dockerImage, loads it into Docker, runs the mutable bootstrap script once to populate ~/.config/home-manager and execute extra setup commands, then pushes these tags to ghcr.io/gw31415/ama-home-manager:

  • latest on pushes to main
  • sha-<commit sha> on every push
  • <branch> or <tag> using the pushed ref name

macFUSE

macFUSE needs to change the Security Policy.

dot Usage

Switching (update/upgrade) Environments

  • Shortcut for dot --home, or install github:gw31415/dotfiles.

     dot
  • Switch env of home-manager

     dot --home # or `dot -h`
  • Switch env of nix-darwin

     dot --darwin # or `dot -d`
  • Switch all envs

     dot --all # or `dot -a`
  • Fetch & update the flake.lock

     dot --update # or `dot -u`

Utilities

  • Open the dir-changed devShell of the dotfiles and run <cmd>. Without <cmd>, it will open $SHELL.

     dot sh <cmd>
  • Nix garbage-collection

     dot gc
  • Nix garbage-collection (aggressive)

     dot gc --aggressive

Examples

  • Update all environments after updating the flake.lock

     dot -ua
  • Show git status of the current dotfiles

     dot sh git status

About

dotfiles and configurations

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors