2023-06-11 20:56:47 +05:30
#+title : System-level Nix Modules
#+author : Emmet
Separate Nix files can be imported as modules using an import block:
#+BEGIN_SRC nix
imports = [ import1.nix
import2.nix
...
];
#+END_SRC
My system-level Nix modules are organized into this directory:
- [[./hardware-configuration.nix ][hardware-configuration ]] - Default hardware config generated for my system
2024-04-14 20:10:46 +05:30
- [[./bin ][bin ]] - My own scripts
- [[./bin/phoenix.nix ][phoenix ]] - My nix command wrapper
2023-06-21 21:01:09 +05:30
- [[./app ][app ]] - Necessary system-level configuration to get various apps working
- [[./hardware ][hardware ]] - Hardware configurations I may need to use
- [[./security ][security ]] - System-level security stuff
2023-06-16 08:19:00 +05:30
- [[./style ][style ]] - Stylix setup (system-wide base16 theme generation)
2023-06-21 21:01:09 +05:30
- [[./wm ][wm ]] - Necessary system-level configuration to get various window managers, wayland compositors, and/or desktop environments working
2023-06-11 20:56:47 +05:30
** Variables imported from flake.nix
Variables can be imported from [[../flake.nix ][flake.nix ]] by setting the =specialArgs= block inside the flake (see [[../flake.nix ][my flake ]] for more details). This allows variables to merely be managed in one place ([[../flake.nix ][flake.nix ]]) rather than having to manage them in multiple locations.
2024-04-14 23:21:44 +05:30
I use this to pass a few attribute sets:
- =userSettings= - Settings for the normal user (see [[../flake.nix ][flake.nix ]] for more details)
- =systemSettings= - Settings for the system (see [[../flake.nix ][flake.nix ]] for more details)
- =inputs= - Flake inputs (see [[../flake.nix ][flake.nix ]] for more details)
- =pkgs-stable= - Allows me to include stable versions of packages along with (my default) unstable versions of packages