2022-02-02 17:42:39 +01:00
|
|
|
nixpkgs / nix home-manager
|
|
|
|
==========================
|
2022-02-01 17:11:13 +01:00
|
|
|
|
2022-02-01 18:31:35 +01:00
|
|
|
I currently use Ubuntu and installed nix alongside.
|
|
|
|
This repository contains my personal ``~/.config/nixpkgs`` folder,
|
|
|
|
for sharing, inspiration and retrieving feedback.
|
2022-02-01 17:11:13 +01:00
|
|
|
|
2022-02-02 17:21:27 +01:00
|
|
|
This includes ``home.nix`` to maintain ``home-manager``,
|
|
|
|
see: https://nix-community.github.io/home-manager/index.html
|
|
|
|
|
2022-02-01 17:11:13 +01:00
|
|
|
.. contents:: Table of Contents
|
|
|
|
|
2022-02-01 18:31:35 +01:00
|
|
|
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.
|
|
|
|
|
2022-02-01 17:11:13 +01:00
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
|
|
|
Install (clone) into ``~/.config/nixpkgs``.
|
|
|
|
|
2022-02-02 17:21:27 +01:00
|
|
|
Install ``home-manager`` see: https://nix-community.github.io/home-manager/index.html
|
|
|
|
Execute ``home-manager switch``
|
|
|
|
|
2022-02-01 17:11:13 +01:00
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2022-02-02 17:21:27 +01:00
|
|
|
Add packages to ``home.nix`` and run ``home-manager switch``.
|
2022-02-01 17:14:21 +01:00
|
|
|
|
2022-02-01 17:11:13 +01:00
|
|
|
Update
|
|
|
|
------
|
|
|
|
|
|
|
|
The following will update the whole system and clean things up::
|
|
|
|
|
2022-02-02 17:40:23 +01:00
|
|
|
nix-channel --update \
|
|
|
|
&& home-manager switch \
|
|
|
|
&& home-manager expire-generations '-30 days' \
|
|
|
|
&& nix-store --gc
|
2022-02-01 17:11:13 +01:00
|
|
|
|
|
|
|
This will update the channel (fetch state of nixpkgs).
|
2022-02-02 17:40:23 +01:00
|
|
|
It then will update system.
|
|
|
|
Delete old generations.
|
2022-02-01 17:11:13 +01:00
|
|
|
And run garbage collection.
|