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.
2022-02-09 19:09:12 +01:00
This repository contains my personal `~/.config/nixpkgs` folder,
2022-02-01 18:31:35 +01:00
for sharing, inspiration and retrieving feedback.
2022-02-01 17:11:13 +01:00
2022-02-09 19:09:12 +01:00
This includes `home.nix` to maintain `home-manager` ,
2022-02-02 17:21:27 +01:00
see: https://nix-community.github.io/home-manager/index.html
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
------------
2022-02-09 19:09:12 +01:00
Install (clone) into `~/.config/nixpkgs` .
2022-02-01 17:11:13 +01:00
2022-02-09 19:09:12 +01:00
Install `home-manager` see: https://nix-community.github.io/home-manager/index.html
Execute `home-manager switch`
2022-02-02 17:21:27 +01:00
2022-02-01 17:11:13 +01:00
Usage
-----
2022-02-09 19:09:12 +01:00
Add packages to `home.nix` and run `home-manager switch` .
2022-02-01 17:14:21 +01:00
2022-02-02 18:17:06 +01:00
Folder structure
----------------
2022-02-09 19:09:12 +01:00
The folder `overlays` contains overlays for nix itself.
2022-02-02 18:17:06 +01:00
E.g. alter packages like patching.
2022-02-09 19:09:12 +01:00
The folder `home` is related to extras for home-manager.
2022-02-02 18:17:06 +01:00
It has the following sub folder:
2022-02-09 19:09:12 +01:00
`home/files`
2022-02-03 09:10:38 +01:00
Holds configuration files.
home-manager doesn't provide modules for all programs.
2022-02-09 19:09:12 +01:00
Those files can be added via `xdg.configFile` .
2022-02-07 09:46:39 +01:00
2022-02-09 19:09:12 +01:00
`home/modules`
2022-02-07 09:46:39 +01:00
Holds nix modules.
Not all programs provide modules out of the box.
I add my own here, which I might create PRs for in future.
2022-02-03 09:10:38 +01:00
2022-02-09 19:09:12 +01:00
`home/programs`
2022-02-03 09:10:38 +01:00
Holds home-manager `programs.` entries.
Each file corresponds to a single program.
2022-02-09 19:09:12 +01:00
Each file is loaded within `home.nix` .
2022-02-02 18:17:06 +01:00
2022-02-09 19:09:12 +01:00
`home/services`
2022-02-03 09:10:38 +01:00
Holds home-manager `services.` entries.
Each file corresponds to a single service.
2022-02-09 19:09:12 +01:00
Each file is loaded within `home.nix` .
2022-02-03 09:10:38 +01:00
2022-02-10 19:04:33 +01:00
`flakes/`
Holds structure with specific flakes.
2022-02-11 10:03:01 +01:00
Those should provide libraries and template.
2022-02-10 19:04:33 +01:00
2022-02-01 17:11:13 +01:00
Update
------
2022-02-14 08:05:09 +01:00
Update can be done via `custom-update-system` package which is available within
the overlay.
2022-02-02 20:27:47 +01:00
2022-02-03 09:46:08 +01:00
Manual changes
--------------
List of manual needed changes for various reasons.
2022-02-07 08:03:43 +01:00
* .desktop files seem not to be supported by home-manager yet.
2022-02-09 19:09:12 +01:00
They need to manually be linked, e.g.:
2022-02-03 09:46:08 +01:00
2022-02-09 19:09:12 +01:00
cd ~/.local/share/applications & & ln -s ~/.nix-profile/share/applications/* .
2022-02-03 14:34:32 +01:00
2022-02-02 22:35:28 +01:00
Todos
-----
2022-02-07 13:04:58 +01:00
* Migrate neovim
2022-02-02 22:35:28 +01:00
* Migrate ssh config (I don't really like to expose customer server names and configs to outer world, how to handle?)
* Migrate PGP?
2022-02-09 19:09:12 +01:00
* Right now I've installed gnupg2, gnupg, gpg on ubuntu
2022-02-08 18:47:15 +01:00
* Migrate firefox (with geckodriver), thunderbird, ungoogled chromium
2022-02-10 21:34:32 +01:00
* Migrate home manager to use flake for better rollback support if update breaks something.
2022-02-09 19:09:12 +01:00
* Maybe PR upstream: `./home/modules/programs/languagetool.nix` .
2022-02-09 09:34:22 +01:00
* Migrate other system configurations like keyboard?!
2022-02-02 22:35:28 +01:00
* Begin migrating further configuration, e.g. php fpm pools and apache config (Again I don't like customer internals in public repo, how to handle?)
2022-02-08 08:52:02 +01:00
Does that work? I guess nix (home-manager) shouldn't write outside of user home.
Maybe within vm as preparation of switch to nix os?
2022-02-07 08:22:30 +01:00
2022-02-09 09:34:22 +01:00
* Migrate desktop environment (is that possible? I select it within ubuntu login screen, guess it needs to be installed or registered somwhere in ubuntu)
i3-wm, i3, i3lock-color
2022-02-07 08:22:30 +01:00
2022-02-02 22:35:28 +01:00
Ideas
-----
* Maybe I can have a private channel which provides more sensitive info like customer related things and is referenced from here?
I then can make that repo private but keep this one here public?
2022-02-02 20:27:47 +01:00
Resources
---------
Some resources I found useful (in no particular order):
* https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4iFgMSK1t5BHs
* https://nixos.org/learn.html
* https://nix-community.github.io/home-manager/index.html
* https://nixcloud.io/main/en/