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,6 +7,9 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
|
||||
# Auto-loads every .nix file under ./flake-modules as a flake-parts module.
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
|
||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
|
|
@ -23,17 +26,9 @@
|
|||
nix-openclaw.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs @ { flake-parts, ... }:
|
||||
outputs = inputs @ { flake-parts, import-tree, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" "aarch64-darwin" ];
|
||||
|
||||
imports = [
|
||||
./flake-modules/wsl.nix
|
||||
./flake-modules/sunken-ship.nix
|
||||
./flake-modules/phantom-ship.nix
|
||||
./flake-modules/daniel-macbook-air.nix
|
||||
./flake-modules/server-install.nix
|
||||
./flake-modules/installer-iso.nix
|
||||
];
|
||||
imports = [ (import-tree ./flake-modules) ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue