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 | b9d2b4b61eecc52ce55250048673b13f10d592b9 (patch) | |
| tree | 8e3a0f71af0145dd0f4d284cace850aae8ee655e | |
| parent | 0cca536ce9a59508da0e1cac7468f4365807409e (diff) | |
trivionomicon/flake: make 'mkSystem' available to library users
Diffstat (limited to '')
| -rw-r--r-- | flake.nix | 43 |
1 files changed, 27 insertions, 16 deletions
@@ -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"; + }; + }; + }; }; }; } |
