You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Cyryl Płotnicki 9bc0671388 remove vpsfree from the pool of distributed builders, focusing on local builds 5 hours ago
.config re-pair the trackball 2 years ago
.github Update FUNDING.yml 3 years ago
.woodpecker more agents with more logging 5 days ago
guix reinstall guix vm 4 months ago
nixos remove vpsfree from the pool of distributed builders, focusing on local builds 5 hours ago
tools remove obsolete tools 5 months ago
.build.yml add statix check 7 months ago
.envrc add basic devshell 7 months ago
.gdbinit better gdb dashboard setup 2 years ago
.ghci ghci config added 8 years ago
.gitattributes Add windows debug tools (#93) 6 years ago
.gitconfig.cygwin Add windows debug tools (#93) 6 years ago
.gitconfig.linux Add basic Windows-specific git configs (#72) 6 years ago
.gitconfig.linux.form3 Change key signature for work 2 years ago
.gitconfig.linux.private use delta for git diff 2 years ago
.gitconfig.mac Add basic Windows-specific git configs (#72) 6 years ago
.gitconfig.windows Add basic Windows-specific git configs (#72) 6 years ago
.gitconfig_includes.common more more git config to nix 2 years ago
.gitconfig_includes.cygwin Add basic Windows-specific git configs (#72) 6 years ago
.gitconfig_includes.mac Add Mac support (#89) 6 years ago
.gitconfig_includes.windows Add basic Windows-specific git configs (#72) 6 years ago
.gitignore add basic devshell 7 months ago
.gitmodules remove submodule 2 years ago
.sops.yaml add both sops keys for thinky 2 months ago
.vimrc update coc 2 months ago
.vimrc.coc use old ctrl-b bindings for vim 2 months ago
.vimrc.filetypes cleanup vim config around formatting 9 months ago
.vimrc.keymap update coc 2 months ago
.vimrc.plugins-settings newer nvim 2 months ago
.vimrc.settings update neovim 1 year ago
INSTALL_MACOS.md Minimal flake for darwin 9 months ago
LICENSE Update LICENSE 5 years ago
README.md add build badge to readme 6 days ago
flake.lock add helix editor 2 days ago
flake.nix add helix editor 2 days ago
shell.nix add statix check 7 months ago

README.md

status-badge

https://git.cyplo.dev/cyplo/dotfiles

My dotfiles - including my vim, terminal and font configs. Mostly focusing on setting things up on NixOS, but supporting other OSes where possible.

bootstrap new machine with NixOS:

  1. boot the target machine from the livecd
  2. change password for the default user nixos
  3. ssh from another, already bootstrapped, machine

remote (sata + MBR):

sudo su -
parted /dev/sda -- mklabel msdos
parted /dev/sda -- rm 1
parted /dev/sda -- rm 2
parted /dev/sda -- rm 3
parted /dev/sda -- rm 4
parted /dev/sda -- mkpart primary 1MiB 1GiB
parted /dev/sda -- mkpart primary 1GiB 100%
cryptsetup luksFormat /dev/sda2

remote (sata):

sudo su -
# `efibootmgr -b 000x -B` if you want to remove entry number x
yes | parted /dev/sda -- mklabel gpt
parted /dev/sda -- rm 1
parted /dev/sda -- rm 2
parted /dev/sda -- rm 3
parted /dev/sda -- rm 4
parted /dev/sda -- mkpart ESP fat32 1MiB 1GiB
parted /dev/sda -- set 1 esp on
parted /dev/sda -- mkpart primary 1GiB 100%
cryptsetup luksFormat /dev/sda2

remote (nvme):

sudo su -
# `efibootmgr -b 000x -B` if you want to remove entry number x
yes | parted /dev/nvme0n1 -- mklabel gpt
parted /dev/nvme0n1 -- rm 1
parted /dev/nvme0n1 -- rm 2
parted /dev/nvme0n1 -- rm 3
parted /dev/nvme0n1 -- rm 4
parted /dev/nvme0n1 -- rm 5
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 1GiB
parted /dev/nvme0n1 -- set 1 esp on
parted /dev/nvme0n1 -- mkpart primary 1GiB 100%
cryptsetup luksFormat /dev/nvme0n1p2

remote (sata):

cryptsetup luksOpen /dev/sda2 crypt

remote (nvme):

cryptsetup luksOpen /dev/nvme0n1p2 crypt

remote (sata+MBR):

mkfs.ext2 /dev/sda1 -L boot

remote (sata + GPT):

mkfs.fat -F 32 -n boot /dev/sda1

remote (nvme + GPT):

mkfs.fat -F 32 -n boot /dev/nvme0n1p1

remote (sata):

mkfs.btrfs -L nixos /dev/mapper/crypt
cryptsetup luksClose crypt
cryptsetup luksOpen /dev/sda2 crypt
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot
nixos-generate-config --root /mnt

remote (nvme):

mkfs.fat -F 32 -n boot /dev/nvme0n1p1
mkfs.btrfs -L nixos /dev/mapper/crypt
cryptsetup luksClose crypt
cryptsetup luksOpen /dev/nvme0n1p2 crypt
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot
nixos-generate-config --root /mnt

local:

tar -cvz . > ../dotfiles.tar.gz
scp ../dotfiles.tar.gz nixos@remote:/tmp

remote:

mkdir -p /mnt/home/cyryl/dev/dotfiles/
tar -xvf /tmp/dotfiles.tar.gz -C /mnt/home/cyryl/dev/dotfiles
# merge /mnt/etc/nixos/hardware-configuration.nix into /mnt/home/cyryl/dev/dotfiles/nixos/boxes/bootstrap/hardware-configuration.nix
nix-shell -p nixUnstable git
cd /mnt/home/cyryl/dev/dotfiles/
systemd-inhibit nixos-install --flake '.#bootstrap'
passwd cyryl
chown cyryl -R /home/cyryl
reboot

ctrl-alt-f1 cyryl login:

cd ~/dev/dotfiles/
mkdir -p nixos/boxes/HOSTNAME
cp nixos/boxes/bootstrap/2.nix nixos/boxes/HOSTNAME/default.nix
cp nixos/boxes/bootstrap/hardware-configuration.nix nixos/boxes/HOSTNAME/
sudo ln -vfs /home/cyryl/dev/dotfiles/nixos/boxes/HOSTNAME/default.nix /etc/nixos/configuration.nix
sudo nixos-rebuild switch --flake '.#HOSTNAME'
reboot
cd ~/dev/dotfiles/
nixos-install --flake '.#'
ssh-keygen -t ed25519
mkdir -p ~/.config/sops/age/
nix-shell -p 'import (fetchTarball "https://github.com/Mic92/ssh-to-age/archive/main.tar.gz") {}' sops age
ssh-to-age -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt
age-keygen -y ~/.config/sops/age/keys.txt #add result to .sops.yaml as a 'source' key
# add machine's age public key from /var/lib/sops-nix/key.txt to .sops.yaml as a target key
sops --add-age [source-age-key] -i -r ./nixos/i3/openweathermap.sops.yaml
sops --add-age [target-age-key] -i -r ./nixos/i3/openweathermap.sops.yaml
# syncthing
# vault
# firefox sync
# bitwarden
# add key to sr.ht
cd ~/dev/dotfiles
git checkout nixos/boxes/bootstrap

inspiration

things to check out

flakes

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};

outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = {
hyacinth = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./machines/hyacinth)
];
specialArgs = { inherit inputs; };
};