Daniel Siepmann
e8e076d85f
As we add more and more files, move to set with curly braces. Maybe home-files is a better approach, but not documented and I don't understand it to well yet. I guess I've to create a derivation which "builds" all the files. Maybe to complicated right now. Might also make sense to build modules for such tools in future where I can configure within nix, just like git.nix, and it will generate the config. Might be cool for some things where configs might change, but the actual things to configure might not. The generation of the file can change within nix, while configuration within nix stays the same?! ;) |
||
---|---|---|
home | ||
overlays | ||
home.nix | ||
readme.rst |
nixpkgs / nix home-manager
I currently use Ubuntu and installed nix alongside. This repository contains my personal ~/.config/nixpkgs
folder, for sharing, inspiration and retrieving feedback.
This includes home.nix
to maintain home-manager
, see: https://nix-community.github.io/home-manager/index.html
Table of Contents
Disclaimer
This is my personal setup for my local laptop running Ubuntu. I share this for free so everyone can have a look and inspiration or provide feedback to me.
This is not intended to be used by anyone else just by copy and pasting or cloning.
Installation
Install (clone) into ~/.config/nixpkgs
.
Install home-manager
see: https://nix-community.github.io/home-manager/index.html Execute home-manager switch
Usage
Add packages to home.nix
and run home-manager switch
.
Folder structure
The folder overlays
contains overlays for nix itself. E.g. alter packages like patching.
The folder home
is related to extras for home-manager. It has the following sub folder:
home/configurations
Holds home-manager configuration for packages / services. Each file corresponds to a single package. Each file is loaded within
home.nix
.home/services
Holds custom definitions for systemd services. Each file corresponds to a single service. Each file is loaded within
home.nix
.
Update
The following will update the whole system and clean things up:
nix-channel --update && home-manager switch && home-manager expire-generations '-30 days' && nix-store --gc
This will update the channel (fetch state of nixpkgs). It then will update system. Delete old generations. And run garbage collection.
Resources
Some resources I found useful (in no particular order):