Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenlijun99/dotfiles
https://github.com/chenlijun99/dotfiles
bashrc-configs neovim-dotfiles tmux-configuration vim-configuration
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chenlijun99/dotfiles
- Owner: chenlijun99
- Created: 2017-04-09T13:52:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T18:34:31.000Z (21 days ago)
- Last Synced: 2024-12-12T19:34:32.522Z (21 days ago)
- Topics: bashrc-configs, neovim-dotfiles, tmux-configuration, vim-configuration
- Language: Vim Script
- Size: 7.37 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My dotfiles
My current dotfiles is based on Nix and NixOS.
Getting started:
```sh
$ git clone https://github.com/chenlijun99/dotfiles --recursive
```## NixOS
[src/nixos](./src/nixos/) contains my flake-based NixOS configuration.
To build the OS and switch to the new generation, run:
```sh
$ nixos-rebuild switch --flake ./src/nixos#
```To get list of available NixOS system generations, run:
```sh
$ nix-env --list-generations -p /nix/var/nix/profiles/system
```To rollback to the previous generation, run
```sh
$ nixos-rebuild switch --rollback
```To revert to a specific system generation, run
```sh
$ nix-env --list-generations -p /nix/var/nix/profiles/system
```To update flake inputs, run:
```sh
# Update one input
$ cd ./src/nixos/ && nix flake lock --update-input
# Note that the --update-input can be also used with other `nix flake` commands.
# So you can also run
# This let's you update the flake and re-build the OS in one command
$ nixos-rebuild switch --flake ./src/nixos# --update-input# Update all the inputs
$ cd ./src/nixos/ && nix flake update
```### Home manager
The provided NixOS configuration already integrates Home Manager. Every NixOS system selects which user to include (together with their home manager configuration).
But Home Manager can also be use standalone. To activate an user home configuration manually.```sh
$ home-manager switch --flake ./src/nixos#
```This is useful when debugging home-manager specific Nix expressions.
### Build custom NixOS image
```sh
$ nix build ./src/nixos#
# E.g. build my VirtualBox
$ nix build ./src/nixos#virtualbox-guest
```### Space optimization
```sh
# Delete all the old generations of all profiles and then perform GC.
# NOTE: "sudo" is necessary to delete NixOS generations
# Otherwise only unused packages, home-manager generations will be deleted.
$ sudo nix-collect-garbage -d
# Similar to the previous command, but deles only generations older than the given period
$ sudo nix-collect-garbage --delete-older-than
```See also:
* [Storage optimization - NixOS Wiki](https://nixos.wiki/wiki/Storage_optimization)
### Hardware (machine) config
```sh
# Generate or update machine-specific configuration
$ nixos-generate-config --dir src/nixos/machines/
```## Legacy
I now use NixOS, but I still try to keep things usable also on other distros. Here it is documented how my dotfiles used to work before the migration to NixOS.
### Installation
```sh
git clone https://github.com/chenlijun99/dotfiles --recursive
cd dotfiles
# Install dotfiles into $HOME, by creating system links.
./install.sh
```
Open a new shell.