diff --git a/flake.nix b/flake.nix index c9315dab..b0a44bc6 100644 --- a/flake.nix +++ b/flake.nix @@ -5,19 +5,14 @@ outputs = { self, nixpkgs, ... }: let + forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "riscv64-linux" ]; + mkConf = name: nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit nixpkgs; theFlake = self; }; modules = [ "${self.outPath}/m/${name}/configuration.nix" ]; }; - # For now we only support x86 - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - overlays = [ self.overlays.default ]; - config.allowUnfree = true; - }; -in + in { nixosConfigurations = { hut = mkConf "hut"; @@ -38,9 +33,15 @@ in overlays.default = self.bscOverlay; # full nixpkgs with our overlay applied - legacyPackages.${system} = pkgs; + legacyPackages = forAllSystems (system: + import nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + config.allowUnfree = true; + } + ); - hydraJobs = self.legacyPackages.${system}.bsc.hydraJobs; + hydraJobs = self.legacyPackages.x86_64-linux.bsc.hydraJobs; # propagate nixpkgs lib, so we can do bscpkgs.lib lib = nixpkgs.lib // {