-
- A minimal home-manager configuration flake.
- Completely Documented
- Zsh with prompt (powerlevel10k/starship) options.
- direnv with nix-direnv for nix-shell auto activation
- Opt-in git config with github-cli credential helper.
-
[TBD]home-complete:
- Complete home-manager configuration of my config, though it may not always be up-to-date.
-
- A dev shell with php 8.3 with only required extension and nodejs, for laravel.
- A php script to update PhpStorm Interpreter settings to use php in flake.
nix flake init -t github:bearoffwork/nix-templates#php83-nodejs nix flake update cp .envrc.example .envrc direnv allow
Add yourself to trusted-users.
trusted-users = <$USER>
Enable some features, this is required for this template.
extra-experimental-features = nix-command flakes
Opinionated: follow XDG Base Directory to keep home directory clean.
use-xdg-base-directories = true
After all your nix config will looks like this:
build-users-group = nixbld
trusted-users = <your user name>
extra-experimental-features = nix-command flakes
use-xdg-base-directories = true
Generate home-manager flake at default location.
# For home-mini
nix flake new -t github:bearoffwork/nix-templates#home-mini ~/.config/home-manager
# [WIP] home-complete
Update user hostname and
cd ~/.config/home-manager
# Update template username.
nix run nixpkgs#gnused -- -i "s/{{ username }}/$USER/" flake.nix home.nix
# Update system type declaration.
nix run nixpkgs#gnused -- -i "s/\"{{ system }}\"/$(nix eval --impure --expr 'builtins.currentSystem')/" flake.nix
If you generate the template at default location.
nix run home-manager switch
It's possible to override home-manager default config directory, for example:
nix flake new -t github:bearoffwork/nix-templates#home-mini ~/src/home
nix run home-manager --flake ~/src/home switch
After home manager activation, you can run following command once you update your config:
home-manager switch
Or this if you're using alternative home-manager config location.
home-manager --flake /path/to/your/config switch