Ajouter flake.nix

This commit is contained in:
mad_nico 2023-11-20 11:39:27 +01:00
commit aebc861d84

46
flake.nix Normal file
View File

@ -0,0 +1,46 @@
{
description = "NixOS configurations for servers";
inputs = {
# Nixos pkgs 23.05
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
# Agenix (for credentials)
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, agenix, ... }:
{
nixosConfigurations = {
freebox-VM = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
./hosts/freebox-VM/configuration.nix
{ environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; }
agenix.nixosModules.default
];
};
virt-manager-VM = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/virt-manager-VM/configuration.nix
{ environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; }
agenix.nixosModules.default
];
};
virt-backup-VM = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/virt-backup-VM/configuration.nix
{ environment.systemPackages = [ agenix.packages.x86_64-linux.default ]; }
agenix.nixosModules.default
];
};
};
};
}