config/flake.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2023-03-29 17:50:55 +03:00
{
2023-03-30 16:33:03 +03:00
description = "motiejus/config";
2023-03-29 17:50:55 +03:00
inputs = {
2023-03-30 16:33:03 +03:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.inputs.utils.follows = "flake-utils";
flake-utils.url = "github:numtide/flake-utils";
2023-03-29 17:50:55 +03:00
};
2023-03-30 16:33:03 +03:00
outputs = { self, nixpkgs, deploy-rs, flake-utils }: {
nixosConfigurations.hel1-a = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
2023-03-29 17:50:55 +03:00
./configuration.nix
2023-03-30 16:33:03 +03:00
./hardware-configuration.nix
./zfs.nix
];
};
deploy.nodes.example = {
hostname = "hel1-a.servers.jakst";
profiles = {
system = {
sshUser = "motiejus";
path =
deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.hel1-a;
user = "root";
};
2023-03-29 17:50:55 +03:00
};
};
2023-03-30 16:33:03 +03:00
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
2023-04-03 16:43:34 +03:00
}
// flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = with pkgs; mkShell {
name = "rules_nixpkgs_shell";
packages = [ bash ];
};
});
2023-03-29 17:50:55 +03:00
}
2023-03-30 16:33:03 +03:00