diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-08-25 23:25:25 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-08-25 23:25:25 -0600 |
| commit | f3c4dbd44492e9c74a748f07b35f5b6c34ba5537 (patch) | |
| tree | 45488d9d825da8e8ad7a9573a118e1c31025e182 | |
| parent | cf91d86842a66bc4881a759a8c91c819f623cd8a (diff) | |
trivionomicon/flake: make 'mkSystem' available to library users
Diffstat (limited to '')
| -rw-r--r-- | trivionomicon/flake.nix | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/trivionomicon/flake.nix b/trivionomicon/flake.nix index f2ee049..5fa2d1d 100644 --- a/trivionomicon/flake.nix +++ b/trivionomicon/flake.nix @@ -164,24 +164,12 @@ } // optionalAttrs (paths ? nixosSource) { nixosConfigurations = let - nixosSystem = {modules}: - lib.makeOverridable nixpkgs.lib.nixosSystem { - inherit modules pkgs system; - - specialArgs = { - inherit flakes; - - doctrine = mkDoctrine { - inherit pkgs; - namespace = "sys"; - }; - }; - }; - hostConfig = platform: - nixosSystem { + self.lib.mkSystem { + inherit flakes pkgs; + doctrine = doctrineNoPkgs; + modules = [ - self.nixosModules.default nixosSourcePath platform ]; @@ -213,6 +201,29 @@ in lib.mapAttrs home (importAll {root = hmPlatformsPath;}); }; + + mkSystem = { + pkgs, + flakes, + doctrine, + modules, + }: + flakes.nixpkgs.lib.makeOverridable flakes.nixpkgs.lib.nixosSystem { + inherit pkgs; + inherit (pkgs) system; + + modules = [self.nixosModules.default] ++ modules; + + specialArgs = { + inherit flakes; + + doctrine = self.lib.mkDoctrine { + inherit pkgs; + inherit (doctrine) prefix; + namespace = "sys"; + }; + }; + }; }; }; } |
