As the title says. Want that i can have a single config for my systems and just require a single line to install and configure software which i always use in a bundle(office, specific programming applications, server applications,...).
As the title says. Want that i can have a single config for my systems and just require a single line to install and configure software which i always use in a bundle(office, specific programming applications, server applications,...).
3 Comments
20nat@feddit.it · 10 pts · 1y
If it's only for your self I would write a nix module that does everything you need, then import the module in the system configuration. If you want to enable/disable it all you need is to add/remove one line in the imports section.
Corbin@programming.dev · 7 pts · 1y
I'm a fan of putting factored expressions into their own files and importing those files as NixOS modules. For example, let's say that we want to install vim. We might start with a
vim.nix:Then in the main configuration, this can be imported by path:
Adding the import is like enabling the feature, but without any
optionsorconfig. Later on, the feature can be customized without changing the import-oriented usage pattern:Since the imported file is a complete NixOS module, it can carry other configuration. Here's a real example,
adb.nix, which adds Android debugger support:hallettj@leminal.space · 5 pts · 1y
Write a NixOS module, publish it in a flake in the
nixosModulesoutput, import that flake in your flake-based NixOS configs.20nat@feddit.it · 1 pts · 1y