NixOS/Nix/Flakes | home-manager | i3wm | polybar | rofi | wezterm | bash with ble.sh
My home nix configs/dotfiles with home-manager(standalone mode) and configuration.nix. Still a ways to go. (It will remain a work in progress forever.)
Basically, I let home-manager manage most of the stuff except NixOS system-specific settings. NixOS system-specific settings are in configuration.nix. If it's not NixOS you can simply use only the home-manager part.
Notice: This flake/repository contains user environment specific settings. So it is necessary to make adjustments according to your environment, e.g. your machines, your language, your displays, your keyboards, your accounts. Don't use everything as it is unless you are me. It's better to start small by using only the parts you understand.
NOTE: It assumes Nix Flakes feature is available.
nix flake clone github:tars0x9752/home --dest <DIR_NAME>to clone this repo. thencd <DIR_NAME>- Since this repository is a flake, you don't even need
gitto clone. Though if you prefer git command, you can dogit cloneinstead.
- Since this repository is a flake, you don't even need
nix develop -c dev:os-switchnix develop -c dev:installto install home-manager itself and apply the home configurationreboot
- install nix
sh <(curl -L https://nixos.org/nix/install) --daemon
nix flake clone github:tars0x9752/home --dest <DIR_NAME>to clone this repo. thencd <DIR_NAME>- Since this repository is a flake, you don't even need
gitto clone. Though if you prefer git command, you can dogit cloneinstead.
- Since this repository is a flake, you don't even need
nix develop -c dev:installto install home-manager itself and apply the home configurationreboot
NOTE: At first I used Makefile for these commands, but now I've added the devShell commands as well. So you can also use
nix developand the devShell commands instead of make. Runnix developthenmenuto see available devShell commands.
EDIT: Now, I've completely switched to devShell commands instead of make.
The following commands are assumed to be used in nix develop shell. Auto-completion should work to help you type commands.
Run nix develop first or use direnv instead. There's nix-direnv integration in this configs so no need to nix develop manually every time. (If direnv is already enabled, it will automatically reproduce nix develop environment when you cd to this directory. You need to run direnv allow if it's not enabled yet.)
Show all available devShell commands.
menudev:switchIt depends on what has changed but may need to restart i3wm or reboot the entire system.
(Restarting i3wm inplace is $mod+Shift+r and it will also restart polybar)
dev:os-switchdev:updatedev:update-nixpkgs# normal garbage collection
dev:gc
# delete all generations older than 5 days
dev:gc-stale
# delete all old generations
dev:gc-alldev:gc-all frees up more disk space than dev:gc, but it'll delete all old generations of all profiles. Don't use this if you don't understand what it means since this makes rollbacks to previous configurations impossible.
read flake.nix
