forked from kalipso/infrastructure
62 lines
1.9 KiB
Nix
62 lines
1.9 KiB
Nix
{ self
|
|
, utils
|
|
, nixpkgs
|
|
, nixpkgs-unstable
|
|
, nixos-generators
|
|
, sops-nix
|
|
, ...
|
|
} @inputs:
|
|
|
|
# filter i686-liux from defaultSystem to run nix flake check successfully
|
|
let filter_system = name: if name == utils.lib.system.i686-linux then false else true;
|
|
in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems) ( system:
|
|
let
|
|
pkgs-unstable = nixpkgs-unstable.legacyPackages."${system}";
|
|
pkgs = nixpkgs.legacyPackages."${system}";
|
|
in
|
|
{
|
|
devShells.default = pkgs.callPackage ./shell.nix {
|
|
inherit (sops-nix.packages."${pkgs.system}") sops-import-keys-hook ssh-to-pgp sops-init-gpg-key;
|
|
};
|
|
})) // rec {
|
|
nixosConfigurations = import ./machines/configuration.nix (inputs // {
|
|
inherit inputs;
|
|
});
|
|
|
|
nixosModules.malobeo = import ./machines/durruti/host_config.nix;
|
|
|
|
hydraJobs = nixpkgs.lib.mapAttrs (_: nixpkgs.lib.hydraJob) (
|
|
let
|
|
getBuildEntry = name: nixosSystem:
|
|
if (nixpkgs.lib.hasPrefix "sdImage" name) then
|
|
nixosSystem.config.system.build.sdImage
|
|
else
|
|
nixosSystem.config.system.build.toplevel;
|
|
in
|
|
nixpkgs.lib.mapAttrs getBuildEntry self.nixosConfigurations
|
|
|
|
);
|
|
|
|
#lucia = self.nixosConfigurations.lucia.config.system.build.toplevel;
|
|
|
|
|
|
#images.lucia_base_image = nixosConfigurations.lucia.config.system.build.sdImage;
|
|
|
|
#packages.x86_64-linux = {
|
|
# lucia_base_img = nixos-generators.nixosGenerate {
|
|
# system = "aarch64-linux";
|
|
# modules = [
|
|
# #"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
|
|
# ./machines/modules/sshd.nix
|
|
# {
|
|
# nixpkgs.config.allowUnsupportedSystem = true;
|
|
# nixpkgs.crossSystem.system = "aarch64-linux";
|
|
# networking.dhcpcd.enable = true;
|
|
# }
|
|
# ];
|
|
|
|
# format = "sd-aarch64-installer";
|
|
# };
|
|
#};
|
|
}
|