Skip to content

teto/home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

how to use this repo

home

This folder contains my customizations for:

nixos Install via flakes

As long as flakes are not supported natively, you need to:

# when not setting #my-machine, defaults to hostname
# deploy a first generation without any secrets but in my favorite environment
$ nixos-rebuild switch --flake 'github:teto/home#laptop' --use-remote-sudo --option accept-flake-config true --option extra-experimental-features 'nix-command flakes'
$ just stow-config stow-home stow-local
# once you've moved on the secrets to where they must be, you can deploy the final configuration
$ nixos-rebuild switch --flake 'github:teto/home#laptop-with-secrets' --use-remote-sudo --option accept-flake-config true --option extra-experimental-features 'nix-command flakes'

Approach to handling secrets

Nix writes everything world-readable so you dont want to embed passwords in .nix files.

** information you prefer to hide but won’t seppuku if discovered…

… are handled via git-crypt in the repo.

** Infrastructure secrets

The solution I adopted is sops-nix which reads secrets from sops files.

*** How to securely load those secrets in systemd units ?

With sops, you could create /run/secrets/email_password and have your service pick it up. Set the proper owner to avoid anyone being able to read it.

One further security can be to rely on systemd-creds. LoadCredentialEncrypted

home/teto.config/systemd/user/mbsync.service.d/override.conf

** Most intimate secrets

you wont find on this repo. I handle them via pass and transfer them manually on my machines via the tool in the next section.

How to transfer state

Some secrets can’t be shared reliably on the repository so they need to be transferred.

How to transfer secrets from another machine

age key for sops

git crypt key to decypher secrets saved in the repo

TODO mention termscp or yazi + rsync ?

On the old machine:

$ wormhole send ~/.gnupg
$ wormhole send ~/.password-store 
$ wormhole send ~/.ssh
$ wormhole send ~/home/secrets

On the new machine:

$ just receive-secrets
tar xvf -C ~/.gnupg/ gnupg.tar
...

How to recover this repo cyphered files

Get git-crypt do decypher the files Retreive the key (possibly from an existing deployement via `git-crypt export-key toto.key`) and use it on the new deployement via:

$ git-crypt unlock secrets/git-crypt-teto.key

should unlock the files.

NOTE: nixos doesnt seem to work out of the box with git-crypt anymore, the secret is to leave your repo in a dirty state so that nix sees the unlocked secrets.nix !

Font management

fontconfig

Debug neovim config ?

You can see the resulting config via:

nix repl . --override-input nixpkgs github:nixos/nixpkgs
nixosConfigurations.laptop.config.home-manager.users.teto.programs.neovim.finalPackage.XXX

tips for reinstallation

Apart from dd, to create a windows installer USB key, unetbootin worked the best: `nix shell nixpkgs#unetbootin`

Tell me what to do please

About

Configurations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published