nixos-anywhere/flake.nix

37 lines
1.2 KiB
Nix
Raw Normal View History

2022-12-09 16:04:16 +03:00
{
description = "A universal nixos installer, just needs ssh access to the target system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
flake-parts = { url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; };
disko = { url = "github:nix-community/disko/master"; inputs.nixpkgs.follows = "nixpkgs"; };
# used for testing
nixos-images.url = "github:nix-community/nixos-images";
2023-01-12 05:34:12 +03:00
# used for development
treefmt-nix.url = "github:numtide/treefmt-nix";
};
2022-12-09 16:04:16 +03:00
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
imports = [
./src/flake-module.nix
./tests/flake-module.nix
./docs/flake-module.nix
2023-01-12 05:34:12 +03:00
inputs.treefmt-nix.flakeModule
2022-12-21 21:34:34 +03:00
];
2023-01-12 05:34:12 +03:00
perSystem = { config, ... }: {
treefmt = {
projectRootFile = "flake.nix";
programs.nixpkgs-fmt.enable = true;
programs.shellcheck.enable = true;
programs.shfmt.enable = true;
settings.formatter.shellcheck.options = [ "-s" "bash" ];
};
formatter = config.treefmt.build.wrapper;
};
2022-12-09 16:04:16 +03:00
};
}