Skip to content

peromage/pix

Repository files navigation

PIX - Peromage’s nIX flake

> By the way I use Nix.

About

This is my personal daily driver configuration collection built on top of NixOS with Nix Flake.

Before proceeding, be aware of that this is highly customized and it may NOT work for you.

Get started

Clone and evaluate.

git clone https://github.com/peromage/pix.git
nix flake show pix

Alternatively, it can be used as a piece in your flake. This gives you the freedom to add improvised configurations from setup to setup. Although this is contrary to deterministic builds, sometimes it is convenient to add temporary settings such as confidential information outside of the version control system. You can use the template as a start point.

nix flake init -t github:peromage/pix/master#

Immutability and Dynamics

By default the immutable user option pix.users.immutable is disabled. However, when it is enabled each user declared within pix.users.profiles namespace must supply either a hashed password or hashed password file by pix.users.profiles.<name>.hashedPassword.

To generate a hashed password:

mkpasswd -m sha-512

However, there is problem that if a hashed password file is used, it must be tracked by git so that flake can recognize it, or paste the password in config files. I’m not a big fan of storing secrets in my configurations in either way. Although there are some solutions out there to encrypt/decrypt secrets automatically like agenix, adding it introduces more dependencies and managing the SSH key is another hassle. So some dynamics are necessary and it is easier, at least for me.

A simple solution would be creating a local flake.nix that is not tracked anywhere, which has been demonstrated previously already.

Sub-projects

Emacs (Pew)

My personal Emacs configuration.

Dotfiles (Pot)

I didn’t rewrite all my dotfiles into Nix modules since I also work on other distributions. Most apps are simply wrapped by HomeManager and they still use dotfiles configurations under the hood. This works best for me as a balanced option as it leaves freedom to drop configs in-place in other non-Nix systems.

Appendix

Fcitx5 with Rime

Customization should go into name.custom.yaml in order to avoid overwrite from redeployment. For example, ~/.config/share/fcitx5/rime/default.yaml, the corresponding customization file is ~/.config/share/fcitx5/rime/default.custom.yaml.

To redeploy (rebuild), run

fcitx5 -r

NOTE: In Gnome, super+space is eatten by mutter. Need to find a workaround to enable it by users or simply use a different key binding like Ctrl+| (a mnemonic key corresponding to Emacs’s Ctrl+\).