refactor(nix): auto-load flake-modules + extract shared dotfiles-rebuild 🌳
- Add import-tree input; flake.nix now auto-loads every file under ./flake-modules so new hosts/features drop in without editing flake.nix. - Extract the duplicated dotfiles-rebuild service, timer, and safe.directory wiring into nixos/modules/dotfiles-rebuild.nix, exposed via flake.nixosModules.dotfiles-rebuild. - sunken-ship and phantom-ship now pull it in from their flake-modules; hostname-specific flakeRef is derived from config.networking.hostName.
This commit is contained in:
parent
5e7b76bdcf
commit
975b2a3ee9
8 changed files with 80 additions and 81 deletions
7
nixos/flake-modules/nixos-modules.nix
Normal file
7
nixos/flake-modules/nixos-modules.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Expose reusable NixOS modules via `flake.nixosModules`.
|
||||
#
|
||||
# Consume from a host's flake-module via:
|
||||
# modules = [ config.flake.nixosModules.dotfiles-rebuild ];
|
||||
{ ... }: {
|
||||
flake.nixosModules.dotfiles-rebuild = ../modules/dotfiles-rebuild.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue