There are certain customizations I make to every fresh install of an OS, such as disabling history and changing some keyboard shortcuts and theme in vlc and LibreOffice, this sounds like something Home Manager should handle well if I understood correctly what it does, the problem is that I have no idea how to get started with it, can it be use to set up such things?
I would also like to try some advanced features available through Flakes, for example some applications are not packaged in the Nix repos, so I would like to install them through Flatpak declaratively, I found nix-flatpak and declarative-flatpak, but I have no idea how to use them. I need some help.
Home manager is great for changing various settings in applications. On my setup I made a git repository with all of my dotfiles then linked them to their correct places.
Here is an example from my home-manager setup
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
".config/alacritty.toml".source = ../../alacritty.toml;
".config/nvim/init.lua".source = ../../nvim/init.lua;
".tmux.conf".source = ../../tmux/tmux.conf;
".tmux/plugins/tpm".source = pkgs.fetchFromGitHub {
owner = "tmux-plugins";
repo = "tpm";
rev = "master";
sha256 = "01ribl326n6n0qcq68a8pllbrz6mgw55kxhf9mjdc5vw01zjcvw5";
};
};
The dotfiles that are symlinked from the nix store do not have the immutable attribute set. However, /nix/store should be usually mounted as a read-only file system, so for that purpose the outcome might be similar, depending on your requirements.