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
|
|
|
|
2023-03-15 08:36:54 +01:00
|
|
|
Create `~/.config/home-manager` and create a symlink from `~/.config/nixpkgs/home.nix` to `~/.config/home-manager/home.nix`.
|
|
|
|
|
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-02 18:17:06 +01:00
|
|
|
Folder structure
|
|
|
|
----------------
|
|
|
|
|
2023-07-19 07:53:46 +02:00
|
|
|
`assets/`
|
|
|
|
contains assets used within nix.
|
|
|
|
E.g. images used for search engines configured for Firefox.
|
2022-02-02 18:17:06 +01:00
|
|
|
|
2023-07-19 07:53:46 +02:00
|
|
|
`gpg/`
|
|
|
|
contains everything related to gpg, like public keys.
|
|
|
|
|
|
|
|
`home/`
|
|
|
|
is related to extras for home-manager.
|
2022-02-02 18:17:06 +01:00
|
|
|
|
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-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-05-24 18:50:16 +02:00
|
|
|
`home/packages`
|
|
|
|
Holds custom nix packages.
|
|
|
|
Not all programs are available.
|
|
|
|
Foreign programs are added here.
|
|
|
|
Custom programs / scripts are added within subfolder `custom`.
|
|
|
|
|
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-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-05-24 18:50:16 +02:00
|
|
|
|
|
|
|
`home/*.nix`
|
|
|
|
Holds files for most `home.*` modules.
|
|
|
|
I don't like to clutter a single file with to many entries.
|
|
|
|
Instead `home.nix` loads files from within here.
|
|
|
|
Each file name should correspond to the home sub option / module.
|
|
|
|
|
2023-07-19 07:53:46 +02:00
|
|
|
`overlays/`
|
2022-05-24 18:50:16 +02:00
|
|
|
Holds overlays for existing packages.
|
|
|
|
E.g. in order to patch them.
|
2022-02-03 09:10:38 +01:00
|
|
|
|
2023-07-19 07:53:46 +02:00
|
|
|
`projects/`
|
|
|
|
Holds shells and compose.yaml files for customer projects.
|
2022-04-14 15:46:49 +02:00
|
|
|
The customers are not aware of Nix and I don't want to stress them.
|
2023-07-19 07:53:46 +02:00
|
|
|
I use this folder to have them in version control and symlink them into the project.
|
2022-02-10 19:04:33 +01:00
|
|
|
|
2023-03-15 08:36:54 +01:00
|
|
|
`systems/`
|
2023-07-19 07:53:46 +02:00
|
|
|
Holds nix os configuration for different systems.
|
2023-03-15 08:36:54 +01:00
|
|
|
Each system has its own subfolder.
|
|
|
|
|
2022-02-01 17:11:13 +01:00
|
|
|
Update
|
|
|
|
------
|
|
|
|
|
2022-05-25 08:00:00 +02:00
|
|
|
Update can be done via `custom-update-system` package which is a custom package.
|
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-10-10 21:17:55 +02:00
|
|
|
* Use xdm as display manager, or: Allow gdm3 to use xsessions as login.
|
2022-10-05 17:07:18 +02:00
|
|
|
Add the following content as `/usr/share/xsessions/xsession.desktop`::
|
2022-05-20 12:39:40 +02:00
|
|
|
|
|
|
|
[Desktop Entry]
|
|
|
|
Name=XSession
|
|
|
|
Comment=This session uses the custom xsession file
|
|
|
|
Exec=/etc/X11/Xsession
|
|
|
|
Type=Application
|
|
|
|
X-DesktopNames=GNOME-Flashback;GNOME;
|
|
|
|
X-Ubuntu-Gettext-Domain=gnome-flashback
|
|
|
|
|
|
|
|
This is used by gdm3 (installed via ubuntu host) to allow logging in via
|
|
|
|
xsession which will pick up all the settings generated by home-manager.
|
|
|
|
|
|
|
|
Do not forget to call `sudo desktop-file-install xsession.desktop` to make
|
|
|
|
system aware of the file.
|
|
|
|
|
2022-02-02 22:35:28 +01:00
|
|
|
Todos
|
|
|
|
-----
|
|
|
|
|
2022-05-24 17:33:16 +02:00
|
|
|
Additions:
|
|
|
|
|
2023-04-08 20:02:26 +02:00
|
|
|
* Check
|
|
|
|
https://github.com/nix-community/home-manager/blob/bb4b25b302dbf0f527f190461b080b5262871756/modules/files.nix#L64
|
|
|
|
to symlink files instead of re compiling setup everytime?
|
|
|
|
Also see: https://www.foodogsquared.one/posts/2023-03-24-managing-mutable-files-in-nixos/
|
|
|
|
|
2022-05-24 17:33:16 +02:00
|
|
|
* https://github.com/altdesktop/playerctl#selecting-the-most-recent-player in
|
|
|
|
order to not worry about current media player, control whatever was last
|
|
|
|
|
|
|
|
* https://github.com/darrenburns/dunk diff alternative
|
|
|
|
|
|
|
|
* Integrate https://github.com/Wilfred/difftastic for diffing source code
|
|
|
|
https://github.com/nix-community/home-manager/pull/2850
|
|
|
|
|
2022-10-18 07:44:50 +02:00
|
|
|
* Alternative file managers:
|
|
|
|
|
|
|
|
* http://www.krusader.org
|
|
|
|
|
|
|
|
* https://ignorantguru.github.io/spacefm/
|
|
|
|
|
|
|
|
* https://www.mucommander.com/
|
|
|
|
|
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
|
|
|
|
|
2022-05-25 13:18:28 +02:00
|
|
|
* https://nixos.wiki/
|
|
|
|
|
2022-02-02 20:27:47 +01:00
|
|
|
* https://nixcloud.io/main/en/
|
2022-05-25 13:18:28 +02:00
|
|
|
|
|
|
|
* https://teu5us.github.io/nix-lib.html
|
|
|
|
|
|
|
|
* https://ryantm.github.io/nixpkgs/
|
|
|
|
|
|
|
|
* https://www.tweag.io/blog/2020-05-25-flakes/
|
|
|
|
|
|
|
|
* https://github.com/NixOS/nix-book
|