This is my mono-repository for my machines configuration and my dotfiles.
- multi machine
- flakes
- Custom patched Suckless Terminal (st)
- A 32 bits Brother printer driver
- Some Gnome Extensions packed directly from Github (useful is maintainers keep behind supporting the latest Gnome Versions)
- mip.rs, a fast and suckless markdown viewer written in Rust.
- WIP: Skull, a tool for managing git working copies on demand.
- some NUR crystal apps
clone:
cd ~
git clone --recurse-submodules git@github.com:mipmip/nixos.git
cd /etc
mv /etc/nixos /etc/nixos.bak
sudo ln -s /home/pim/nixos nixos
nixos-rebuild:
cd /etc/nixos
sudo nixos-rebuild switch --flake .#ojs
Home Manager:
cd /etc/nixos
home-manager switch --flake .#pim@ojs --impure
- add file registration in secrets/secrets.nix
- cd secrets
- create file or edit file
agenix -e aws-credentials-copy.age
- add file purpose to modules/nix-agenix.nix
example: agenix -i ~/.ssh/id_ed25519 -e aws-credentials-copy.age
- fix NUR url, maybe nur.nix
- home manager flake
- delete i-am-desktop
- new method i-am-secondbrain
- public features and documentation Usage
- setup firefox profiles: https://discourse.nixos.org/t/help-setting-up-firefox-with-home-manager/23333
- install firefox language packs from nur
- tmux A or B
Lego1
- swap alt/win keys
- commit nixos
- swap ctrl/fn keys
- wayland and scaling
Rodin
- commit nixos
For macOS provisioning I only use Home-Manager from Nix. Cli tools are declared
in home-manager/programs/macos-bundle.nix. Other mac-apps are in
home-manager/files-macos/Brewfile
. Install them with brew bundle install
- install Homebrew
- install Nix on mac](https://nixos.org/download.html#nix-install-macos).
- then install Home Manager. See Home Manager Manual
when refactoring it's nice to quickly see which hosts have missing modules. To see this run:
./RUNME.sh missing_modules
Make sure home-manager is installed. On Mac I home-manager as single user install. On nixos home-manager is installed automatically.
Create home dir conf:
mkdir -p ~/.config/nixpkgs
echo "{\n allowUnfree = true;\n}" > ~/.config/nixpkgs/config.nix
Make the symlink ~/.config/nixpkgs/home.nix
pointing to one of the home-confs
located in ~/nixos/home-manager/
ln -s ~/nixos/home-manager/home-[some-home-conf].nix ~/.config/nixpkgs/
Test configuration with:
home-manager switch
home-manager switch --flake .#pim --impure
I use GNOME as desktop environment with a few extensions to give me some features I'm used too from the time I used macOS as primary OS.
I payed a lot of time optimizing my terminal and vim configuration. I use St with a few patches for better aesthetics.
My St/Vim writing configuration has a larger line height, a dedicated font, a pure white background together with a grayscale writing theme. Here's a pic showing my writing environment.
Stage 2 of my security strategy is a git submodule with some configurations not relevant for public. This repo does not contain passwords or secrets.
Build from any nix machine with:
nix build './#pinephone-img'
If nix complains about some "experimental features", then add to the host's nix
config: nix.extraOptions = "experimental-features = nix-command flakes";
flash with:
sudo dd if=$(readlink result) of=/dev/sdb bs=4M oflag=direct conv=sync status=progress
Then insert the SD card, battery into your pinephone and hold the power button for a few seconds until the power LED turns red. after releasing the power button, the LED should turn yellow, then green. you'll see the "mobile NixOS" splash screen and then be dropped into a TTY login prompt.
build on host machine
nix build .\#nixosConfigurations.pinephone.config.system.build.toplevel --print-out-paths
copy to pinephone
nix-copy-closure --to root@192.168.13.103 ./result
on pinephone
/nix/store/nid92px7zybggpxh5j6bwzcpmjh10p8h-nixos-system-nixos-22.05.20220520.dfd8298/bin/switch-to-configuration switch
ln -s ~/nixos/nix-on-droid ~/.config/
nix-on-droid switch -F ~/.config/nix-on-droid/flake.nix
ssh nix-on-droid@xxxxx -p8022